diff --git a/Assets/UnityARKitPlugin.meta b/Assets/UnityARKitPlugin.meta new file mode 100644 index 00000000..ed83225c --- /dev/null +++ b/Assets/UnityARKitPlugin.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: df38125cf15df453a98ce2d798a5e954 +folderAsset: yes +timeCreated: 1501101795 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote.meta b/Assets/UnityARKitPlugin/ARKitRemote.meta new file mode 100644 index 00000000..ce4ee893 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4d1259656ef6245079ba6548af0ab42e +folderAsset: yes +timeCreated: 1498669549 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ARKITREMOTE.txt b/Assets/UnityARKitPlugin/ARKitRemote/ARKITREMOTE.txt new file mode 100644 index 00000000..67c5e384 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ARKITREMOTE.txt @@ -0,0 +1,27 @@ +Unity ARKit Remote + +This is a two part solution for game developers who want to iterate on ARKit apps (made with Unity ARKit Plugin) from within the Unity Editor. It consists of an iOS app (UnityARKitRemote) that provides the ARKit data from a compatible device that it is installed on, working in conjunction with a GameObject called ARKitRemoteConnection in your Unity scene for your ARKit project. This GameObject simulates ARKit working in the editor by passing data via UnityARSessionNativeInterface to the other GameObjects in the editor. The UnityARKitRemote app on the device will forward the following information to Unity scene in editor: + +-The video feed coming from the device camera (separated into Y and UV textures) as provided by ARKit. +-The camera translation and rotation based on device movement +-The ARPlaneAnchor addition, removal and update events along with data about the plane affected +-Point cloud data + +Requirements: +It has all the same requirements as the Unity ARKit Plugin, with an additional recommendation of using Unity 2017.1 or later, as the PlayerConnection works way better and has better UI support in that version. + +Future work on this: +-HitTest API +-AR Session Configuration + +Steps to using remote: + +1. First download the latest Unity ARKit Plugin code that includes the Unity ARKit Remote from either bitbucket or Unity Asset Store. +2. Build the scene called UnityARKitRemote out to your compatible iOS device. You should use “Development Build” in your Build Settings. This is the only build time to iOS you will need to endure - the rest of the iterations on your project can happen in the editor. When you build out to iOS, you should change the product name and bundle identifier in the PlayerSettings to signify that it is the Unity ARKit Remote. +3. Open the scene which contains your app that uses the Unity ARKit Plugin. From the ARKitRemote folder, add the ARKitRemoteConnection prefab into the root of your scene. If you want to test it out, it has already been added to EditorTestScene in the same folder. +4. Run the UnityARKitRemote app from step 2 on your device. It should display a black screen with “Waiting for editor connection..” +5. Press play in the editor: your game window should have a green screen with “Please connect to player in the console menu” near the bottom. +6. In this step we need to connect the editor to the Unity ARKit Remote app on the device. This is where Unity 2017.1 comes in handy: it has a menu item in the Console window to “Connected player” with a dropdown of all the available players to connect to. Select the one that corresponds to your device. In Unity 5.6 variants, you have to create a Profiler window via Window/Profiler menu. And then at the top of the Profiler window, there is a dropdown “Active Profiler” from which you select your device. +7. If you were successful in step 6, you should have a button on the top part of your Game window labelled “Start Remote ARKit Session” in editor that when pressed will start the ARKit session on the device and start transmitting data to the editor. The editor should be displaying the same video as the device, as well as navigating through your scene, and it will momentarily start showing the point cloud data as well as the planes found. + + diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ARKITREMOTE.txt.meta b/Assets/UnityARKitPlugin/ARKitRemote/ARKITREMOTE.txt.meta new file mode 100644 index 00000000..b72f4b12 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ARKITREMOTE.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e70a61590ae124a8194c71c31e1af531 +timeCreated: 1500609185 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ARKitFaceTrackingRemoteConnection.cs b/Assets/UnityARKitPlugin/ARKitRemote/ARKitFaceTrackingRemoteConnection.cs new file mode 100644 index 00000000..b5255785 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ARKitFaceTrackingRemoteConnection.cs @@ -0,0 +1,215 @@ +using UnityEngine; +using UnityEngine.Networking.PlayerConnection; +using System.Text; +using UnityEngine.XR.iOS.Utils; + +#if UNITY_EDITOR + +using UnityEditor.Networking.PlayerConnection; + +namespace UnityEngine.XR.iOS +{ + public class ARKitFaceTrackingRemoteConnection : MonoBehaviour + { + [Header("AR FaceTracking Config Options")] + public bool enableLightEstimation = true; + + [Header("Run Options")] + public bool resetTracking = true; + public bool removeExistingAnchors = true; + + EditorConnection editorConnection ; + + int currentPlayerID = -1; + string guimessage = "none"; + + Texture2D remoteScreenYTex; + Texture2D remoteScreenUVTex; + + bool bTexturesInitialized; + + // Use this for initialization + void Start () { + + bTexturesInitialized = false; + + + editorConnection = EditorConnection.instance; + editorConnection.Initialize (); + editorConnection.RegisterConnection (PlayerConnected); + editorConnection.RegisterDisconnection (PlayerDisconnected); + editorConnection.Register (ConnectionMessageIds.updateCameraFrameMsgId, UpdateCameraFrame); + editorConnection.Register (ConnectionMessageIds.addFaceAnchorMsgeId, AddFaceAnchor); + editorConnection.Register (ConnectionMessageIds.updateFaceAnchorMsgeId, UpdateFaceAnchor); + editorConnection.Register (ConnectionMessageIds.removePlaneAnchorMsgeId, RemoveFaceAnchor); + editorConnection.Register (ConnectionMessageIds.screenCaptureYMsgId, ReceiveRemoteScreenYTex); + editorConnection.Register (ConnectionMessageIds.screenCaptureUVMsgId, ReceiveRemoteScreenUVTex); + + } + + void PlayerConnected(int playerID) + { + currentPlayerID = playerID; + + } + + void OnGUI() + { + + if (!bTexturesInitialized) + { + if (currentPlayerID != -1) { + guimessage = "Connected to ARKit Remote device : " + currentPlayerID.ToString (); + + if (GUI.Button (new Rect ((Screen.width / 2) - 200, (Screen.height / 2) - 200, 400, 100), "Start Remote ARKit FaceTracking Session")) + { + SendInitToPlayer (); + } + } + else + { + guimessage = "Please connect to player in the console menu"; + } + + GUI.Box (new Rect ((Screen.width / 2) - 200, (Screen.height / 2) + 100, 400, 50), guimessage); + } + + } + + void PlayerDisconnected(int playerID) + { + if (currentPlayerID == playerID) { + currentPlayerID = -1; + } + } + + void OnDestroy() + { +#if UNITY_2017_1_OR_NEWER + if(editorConnection != null) { + editorConnection.DisconnectAll (); + } +#endif + } + + + void InitializeTextures(UnityARCamera camera) + { + int yWidth = camera.videoParams.yWidth; + int yHeight = camera.videoParams.yHeight; + int uvWidth = yWidth / 2; + int uvHeight = yHeight / 2; + if (remoteScreenYTex == null || remoteScreenYTex.width != yWidth || remoteScreenYTex.height != yHeight) { + if (remoteScreenYTex) { + Destroy (remoteScreenYTex); + } + remoteScreenYTex = new Texture2D (yWidth, yHeight, TextureFormat.R8, false, true); + } + if (remoteScreenUVTex == null || remoteScreenUVTex.width != uvWidth || remoteScreenUVTex.height != uvHeight) { + if (remoteScreenUVTex) { + Destroy (remoteScreenUVTex); + } + remoteScreenUVTex = new Texture2D (uvWidth, uvHeight, TextureFormat.RG16, false, true); + } + + bTexturesInitialized = true; + } + + void UpdateCameraFrame(MessageEventArgs mea) + { + serializableUnityARCamera serCamera = mea.data.Deserialize (); + + UnityARCamera scamera = new UnityARCamera (); + scamera = serCamera; + + InitializeTextures (scamera); + + UnityARSessionNativeInterface.SetStaticCamera (scamera); + UnityARSessionNativeInterface.RunFrameUpdateCallbacks (); + } + + void AddFaceAnchor(MessageEventArgs mea) + { + serializableUnityARFaceAnchor serFaceAnchor = mea.data.Deserialize (); + + ARFaceAnchor arFaceAnchor = serFaceAnchor; + UnityARSessionNativeInterface.RunAddAnchorCallbacks (arFaceAnchor); + } + + void UpdateFaceAnchor(MessageEventArgs mea) + { + serializableUnityARFaceAnchor serFaceAnchor = mea.data.Deserialize (); + + ARFaceAnchor arFaceAnchor = serFaceAnchor; + UnityARSessionNativeInterface.RunUpdateAnchorCallbacks (arFaceAnchor); + } + + void RemoveFaceAnchor(MessageEventArgs mea) + { + serializableUnityARFaceAnchor serFaceAnchor = mea.data.Deserialize (); + + ARFaceAnchor arFaceAnchor = serFaceAnchor; + UnityARSessionNativeInterface.RunRemoveAnchorCallbacks (arFaceAnchor); + } + + void ReceiveRemoteScreenYTex(MessageEventArgs mea) + { + if (!bTexturesInitialized) + return; + remoteScreenYTex.LoadRawTextureData(CompressionHelper.ByteArrayDecompress(mea.data)); + remoteScreenYTex.Apply (); + UnityARVideo arVideo = Camera.main.GetComponent(); + if (arVideo) { + arVideo.SetYTexure(remoteScreenYTex); + } + + } + + void ReceiveRemoteScreenUVTex(MessageEventArgs mea) + { + if (!bTexturesInitialized) + return; + remoteScreenUVTex.LoadRawTextureData(CompressionHelper.ByteArrayDecompress(mea.data)); + remoteScreenUVTex.Apply (); + UnityARVideo arVideo = Camera.main.GetComponent(); + if (arVideo) { + arVideo.SetUVTexure(remoteScreenUVTex); + } + + } + + + void SendInitToPlayer() + { + + //we're going to reuse ARSessionConfiguration and only use its lightestimation field. + + serializableFromEditorMessage sfem = new serializableFromEditorMessage (); + sfem.subMessageId = SubMessageIds.editorInitARKitFaceTracking; + serializableARSessionConfiguration ssc = new serializableARSessionConfiguration (UnityARAlignment.UnityARAlignmentCamera, UnityARPlaneDetection.None, false, enableLightEstimation, true); + UnityARSessionRunOption roTracking = resetTracking ? UnityARSessionRunOption.ARSessionRunOptionResetTracking : 0; + UnityARSessionRunOption roAnchors = removeExistingAnchors ? UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors : 0; + sfem.arkitConfigMsg = new serializableARKitInit (ssc, roTracking | roAnchors); + SendToPlayer (ConnectionMessageIds.fromEditorARKitSessionMsgId, sfem); + } + + void SendToPlayer(System.Guid msgId, byte[] data) + { + editorConnection.Send (msgId, data); + } + + public void SendToPlayer(System.Guid msgId, object serializableObject) + { + byte[] arrayToSend = serializableObject.SerializeToByteArray (); + SendToPlayer (msgId, arrayToSend); + } + + + // Update is called once per frame + void Update () { + + } + + } +} +#endif \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ARKitFaceTrackingRemoteConnection.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/ARKitFaceTrackingRemoteConnection.cs.meta new file mode 100644 index 00000000..ce901309 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ARKitFaceTrackingRemoteConnection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cdd3e34e30492409ea4e7aa626b21aa0 +timeCreated: 1513104962 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.cs b/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.cs new file mode 100755 index 00000000..65abec7c --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.cs @@ -0,0 +1,216 @@ +using UnityEngine; +using UnityEngine.Networking.PlayerConnection; +using System.Text; +using UnityEngine.XR.iOS.Utils; + +#if UNITY_EDITOR + +using UnityEditor.Networking.PlayerConnection; + +namespace UnityEngine.XR.iOS +{ + public class ARKitRemoteConnection : MonoBehaviour + { + [Header("AR Config Options")] + public UnityARAlignment startAlignment = UnityARAlignment.UnityARAlignmentGravity; + public UnityARPlaneDetection planeDetection = UnityARPlaneDetection.Horizontal; + public bool getPointCloud = true; + public bool enableLightEstimation = true; + public bool enableAutoFocus = true; + + [Header("Run Options")] + public bool resetTracking = true; + public bool removeExistingAnchors = true; + + EditorConnection editorConnection ; + + int currentPlayerID = -1; + string guimessage = "none"; + + Texture2D remoteScreenYTex; + Texture2D remoteScreenUVTex; + + bool bTexturesInitialized; + + // Use this for initialization + void Start () { + + bTexturesInitialized = false; + + + editorConnection = EditorConnection.instance; + editorConnection.Initialize (); + editorConnection.RegisterConnection (PlayerConnected); + editorConnection.RegisterDisconnection (PlayerDisconnected); + editorConnection.Register (ConnectionMessageIds.updateCameraFrameMsgId, UpdateCameraFrame); + editorConnection.Register (ConnectionMessageIds.addPlaneAnchorMsgeId, AddPlaneAnchor); + editorConnection.Register (ConnectionMessageIds.updatePlaneAnchorMsgeId, UpdatePlaneAnchor); + editorConnection.Register (ConnectionMessageIds.removePlaneAnchorMsgeId, RemovePlaneAnchor); + editorConnection.Register (ConnectionMessageIds.screenCaptureYMsgId, ReceiveRemoteScreenYTex); + editorConnection.Register (ConnectionMessageIds.screenCaptureUVMsgId, ReceiveRemoteScreenUVTex); + + } + + void PlayerConnected(int playerID) + { + currentPlayerID = playerID; + + } + + void OnGUI() + { + + if (!bTexturesInitialized) + { + if (currentPlayerID != -1) { + guimessage = "Connected to ARKit Remote device : " + currentPlayerID.ToString (); + + if (GUI.Button (new Rect ((Screen.width / 2) - 200, (Screen.height / 2) - 200, 400, 100), "Start Remote ARKit Session")) + { + SendInitToPlayer (); + } + } + else + { + guimessage = "Please connect to player in the console menu"; + } + + GUI.Box (new Rect ((Screen.width / 2) - 200, (Screen.height / 2) + 100, 400, 50), guimessage); + } + + } + + void PlayerDisconnected(int playerID) + { + if (currentPlayerID == playerID) { + currentPlayerID = -1; + } + } + + void OnDestroy() + { + #if UNITY_2017_1_OR_NEWER + if(editorConnection != null) { + editorConnection.DisconnectAll (); + } + #endif + } + + + void InitializeTextures(UnityARCamera camera) + { + int yWidth = camera.videoParams.yWidth; + int yHeight = camera.videoParams.yHeight; + int uvWidth = yWidth / 2; + int uvHeight = yHeight / 2; + if (remoteScreenYTex == null || remoteScreenYTex.width != yWidth || remoteScreenYTex.height != yHeight) { + if (remoteScreenYTex) { + Destroy (remoteScreenYTex); + } + remoteScreenYTex = new Texture2D (yWidth, yHeight, TextureFormat.R8, false, true); + } + if (remoteScreenUVTex == null || remoteScreenUVTex.width != uvWidth || remoteScreenUVTex.height != uvHeight) { + if (remoteScreenUVTex) { + Destroy (remoteScreenUVTex); + } + remoteScreenUVTex = new Texture2D (uvWidth, uvHeight, TextureFormat.RG16, false, true); + } + + bTexturesInitialized = true; + } + + void UpdateCameraFrame(MessageEventArgs mea) + { + serializableUnityARCamera serCamera = mea.data.Deserialize (); + + UnityARCamera scamera = new UnityARCamera (); + scamera = serCamera; + + InitializeTextures (scamera); + + UnityARSessionNativeInterface.SetStaticCamera (scamera); + UnityARSessionNativeInterface.RunFrameUpdateCallbacks (); + } + + void AddPlaneAnchor(MessageEventArgs mea) + { + serializableUnityARPlaneAnchor serPlaneAnchor = mea.data.Deserialize (); + + ARPlaneAnchor arPlaneAnchor = serPlaneAnchor; + UnityARSessionNativeInterface.RunAddAnchorCallbacks (arPlaneAnchor); + } + + void UpdatePlaneAnchor(MessageEventArgs mea) + { + serializableUnityARPlaneAnchor serPlaneAnchor = mea.data.Deserialize (); + + ARPlaneAnchor arPlaneAnchor = serPlaneAnchor; + UnityARSessionNativeInterface.RunUpdateAnchorCallbacks (arPlaneAnchor); + } + + void RemovePlaneAnchor(MessageEventArgs mea) + { + serializableUnityARPlaneAnchor serPlaneAnchor = mea.data.Deserialize (); + + ARPlaneAnchor arPlaneAnchor = serPlaneAnchor; + UnityARSessionNativeInterface.RunRemoveAnchorCallbacks (arPlaneAnchor); + } + + void ReceiveRemoteScreenYTex(MessageEventArgs mea) + { + if (!bTexturesInitialized) + return; + remoteScreenYTex.LoadRawTextureData(CompressionHelper.ByteArrayDecompress(mea.data)); + remoteScreenYTex.Apply (); + UnityARVideo arVideo = Camera.main.GetComponent(); + if (arVideo) { + arVideo.SetYTexure(remoteScreenYTex); + } + + } + + void ReceiveRemoteScreenUVTex(MessageEventArgs mea) + { + if (!bTexturesInitialized) + return; + remoteScreenUVTex.LoadRawTextureData(CompressionHelper.ByteArrayDecompress(mea.data)); + remoteScreenUVTex.Apply (); + UnityARVideo arVideo = Camera.main.GetComponent(); + if (arVideo) { + arVideo.SetUVTexure(remoteScreenUVTex); + } + + } + + + void SendInitToPlayer() + { + serializableFromEditorMessage sfem = new serializableFromEditorMessage (); + sfem.subMessageId = SubMessageIds.editorInitARKit; + serializableARSessionConfiguration ssc = new serializableARSessionConfiguration (startAlignment, planeDetection, getPointCloud, enableLightEstimation, enableAutoFocus); + UnityARSessionRunOption roTracking = resetTracking ? UnityARSessionRunOption.ARSessionRunOptionResetTracking : 0; + UnityARSessionRunOption roAnchors = removeExistingAnchors ? UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors : 0; + sfem.arkitConfigMsg = new serializableARKitInit (ssc, roTracking | roAnchors); + SendToPlayer (ConnectionMessageIds.fromEditorARKitSessionMsgId, sfem); + } + + void SendToPlayer(System.Guid msgId, byte[] data) + { + editorConnection.Send (msgId, data); + } + + public void SendToPlayer(System.Guid msgId, object serializableObject) + { + byte[] arrayToSend = serializableObject.SerializeToByteArray (); + SendToPlayer (msgId, arrayToSend); + } + + + // Update is called once per frame + void Update () { + + } + + } +} +#endif \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.cs.meta new file mode 100644 index 00000000..5956e995 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 004464ca939eb4ec1a1b492fb8ebfd12 +timeCreated: 1500571041 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.prefab b/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.prefab new file mode 100644 index 00000000..96378371 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.prefab @@ -0,0 +1,59 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1214069642587422} + m_IsPrefabParent: 1 +--- !u!1 &1214069642587422 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4661046637869644} + - component: {fileID: 114217095398060286} + m_Layer: 0 + m_Name: ARKitRemoteConnection + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4661046637869644 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1214069642587422} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114217095398060286 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1214069642587422} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 004464ca939eb4ec1a1b492fb8ebfd12, type: 3} + m_Name: + m_EditorClassIdentifier: + startAlignment: 0 + planeDetection: 1 + getPointCloud: 1 + enableLightEstimation: 1 + resetTracking: 1 + removeExistingAnchors: 1 diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.prefab.meta b/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.prefab.meta new file mode 100644 index 00000000..8c1c108f --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ARKitRemoteConnection.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8ce7d6271a01a4274a00066492aed04a +timeCreated: 1500571318 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/CompressionHelper.cs b/Assets/UnityARKitPlugin/ARKitRemote/CompressionHelper.cs new file mode 100644 index 00000000..56adca14 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/CompressionHelper.cs @@ -0,0 +1,65 @@ +using System.IO; +using System.IO.Compression; + +namespace UnityEngine.XR.iOS +{ + + public static class CompressionHelper + { + + /// + /// Compress using deflate. + /// + /// The byte compress. + /// Source. + public static byte[] ByteArrayCompress(byte[] source) + { + using (MemoryStream ms = new MemoryStream()) + using (DeflateStream compressedDStream = new DeflateStream(ms, CompressionMode.Compress, true)) + { + compressedDStream.Write(source, 0, source.Length); + + compressedDStream.Close(); + + byte[] destination = ms.ToArray(); + + Debug.Log(source.Length.ToString() + " vs " + ms.Length.ToString()); + + return destination; + } + } + + /// + /// Decompress using deflate. + /// + /// The byte decompress. + /// Source. + public static byte[] ByteArrayDecompress(byte[] source) + { + using (MemoryStream input = new MemoryStream(source)) + using (MemoryStream output = new MemoryStream()) + using (DeflateStream decompressedDstream = new DeflateStream(input, CompressionMode.Decompress)) + { + decompressedDstream.CopyTo(output); + + byte[] destination = output.ToArray(); + + Debug.Log("Decompress Size : " + output.Length); + + return destination; + } + } + + public static long CopyTo(this Stream source, Stream destination) { + byte[] buffer = new byte[2048]; + int bytesRead; + long totalBytes = 0; + while((bytesRead = source.Read(buffer, 0, buffer.Length)) > 0) { + destination.Write(buffer, 0, bytesRead); + totalBytes += bytesRead; + } + return totalBytes; + } + + } +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/ARKitRemote/CompressionHelper.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/CompressionHelper.cs.meta new file mode 100644 index 00000000..44e44a88 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/CompressionHelper.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: d2e302b45830142a8b9e4fe09be4618d +timeCreated: 1534796420 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ConnectToEditor.cs b/Assets/UnityARKitPlugin/ARKitRemote/ConnectToEditor.cs new file mode 100644 index 00000000..f5c5ef16 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ConnectToEditor.cs @@ -0,0 +1,192 @@ +using UnityEngine; +using UnityEngine.Networking.PlayerConnection; +using System.Text; +using UnityEngine.XR.iOS.Utils; + +namespace UnityEngine.XR.iOS +{ + + public class ConnectToEditor : MonoBehaviour + { + PlayerConnection playerConnection; + UnityARSessionNativeInterface m_session; + int editorID; + + Texture2D frameBufferTex; + + // Use this for initialization + void Start() + { + Debug.Log("STARTING ConnectToEditor"); + editorID = -1; + playerConnection = PlayerConnection.instance; + playerConnection.RegisterConnection(EditorConnected); + playerConnection.RegisterDisconnection(EditorDisconnected); + playerConnection.Register(ConnectionMessageIds.fromEditorARKitSessionMsgId, HandleEditorMessage); + m_session = null; + + } + + void OnGUI() + { + if (m_session == null) { + GUI.Box (new Rect ((Screen.width / 2) - 200, (Screen.height / 2), 400, 50), "Waiting for editor connection..."); + } + } + + void HandleEditorMessage(MessageEventArgs mea) + { + serializableFromEditorMessage sfem = mea.data.Deserialize(); + if (sfem != null && sfem.subMessageId == SubMessageIds.editorInitARKit) + { + InitializeARKit ( sfem.arkitConfigMsg ); + } + else if (sfem != null && sfem.subMessageId == SubMessageIds.editorInitARKitFaceTracking) + { + InitializeARKitFaceTracking( sfem.arkitConfigMsg); + } + } + + void InitializeARKit(serializableARKitInit sai) + { + #if !UNITY_EDITOR + //get the config and runoption from editor and use them to initialize arkit on device + Application.targetFrameRate = 60; + m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + ARKitWorldTrackingSessionConfiguration config = sai.config; + UnityARSessionRunOption runOptions = sai.runOption; + m_session.RunWithConfigAndOptions(config, runOptions); + + UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; + UnityARSessionNativeInterface.ARAnchorAddedEvent += ARAnchorAdded; + UnityARSessionNativeInterface.ARAnchorUpdatedEvent += ARAnchorUpdated; + UnityARSessionNativeInterface.ARAnchorRemovedEvent += ARAnchorRemoved; + #endif + } + + void InitializeARKitFaceTracking(serializableARKitInit sai) + { + #if !UNITY_EDITOR + //get the config and runoption from editor and use them to initialize arkit for facetracking on device + Application.targetFrameRate = 60; + m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + ARKitFaceTrackingConfiguration config = sai.config; + UnityARSessionRunOption runOptions = sai.runOption; + m_session.RunWithConfigAndOptions(config, runOptions); + + UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; + UnityARSessionNativeInterface.ARFaceAnchorAddedEvent += ARFaceAnchorAdded; + UnityARSessionNativeInterface.ARFaceAnchorUpdatedEvent += ARFaceAnchorUpdated; + UnityARSessionNativeInterface.ARFaceAnchorRemovedEvent += ARFaceAnchorRemoved; + #endif + } + + public void ARFrameUpdated(UnityARCamera camera) + { + #if !UNITY_EDITOR + serializableUnityARCamera serARCamera = camera; + SendToEditor(ConnectionMessageIds.updateCameraFrameMsgId, serARCamera); + #endif + } + + public void ARAnchorAdded(ARPlaneAnchor planeAnchor) + { + #if !UNITY_EDITOR + serializableUnityARPlaneAnchor serPlaneAnchor = planeAnchor; + SendToEditor (ConnectionMessageIds.addPlaneAnchorMsgeId, serPlaneAnchor); + #endif + } + + public void ARAnchorUpdated(ARPlaneAnchor planeAnchor) + { + #if !UNITY_EDITOR + serializableUnityARPlaneAnchor serPlaneAnchor = planeAnchor; + SendToEditor (ConnectionMessageIds.updatePlaneAnchorMsgeId, serPlaneAnchor); + #endif + } + + public void ARAnchorRemoved(ARPlaneAnchor planeAnchor) + { + #if !UNITY_EDITOR + serializableUnityARPlaneAnchor serPlaneAnchor = planeAnchor; + SendToEditor (ConnectionMessageIds.removePlaneAnchorMsgeId, serPlaneAnchor); + #endif + } + + public void ARFaceAnchorAdded(ARFaceAnchor faceAnchor) + { + #if !UNITY_EDITOR + serializableUnityARFaceAnchor serFaceAnchor = faceAnchor; + SendToEditor (ConnectionMessageIds.addFaceAnchorMsgeId, serFaceAnchor); + #endif + } + + public void ARFaceAnchorUpdated(ARFaceAnchor faceAnchor) + { + #if !UNITY_EDITOR + serializableUnityARFaceAnchor serFaceAnchor = faceAnchor; + SendToEditor (ConnectionMessageIds.updateFaceAnchorMsgeId, serFaceAnchor); + #endif + } + + public void ARFaceAnchorRemoved(ARFaceAnchor faceAnchor) + { + #if !UNITY_EDITOR + serializableUnityARFaceAnchor serFaceAnchor = faceAnchor; + SendToEditor (ConnectionMessageIds.removeFaceAnchorMsgeId, serFaceAnchor); + #endif + } + + void EditorConnected(int playerID) + { + Debug.Log("connected"); + + editorID = playerID; + + } + + void EditorDisconnected(int playerID) + { + if (editorID == playerID) + { + editorID = -1; + } + + DisconnectFromEditor (); + #if !UNITY_EDITOR + if (m_session != null) + { + m_session.Pause(); + m_session = null; + } + #endif + } + + + public void SendToEditor(System.Guid msgId, object serializableObject) + { + byte[] arrayToSend = serializableObject.SerializeToByteArray (); + SendToEditor (msgId, arrayToSend); + } + + public void SendToEditor(System.Guid msgId, byte[] data) + { + if (playerConnection.isConnected) + { + playerConnection.Send(msgId, data); + } + + + } + + public void DisconnectFromEditor() + { + #if UNITY_2017_1_OR_NEWER + playerConnection.DisconnectAll(); + #endif + } + + + } + +} diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ConnectToEditor.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/ConnectToEditor.cs.meta new file mode 100755 index 00000000..4323d873 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ConnectToEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4b70a2d547e0544c983e2dec3bf61d46 +timeCreated: 1497387236 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ConnectionMessageIds.cs b/Assets/UnityARKitPlugin/ARKitRemote/ConnectionMessageIds.cs new file mode 100644 index 00000000..06e3912d --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ConnectionMessageIds.cs @@ -0,0 +1,24 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public static class ConnectionMessageIds + { + public static Guid fromEditorARKitSessionMsgId { get { return new Guid("523bb5dd-163b-4e5b-9271-d18a50e8897e"); } } + public static Guid updateCameraFrameMsgId { get { return new Guid("6d8c39bf-279a-46cf-91f4-9827a44443af"); } } + public static Guid addPlaneAnchorMsgeId { get { return new Guid("a435cdb9-fa85-4d3c-9d3f-57fa85f62da3"); } } + public static Guid updatePlaneAnchorMsgeId { get { return new Guid("84d5ad8d-e7f9-432c-ae5d-40717790a12f"); } } + public static Guid removePlaneAnchorMsgeId { get { return new Guid("b07750a2-8825-4e86-9483-0b22b07df800"); } } + public static Guid screenCaptureYMsgId { get { return new Guid("25c3d26f-72c5-4f3e-9a1f-c8c9b859453b"); } } + public static Guid screenCaptureUVMsgId { get { return new Guid("d7f4d3cd-2d12-4ab7-b755-932fe7ab744d"); } } + public static Guid addFaceAnchorMsgeId { get { return new Guid("7d7531e9-28b8-40b3-9afd-b6e7baa8e630"); } } + public static Guid updateFaceAnchorMsgeId { get { return new Guid("80880c6e-d3f5-449a-9c8b-55c95b188563"); } } + public static Guid removeFaceAnchorMsgeId { get { return new Guid("ba429c59-067e-4548-ab01-d7129f060872"); } } + }; + + public static class SubMessageIds + { + public static Guid editorInitARKit { get { return new Guid("2e5d7c45-daef-474d-bf55-1f02f0a10b69"); } } + public static Guid editorInitARKitFaceTracking { get { return new Guid("3e86ccf6-93c6-4b07-b78f-0a60f6ed4a7a"); } } + }; +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ConnectionMessageIds.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/ConnectionMessageIds.cs.meta new file mode 100644 index 00000000..de71afe1 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ConnectionMessageIds.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a8aba40a0fa3e49b4a51b657765f5bf6 +timeCreated: 1498693329 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/EditorARFaceAnchor.cs b/Assets/UnityARKitPlugin/ARKitRemote/EditorARFaceAnchor.cs new file mode 100644 index 00000000..7fe52014 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/EditorARFaceAnchor.cs @@ -0,0 +1,78 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System.Text; +using UnityEngine.XR.iOS.Utils; + + +namespace UnityEngine.XR.iOS +{ + #if UNITY_EDITOR || !UNITY_IOS + public class ARFaceGeometry + { + private serializableFaceGeometry sFaceGeometry; + + public ARFaceGeometry (serializableFaceGeometry ufg) + { + sFaceGeometry = ufg; + } + + public int vertexCount { get { return sFaceGeometry.Vertices.Length; } } + public int triangleCount { get { return sFaceGeometry.TriangleIndices.Length; } } + public int textureCoordinateCount { get { return sFaceGeometry.TexCoords.Length; } } + + public Vector3 [] vertices { get { return sFaceGeometry.Vertices; } } + + public Vector2 [] textureCoordinates { get { return sFaceGeometry.TexCoords; } } + + public int [] triangleIndices { get { return sFaceGeometry.TriangleIndices; } } + + } + + public class ARFaceAnchor + { + serializableUnityARFaceAnchor m_sfa; + + public ARFaceAnchor(serializableUnityARFaceAnchor sfa) + { + m_sfa = sfa; + } + + public string identifierStr { get { return Encoding.UTF8.GetString (m_sfa.identifierStr); } } + + public Matrix4x4 transform { get { return m_sfa.worldTransform; } } + + public ARFaceGeometry faceGeometry { get { return new ARFaceGeometry (m_sfa.faceGeometry); } } + + public Dictionary blendShapes { get { return m_sfa.arBlendShapes; } } + + public Pose leftEyePose + { + get + { + return new Pose(Vector3.zero, Quaternion.identity); + } + } + + public Pose rightEyePose + { + get + { + return new Pose(Vector3.zero, Quaternion.identity); + } + } + + public Vector3 lookAtPoint + { + get + { + return Vector3.zero; + } + } + + public bool isTracked { get { return m_sfa.isTracked; } } + + + } + #endif +} diff --git a/Assets/UnityARKitPlugin/ARKitRemote/EditorARFaceAnchor.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/EditorARFaceAnchor.cs.meta new file mode 100644 index 00000000..491dd07f --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/EditorARFaceAnchor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d1aa34d80d3e0455ca018dfec2ad806d +timeCreated: 1513192743 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/EditorARPlaneAnchor.cs b/Assets/UnityARKitPlugin/ARKitRemote/EditorARPlaneAnchor.cs new file mode 100644 index 00000000..fc555a8e --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/EditorARPlaneAnchor.cs @@ -0,0 +1,73 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS.Utils; +using System.Text; + +namespace UnityEngine.XR.iOS +{ + #if UNITY_EDITOR + public class ARPlaneGeometry + { + private serializablePlaneGeometry sPlaneGeometry; + + public ARPlaneGeometry (serializablePlaneGeometry ufg) + { + sPlaneGeometry = ufg; + } + + public int vertexCount { get { return sPlaneGeometry.Vertices.Length; } } + public int triangleCount { get { return sPlaneGeometry.TriangleIndices.Length; } } + public int textureCoordinateCount { get { return sPlaneGeometry.TexCoords.Length; } } + public int boundaryVertexCount { get { return sPlaneGeometry.BoundaryVertices.Length; } } + + public Vector3 [] vertices { get { return sPlaneGeometry.Vertices; } } + + public Vector2 [] textureCoordinates { get { return sPlaneGeometry.TexCoords; } } + + public int [] triangleIndices { get { return sPlaneGeometry.TriangleIndices; } } + + public Vector3 [] boundaryVertices { get { return sPlaneGeometry.BoundaryVertices; } } + + } + + public class ARPlaneAnchor + { + serializableUnityARPlaneAnchor m_spa; + + public ARPlaneAnchor(serializableUnityARPlaneAnchor spa) + { + m_spa = spa; + } + + public string identifier { get { return Encoding.UTF8.GetString (m_spa.identifierStr); } } + + public Matrix4x4 transform { get { return m_spa.worldTransform; } } + + public ARPlaneGeometry planeGeometry { + get { + return new ARPlaneGeometry (m_spa.planeGeometry); + } + } + + public ARPlaneAnchorAlignment alignment { + get { + return m_spa.planeAlignment; + } + } + + public Vector3 extent { + get { + return new Vector3 (m_spa.extent.x, m_spa.extent.y, m_spa.extent.z); + } + } + + public Vector3 center { + get { + return new Vector3 (m_spa.center.x, m_spa.center.y, m_spa.center.z); + } + } + + } + #endif +} diff --git a/Assets/UnityARKitPlugin/ARKitRemote/EditorARPlaneAnchor.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/EditorARPlaneAnchor.cs.meta new file mode 100644 index 00000000..30919cf0 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/EditorARPlaneAnchor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d7917239de65543aabc5363138de68b8 +timeCreated: 1517369156 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/EditorHitTest.cs b/Assets/UnityARKitPlugin/ARKitRemote/EditorHitTest.cs new file mode 100644 index 00000000..673f60ca --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/EditorHitTest.cs @@ -0,0 +1,34 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEngine.XR.iOS +{ + + public class EditorHitTest : MonoBehaviour { + + public Transform m_HitTransform; + public float maxRayDistance = 30.0f; + public LayerMask collisionLayerMask; + +#if UNITY_EDITOR //we will only use this script on the editor side, though there is nothing that would prevent it from working on device + void Update () { + if (Input.GetMouseButtonDown (0)) { + Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); + RaycastHit hit; + + //we'll try to hit one of the plane collider gameobjects that were generated by the plugin + //effectively similar to calling HitTest with ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent + if (Physics.Raycast (ray, out hit, maxRayDistance, collisionLayerMask)) { + //we're going to get the position from the contact point + m_HitTransform.position = hit.point; + Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", m_HitTransform.position.x, m_HitTransform.position.y, m_HitTransform.position.z)); + + //and the rotation from the transform of the plane collider + m_HitTransform.rotation = hit.transform.rotation; + } + } + } +#endif + } +} diff --git a/Assets/UnityARKitPlugin/ARKitRemote/EditorHitTest.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/EditorHitTest.cs.meta new file mode 100644 index 00000000..738694ff --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/EditorHitTest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6e5621b71c5c74d94ac88603287035e2 +timeCreated: 1504320319 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/EditorTestScene.unity b/Assets/UnityARKitPlugin/ARKitRemote/EditorTestScene.unity new file mode 100644 index 00000000..61c22ad6 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/EditorTestScene.unity @@ -0,0 +1,630 @@ +%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: 8 + 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.4465934, g: 0.49642956, b: 0.57482487, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 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: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !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 + m_NavMeshData: {fileID: 0} +--- !u!1 &11818609 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 11818614} + - component: {fileID: 11818613} + - component: {fileID: 11818612} + - component: {fileID: 11818611} + - component: {fileID: 11818610} + - component: {fileID: 11818615} + 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 &11818610 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11818609} + m_Enabled: 1 +--- !u!124 &11818611 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11818609} + m_Enabled: 1 +--- !u!92 &11818612 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11818609} + m_Enabled: 1 +--- !u!20 &11818613 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11818609} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 35 + 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: 0 + m_AllowMSAA: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &11818614 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11818609} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &11818615 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11818609} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!1 &84445150 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 84445152} + - component: {fileID: 84445151} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &84445151 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 84445150} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 11818613} + startAlignment: 0 + planeDetection: 1 + getPointCloud: 1 + enableLightEstimation: 1 +--- !u!4 &84445152 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 84445150} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &260521679 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 260521681} + - component: {fileID: 260521680} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &260521680 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 260521679} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!4 &260521681 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 260521679} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &359599245 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 359599247} + - component: {fileID: 359599246} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &359599246 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 359599245} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &359599247 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 359599245} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &375233436 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 375233438} + - component: {fileID: 375233437} + - component: {fileID: 375233439} + 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 &375233437 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 375233436} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 0.9852941, g: 0.73455304, b: 0.05071366, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + 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_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &375233438 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 375233436} + 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: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!114 &375233439 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 375233436} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &754164519 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 754164523} + - component: {fileID: 754164522} + - component: {fileID: 754164521} + - component: {fileID: 754164520} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &754164520 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 754164519} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &754164521 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 754164519} + 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!33 &754164522 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 754164519} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &754164523 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 754164519} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1320907942 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1320907943} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1320907943 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1320907942} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1428923966} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1428923965 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1428923966} + - component: {fileID: 1428923971} + - component: {fileID: 1428923970} + - component: {fileID: 1428923969} + - component: {fileID: 1428923968} + m_Layer: 0 + m_Name: HitCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1428923966 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1428923965} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1320907943} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1428923968 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1428923965} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1320907943} + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!23 &1428923969 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1428923965} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1428923970 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1428923965} + 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!33 &1428923971 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1428923965} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/ARKitRemote/EditorTestScene.unity.meta b/Assets/UnityARKitPlugin/ARKitRemote/EditorTestScene.unity.meta new file mode 100755 index 00000000..1c9ad355 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/EditorTestScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e1efc0006a07a4fc8ab373ea6249a832 +timeCreated: 1497484703 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ObjectSerializationExtension.cs b/Assets/UnityARKitPlugin/ARKitRemote/ObjectSerializationExtension.cs new file mode 100644 index 00000000..03cb74d1 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ObjectSerializationExtension.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using System.Collections; +using System.Runtime.Serialization.Formatters.Binary; +using System.IO; + +namespace UnityEngine.XR.iOS.Utils +{ + //Extension class to provide serialize / deserialize methods to object. + //src: http://stackoverflow.com/questions/1446547/how-to-convert-an-object-to-a-byte-array-in-c-sharp + //NOTE: You need add [Serializable] attribute in your class to enable serialization + public static class ObjectSerializationExtension + { + + public static byte[] SerializeToByteArray(this object obj) + { + if (obj == null) + { + return null; + } + var bf = new BinaryFormatter(); + using (var ms = new MemoryStream()) + { + bf.Serialize(ms, obj); + return ms.ToArray(); + } + } + + public static T Deserialize(this byte[] byteArray) where T : class + { + if (byteArray == null) + { + return null; + } + using (var memStream = new MemoryStream()) + { + var binForm = new BinaryFormatter(); + memStream.Write(byteArray, 0, byteArray.Length); + memStream.Seek(0, SeekOrigin.Begin); + var obj = (T)binForm.Deserialize(memStream); + return obj; + } + } + } +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/ARKitRemote/ObjectSerializationExtension.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/ObjectSerializationExtension.cs.meta new file mode 100644 index 00000000..7d5a4c9a --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/ObjectSerializationExtension.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 93eca58af117741f3be69b00a1cc4077 +timeCreated: 1498702127 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/SerializableObjects.cs b/Assets/UnityARKitPlugin/ARKitRemote/SerializableObjects.cs new file mode 100644 index 00000000..9a7f00d9 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/SerializableObjects.cs @@ -0,0 +1,670 @@ +using System; +using UnityEngine; +using UnityEngine.XR.iOS; +using System.Text; +using System.Collections.Generic; + +namespace UnityEngine.XR.iOS.Utils +{ + /// + /// Since unity doesn't flag the Vector4 as serializable, we + /// need to create our own version. This one will automatically convert + /// between Vector4 and SerializableVector4 + /// + [Serializable] + public class SerializableVector4 + { + /// + /// x component + /// + public float x; + + /// + /// y component + /// + public float y; + + /// + /// z component + /// + public float z; + + /// + /// w component + /// + public float w; + + /// + /// Constructor + /// + /// + /// + /// + /// + public SerializableVector4(float rX, float rY, float rZ, float rW) + { + x = rX; + y = rY; + z = rZ; + w = rW; + } + + /// + /// Returns a string representation of the object + /// + /// + public override string ToString() + { + return String.Format("[{0}, {1}, {2}, {3}]", x, y, z, w); + } + + /// + /// Automatic conversion from SerializableVector4 to Vector4 + /// + /// + /// + public static implicit operator Vector4(SerializableVector4 rValue) + { + return new Vector4(rValue.x, rValue.y, rValue.z, rValue.w); + } + + /// + /// Automatic conversion from Vector4 to SerializableVector4 + /// + /// + /// + public static implicit operator SerializableVector4(Vector4 rValue) + { + return new SerializableVector4(rValue.x, rValue.y, rValue.z, rValue.w); + } + } + + [Serializable] + public class serializableUnityARMatrix4x4 + { + public SerializableVector4 column0; + public SerializableVector4 column1; + public SerializableVector4 column2; + public SerializableVector4 column3; + + public serializableUnityARMatrix4x4(SerializableVector4 v0, SerializableVector4 v1, SerializableVector4 v2, SerializableVector4 v3) + { + column0 = v0; + column1 = v1; + column2 = v2; + column3 = v3; + } + + /// + /// Automatic conversion from UnityARMatrix4x4 to serializableUnityARMatrix4x4 + /// + /// + /// + public static implicit operator serializableUnityARMatrix4x4(UnityARMatrix4x4 rValue) + { + return new serializableUnityARMatrix4x4(rValue.column0, rValue.column1, rValue.column2, rValue.column3); + } + + /// + /// Automatic conversion from serializableUnityARMatrix4x4 to UnityARMatrix4x4 + /// + /// + /// + public static implicit operator UnityARMatrix4x4(serializableUnityARMatrix4x4 rValue) + { + return new UnityARMatrix4x4(rValue.column0, rValue.column1, rValue.column2, rValue.column3); + } + + + public static implicit operator serializableUnityARMatrix4x4(Matrix4x4 rValue) + { + return new serializableUnityARMatrix4x4(rValue.GetColumn(0), rValue.GetColumn(1), rValue.GetColumn(2), rValue.GetColumn(3)); + } + + public static implicit operator Matrix4x4(serializableUnityARMatrix4x4 rValue) + { + #if UNITY_2017_1_OR_NEWER + return new Matrix4x4(rValue.column0, rValue.column1, rValue.column2, rValue.column3); + #else + Matrix4x4 mRet = new Matrix4x4 (); + mRet.SetColumn (0, rValue.column0); + mRet.SetColumn (1, rValue.column1); + mRet.SetColumn (2, rValue.column2); + mRet.SetColumn (3, rValue.column3); + return mRet; + #endif + } + + }; + + + [Serializable] + public class serializableSHC + { + public byte [] shcData; + + public serializableSHC(byte [] inputSHCData) + { + shcData = inputSHCData; + } + + public static implicit operator serializableSHC(float [] floatsSHC) + { + if (floatsSHC != null) + { + byte [] createBuf = new byte[floatsSHC.Length * sizeof(float)]; + for(int i = 0; i < floatsSHC.Length; i++) + { + Buffer.BlockCopy( BitConverter.GetBytes( floatsSHC[i] ), 0, createBuf, (i)*sizeof(float), sizeof(float) ); + } + return new serializableSHC (createBuf); + } + else + { + return new serializableSHC(null); + } + } + + public static implicit operator float [] (serializableSHC spc) + { + if (spc.shcData != null) + { + int numFloats = spc.shcData.Length / (sizeof(float)); + float [] shcFloats = new float[numFloats]; + for (int i = 0; i < numFloats; i++) + { + shcFloats [i] = BitConverter.ToSingle (spc.shcData, i * sizeof(float)); + } + return shcFloats; + } + else + { + return null; + } + } + + + }; + + [Serializable] + public class serializableUnityARLightData + { + public LightDataType whichLight; + public serializableSHC lightSHC; + public SerializableVector4 primaryLightDirAndIntensity; + public float ambientIntensity; + public float ambientColorTemperature; + + serializableUnityARLightData(UnityARLightData lightData) + { + whichLight = lightData.arLightingType; + if (whichLight == LightDataType.DirectionalLightEstimate) { + lightSHC = lightData.arDirectonalLightEstimate.sphericalHarmonicsCoefficients; + Vector3 lightDir = lightData.arDirectonalLightEstimate.primaryLightDirection; + float lightIntensity = lightData.arDirectonalLightEstimate.primaryLightIntensity; + primaryLightDirAndIntensity = new SerializableVector4 (lightDir.x, lightDir.y, lightDir.z, lightIntensity); + } else { + ambientIntensity = lightData.arLightEstimate.ambientIntensity; + ambientColorTemperature = lightData.arLightEstimate.ambientColorTemperature; + } + } + + public static implicit operator serializableUnityARLightData(UnityARLightData rValue) + { + return new serializableUnityARLightData(rValue); + } + + public static implicit operator UnityARLightData(serializableUnityARLightData rValue) + { + UnityARDirectionalLightEstimate udle = null; + UnityARLightEstimate ule = new UnityARLightEstimate (rValue.ambientIntensity, rValue.ambientColorTemperature); + + if (rValue.whichLight == LightDataType.DirectionalLightEstimate) { + Vector3 lightDir = new Vector3 (rValue.primaryLightDirAndIntensity.x, rValue.primaryLightDirAndIntensity.y, rValue.primaryLightDirAndIntensity.z); + udle = new UnityARDirectionalLightEstimate (rValue.lightSHC, lightDir, rValue.primaryLightDirAndIntensity.w); + } + + return new UnityARLightData(rValue.whichLight, ule, udle); + } + + } + + + [Serializable] + public class serializableUnityARCamera + { + public serializableUnityARMatrix4x4 worldTransform; + public serializableUnityARMatrix4x4 projectionMatrix; + public ARTrackingState trackingState; + public ARTrackingStateReason trackingReason; + public UnityVideoParams videoParams; + public serializableUnityARLightData lightData; + public serializablePointCloud pointCloud; + public serializableUnityARMatrix4x4 displayTransform; + public ARWorldMappingStatus worldMappingStatus; + + + public serializableUnityARCamera( serializableUnityARMatrix4x4 wt, serializableUnityARMatrix4x4 pm, ARTrackingState ats, ARTrackingStateReason atsr, UnityVideoParams uvp, UnityARLightData lightDat, serializableUnityARMatrix4x4 dt, serializablePointCloud spc, + ARWorldMappingStatus awms) + { + worldTransform = wt; + projectionMatrix = pm; + trackingState = ats; + trackingReason = atsr; + videoParams = uvp; + lightData = lightDat; + displayTransform = dt; + pointCloud = spc; + worldMappingStatus = awms; + } + #if UNITY_EDITOR + public static implicit operator UnityARCamera(serializableUnityARCamera rValue) + { + return new UnityARCamera (rValue.worldTransform, rValue.projectionMatrix, rValue.trackingState, rValue.trackingReason, rValue.videoParams, rValue.lightData, rValue.displayTransform, rValue.pointCloud, rValue.worldMappingStatus); + } + #else //!UNITY_EDITOR + public static implicit operator serializableUnityARCamera(UnityARCamera rValue) + { + return new serializableUnityARCamera(rValue.worldTransform, rValue.projectionMatrix, rValue.trackingState, rValue.trackingReason, rValue.videoParams, rValue.lightData, rValue.displayTransform, rValue.pointCloud, rValue.worldMappingStatus); + } + #endif + }; + + [Serializable] + public class serializablePlaneGeometry + { + public byte [] vertices; + public byte [] texCoords; + public byte [] triIndices; + public byte[] boundaryVertices; + + + public serializablePlaneGeometry(byte [] inputVertices, byte [] inputTexCoords, byte [] inputTriIndices, byte [] boundaryVerts) + { + vertices = inputVertices; + texCoords = inputTexCoords; + triIndices = inputTriIndices; + boundaryVertices = boundaryVerts; + + } + + #if !UNITY_EDITOR + public static implicit operator serializablePlaneGeometry(ARPlaneGeometry planeGeom) + { + if (planeGeom.vertexCount != 0 && planeGeom.textureCoordinateCount != 0 && planeGeom.triangleCount != 0) + { + Vector3 [] planeVertices = planeGeom.vertices; + byte [] cbVerts = new byte[planeGeom.vertexCount * sizeof(float) * 3]; + Buffer.BlockCopy( planeVertices, 0, cbVerts, 0, planeGeom.vertexCount * sizeof(float) * 3 ); + + Vector3 [] boundaryVertices = planeGeom.boundaryVertices; + byte [] cbBVerts = new byte[planeGeom.boundaryVertexCount * sizeof(float) * 3]; + Buffer.BlockCopy( boundaryVertices, 0, cbBVerts, 0, planeGeom.boundaryVertexCount * sizeof(float) * 3 ); + + + Vector2 [] planeTexCoords = planeGeom.textureCoordinates; + byte [] cbTexCoords = new byte[planeGeom.textureCoordinateCount * sizeof(float) * 2]; + Buffer.BlockCopy( planeTexCoords, 0, cbTexCoords, 0, planeGeom.textureCoordinateCount * sizeof(float) * 2 ); + + + int [] triIndices = planeGeom.triangleIndices; + byte [] cbTriIndices = triIndices.SerializeToByteArray(); + + return new serializablePlaneGeometry (cbVerts, cbTexCoords, cbTriIndices, cbBVerts); + } + else + { + return new serializablePlaneGeometry(null, null, null, null); + } + } + #endif //!UNITY_EDITOR + + public Vector3 [] Vertices { + get { + if (vertices != null) { + int numVectors = vertices.Length / (3 * sizeof(float)); + Vector3[] verticesVec = new Vector3[numVectors]; + for (int i = 0; i < numVectors; i++) { + int bufferStart = i * 3; + verticesVec [i].x = BitConverter.ToSingle (vertices, (bufferStart) * sizeof(float)); + verticesVec [i].y = BitConverter.ToSingle (vertices, (bufferStart + 1) * sizeof(float)); + verticesVec [i].z = BitConverter.ToSingle (vertices, (bufferStart + 2) * sizeof(float)); + + } + return verticesVec; + } else { + return null; + } + } + } + + public Vector3 [] BoundaryVertices { + get { + if (boundaryVertices != null) { + int numVectors = boundaryVertices.Length / (3 * sizeof(float)); + Vector3[] verticesVec = new Vector3[numVectors]; + for (int i = 0; i < numVectors; i++) { + int bufferStart = i * 3; + verticesVec [i].x = BitConverter.ToSingle (boundaryVertices, (bufferStart) * sizeof(float)); + verticesVec [i].y = BitConverter.ToSingle (boundaryVertices, (bufferStart + 1) * sizeof(float)); + verticesVec [i].z = BitConverter.ToSingle (boundaryVertices, (bufferStart + 2) * sizeof(float)); + + } + return verticesVec; + } else { + return null; + } + } + } + + public Vector2 [] TexCoords { + get { + if (texCoords != null) { + int numVectors = texCoords.Length / (2 * sizeof(float)); + Vector2[] texCoordVec = new Vector2[numVectors]; + for (int i = 0; i < numVectors; i++) { + int bufferStart = i * 2; + texCoordVec [i].x = BitConverter.ToSingle (texCoords, (bufferStart) * sizeof(float)); + texCoordVec [i].y = BitConverter.ToSingle (texCoords, (bufferStart + 1) * sizeof(float)); + + } + return texCoordVec; + } else { + return null; + } + } + } + + public int [] TriangleIndices { + get { + if (triIndices != null) { + int[] triIndexVec = triIndices.Deserialize(); + return triIndexVec; + } else { + return null; + } + } + } + + }; + + + [Serializable] + public class serializableUnityARPlaneAnchor + { + public serializableUnityARMatrix4x4 worldTransform; + public SerializableVector4 center; + public SerializableVector4 extent; + public ARPlaneAnchorAlignment planeAlignment; + public serializablePlaneGeometry planeGeometry; + public byte[] identifierStr; + + public serializableUnityARPlaneAnchor( serializableUnityARMatrix4x4 wt, SerializableVector4 ctr, SerializableVector4 ext, ARPlaneAnchorAlignment apaa, + serializablePlaneGeometry spg, byte [] idstr) + { + worldTransform = wt; + center = ctr; + extent = ext; + planeAlignment = apaa; + identifierStr = idstr; + planeGeometry = spg; + } + + #if UNITY_EDITOR + public static implicit operator ARPlaneAnchor(serializableUnityARPlaneAnchor rValue) + { + return new ARPlaneAnchor(rValue); + } + #else //!UNITY_EDITOR + public static implicit operator serializableUnityARPlaneAnchor(ARPlaneAnchor rValue) + { + serializableUnityARMatrix4x4 wt = rValue.transform; + SerializableVector4 ctr = new SerializableVector4 (rValue.center.x, rValue.center.y, rValue.center.z, 1.0f); + SerializableVector4 ext = new SerializableVector4 (rValue.extent.x, rValue.extent.y, rValue.extent.z, 1.0f); + byte[] idstr = Encoding.UTF8.GetBytes (rValue.identifier); + serializablePlaneGeometry spg = rValue.planeGeometry; + return new serializableUnityARPlaneAnchor(wt, ctr, ext, rValue.alignment, spg, idstr); + } + #endif + + }; + + + [Serializable] + public class serializableFaceGeometry + { + public byte [] vertices; + public byte [] texCoords; + public byte [] triIndices; + + + public serializableFaceGeometry(byte [] inputVertices, byte [] inputTexCoords, byte [] inputTriIndices) + { + vertices = inputVertices; + texCoords = inputTexCoords; + triIndices = inputTriIndices; + + } + + #if !UNITY_EDITOR + public static implicit operator serializableFaceGeometry(ARFaceGeometry faceGeom) + { + if (faceGeom.vertexCount != 0 && faceGeom.textureCoordinateCount != 0 && faceGeom.triangleCount != 0) + { + Vector3 [] faceVertices = faceGeom.vertices; + byte [] cbVerts = new byte[faceGeom.vertexCount * sizeof(float) * 3]; + Buffer.BlockCopy( faceVertices, 0, cbVerts, 0, faceGeom.vertexCount * sizeof(float) * 3 ); + + + Vector2 [] faceTexCoords = faceGeom.textureCoordinates; + byte [] cbTexCoords = new byte[faceGeom.textureCoordinateCount * sizeof(float) * 2]; + Buffer.BlockCopy( faceTexCoords, 0, cbTexCoords, 0, faceGeom.textureCoordinateCount * sizeof(float) * 2 ); + + + int [] triIndices = faceGeom.triangleIndices; + byte [] cbTriIndices = triIndices.SerializeToByteArray(); + + return new serializableFaceGeometry (cbVerts, cbTexCoords, cbTriIndices); + } + else + { + return new serializableFaceGeometry(null, null, null); + } + } + #endif //!UNITY_EDITOR + + public Vector3 [] Vertices { + get { + if (vertices != null) { + int numVectors = vertices.Length / (3 * sizeof(float)); + Vector3[] verticesVec = new Vector3[numVectors]; + for (int i = 0; i < numVectors; i++) { + int bufferStart = i * 3; + verticesVec [i].x = BitConverter.ToSingle (vertices, (bufferStart) * sizeof(float)); + verticesVec [i].y = BitConverter.ToSingle (vertices, (bufferStart + 1) * sizeof(float)); + verticesVec [i].z = BitConverter.ToSingle (vertices, (bufferStart + 2) * sizeof(float)); + + } + return verticesVec; + } else { + return null; + } + } + } + + public Vector2 [] TexCoords { + get { + if (texCoords != null) { + int numVectors = texCoords.Length / (2 * sizeof(float)); + Vector2[] texCoordVec = new Vector2[numVectors]; + for (int i = 0; i < numVectors; i++) { + int bufferStart = i * 2; + texCoordVec [i].x = BitConverter.ToSingle (texCoords, (bufferStart) * sizeof(float)); + texCoordVec [i].y = BitConverter.ToSingle (texCoords, (bufferStart + 1) * sizeof(float)); + + } + return texCoordVec; + } else { + return null; + } + } + } + + public int [] TriangleIndices { + get { + if (triIndices != null) { + int[] triIndexVec = triIndices.Deserialize(); + return triIndexVec; + } else { + return null; + } + } + } + + }; + + + [Serializable] + public class serializableUnityARFaceAnchor + { + public serializableUnityARMatrix4x4 worldTransform; + public serializableFaceGeometry faceGeometry; + public Dictionary arBlendShapes; + public byte[] identifierStr; + public bool isTracked; + + public serializableUnityARFaceAnchor( serializableUnityARMatrix4x4 wt, serializableFaceGeometry fg, Dictionary bs, byte [] idstr, bool bIsTracked) + { + worldTransform = wt; + faceGeometry = fg; + arBlendShapes = bs; + identifierStr = idstr; + isTracked = bIsTracked; + } + + + #if UNITY_EDITOR + public static implicit operator ARFaceAnchor(serializableUnityARFaceAnchor rValue) + { + return new ARFaceAnchor(rValue); + } + #else + public static implicit operator serializableUnityARFaceAnchor(ARFaceAnchor rValue) + { + serializableUnityARMatrix4x4 wt = rValue.transform; + serializableFaceGeometry sfg = rValue.faceGeometry; + byte[] idstr = Encoding.UTF8.GetBytes (rValue.identifierStr); + return new serializableUnityARFaceAnchor(wt, sfg, rValue.blendShapes, idstr, rValue.isTracked); + } + #endif + }; + + + [Serializable] + public class serializablePointCloud + { + public byte [] pointCloudData; + public byte[] pointCloudIds; + + public serializablePointCloud(byte [] inputPoints, byte [] inputIds) + { + pointCloudData = inputPoints; + pointCloudIds = inputIds; + } + + #if !UNITY_EDITOR + public static implicit operator serializablePointCloud(ARPointCloud pointCloud) + { + byte[] pointsBuf = null; + byte[] idsBuf = null; + + if (pointCloud != null) + { + Vector3[] vecPointCloud = pointCloud.Points; + if (vecPointCloud != null && vecPointCloud.Length > 0) + { + pointsBuf = new byte[vecPointCloud.Length * sizeof(float) * 3]; + for(int i = 0; i < vecPointCloud.Length; i++) + { + int bufferStart = i * 3; + Buffer.BlockCopy( BitConverter.GetBytes( vecPointCloud[i].x ), 0, pointsBuf, (bufferStart)*sizeof(float), sizeof(float) ); + Buffer.BlockCopy( BitConverter.GetBytes( vecPointCloud[i].y ), 0, pointsBuf, (bufferStart+1)*sizeof(float), sizeof(float) ); + Buffer.BlockCopy( BitConverter.GetBytes( vecPointCloud[i].z ), 0, pointsBuf, (bufferStart+2)*sizeof(float), sizeof(float) ); + + } + } + + UInt64 [] idsPointCloud = pointCloud.Identifiers; + if (idsPointCloud != null && idsPointCloud.Length > 0) + { + idsBuf = new byte[idsPointCloud.Length * sizeof(ulong)]; + Buffer.BlockCopy( BitConverter.GetBytes( idsPointCloud[0] ), 0, idsBuf, 0, idsPointCloud.Length * sizeof(ulong) ); + } + } + + return new serializablePointCloud(pointsBuf, idsBuf); + } + #else //in editor + public static implicit operator ARPointCloud (serializablePointCloud spc) + { + return new ARPointCloud(spc); + } + #endif + }; + + [Serializable] + public class serializableARSessionConfiguration + { + public UnityARAlignment alignment; + public UnityARPlaneDetection planeDetection; + public bool getPointCloudData; + public bool enableLightEstimation; + public bool enableAutoFocus; + + public serializableARSessionConfiguration(UnityARAlignment align, UnityARPlaneDetection planeDet, bool getPtCloud, bool enableLightEst, bool enableAutoFoc) + { + alignment = align; + planeDetection = planeDet; + getPointCloudData = getPtCloud; + enableLightEstimation = enableLightEst; + enableAutoFocus = enableAutoFoc; + } + + public static implicit operator serializableARSessionConfiguration(ARKitWorldTrackingSessionConfiguration awtsc) + { + return new serializableARSessionConfiguration (awtsc.alignment, awtsc.planeDetection, awtsc.getPointCloudData, awtsc.enableLightEstimation, awtsc.enableAutoFocus); + } + + public static implicit operator ARKitWorldTrackingSessionConfiguration (serializableARSessionConfiguration sasc) + { + return new ARKitWorldTrackingSessionConfiguration (sasc.alignment, sasc.planeDetection, sasc.getPointCloudData, sasc.enableLightEstimation, sasc.enableAutoFocus); + } + + public static implicit operator ARKitFaceTrackingConfiguration (serializableARSessionConfiguration sasc) + { + return new ARKitFaceTrackingConfiguration (sasc.alignment, sasc.enableLightEstimation); + } + + }; + + [Serializable] + public class serializableARKitInit + { + public serializableARSessionConfiguration config; + public UnityARSessionRunOption runOption; + + public serializableARKitInit(serializableARSessionConfiguration cfg, UnityARSessionRunOption option) + { + config = cfg; + runOption = option; + } + }; + + [Serializable] + public class serializableFromEditorMessage + { + public Guid subMessageId; + public serializableARKitInit arkitConfigMsg; + + }; +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/ARKitRemote/SerializableObjects.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/SerializableObjects.cs.meta new file mode 100644 index 00000000..a9a29989 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/SerializableObjects.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 80135f02c883b43c582626d2cd4d0190 +timeCreated: 1498702704 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/UnityARKitRemote.unity b/Assets/UnityARKitPlugin/ARKitRemote/UnityARKitRemote.unity new file mode 100644 index 00000000..1585942b --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/UnityARKitRemote.unity @@ -0,0 +1,302 @@ +%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: 8 + 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, g: 0, b: 0, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 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: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !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 + m_NavMeshData: {fileID: 0} +--- !u!1 &245454841 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 245454846} + - component: {fileID: 245454845} + - component: {fileID: 245454844} + - component: {fileID: 245454843} + - component: {fileID: 245454842} + - component: {fileID: 245454847} + - component: {fileID: 245454848} + - component: {fileID: 245454849} + 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 &245454842 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 245454841} + m_Enabled: 1 +--- !u!124 &245454843 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 245454841} + m_Enabled: 1 +--- !u!92 &245454844 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 245454841} + m_Enabled: 1 +--- !u!20 &245454845 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 245454841} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 30 + 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: 0 + m_AllowMSAA: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &245454846 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 245454841} + 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: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &245454847 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 245454841} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b70a2d547e0544c983e2dec3bf61d46, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &245454848 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 245454841} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!114 &245454849 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 245454841} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cdf0c6a69131b44f5bdb35de994fcea1, type: 3} + m_Name: + m_EditorClassIdentifier: + connectToEditor: {fileID: 245454847} +--- !u!1 &1976998943 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1976998945} + - component: {fileID: 1976998944} + 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 &1976998944 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1976998943} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + 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_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1976998945 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1976998943} + 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: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} diff --git a/Assets/UnityARKitPlugin/ARKitRemote/UnityARKitRemote.unity.meta b/Assets/UnityARKitPlugin/ARKitRemote/UnityARKitRemote.unity.meta new file mode 100644 index 00000000..e3958e12 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/UnityARKitRemote.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3ed73c0c9d4b76a418a0541c0cefd3ac +timeCreated: 1498647556 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/ARKitRemote/UnityRemoteVideo.cs b/Assets/UnityARKitPlugin/ARKitRemote/UnityRemoteVideo.cs new file mode 100644 index 00000000..2628d44b --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/UnityRemoteVideo.cs @@ -0,0 +1,114 @@ +using System; +using System.Runtime.InteropServices; +using UnityEngine; +using UnityEngine.Rendering; + +namespace UnityEngine.XR.iOS +{ + + public class UnityRemoteVideo : MonoBehaviour + { + public ConnectToEditor connectToEditor; + + private UnityARSessionNativeInterface m_Session; + private bool bTexturesInitialized; + + private int currentFrameIndex; + private byte[] m_textureYBytes; + private byte[] m_textureUVBytes; + private byte[] m_textureYBytes2; + private byte[] m_textureUVBytes2; + private GCHandle m_pinnedYArray; + private GCHandle m_pinnedUVArray; + + #if !UNITY_EDITOR && UNITY_IOS + + public void Start() + { + m_Session = UnityARSessionNativeInterface.GetARSessionNativeInterface (); + UnityARSessionNativeInterface.ARFrameUpdatedEvent += UpdateCamera; + currentFrameIndex = 0; + bTexturesInitialized = false; + } + + void UpdateCamera(UnityARCamera camera) + { + if (!bTexturesInitialized) { + InitializeTextures (camera); + } + UnityARSessionNativeInterface.ARFrameUpdatedEvent -= UpdateCamera; + + } + + void InitializeTextures(UnityARCamera camera) + { + int numYBytes = camera.videoParams.yWidth * camera.videoParams.yHeight; + int numUVBytes = camera.videoParams.yWidth * camera.videoParams.yHeight / 2; //quarter resolution, but two bytes per pixel + + m_textureYBytes = new byte[numYBytes]; + m_textureUVBytes = new byte[numUVBytes]; + m_textureYBytes2 = new byte[numYBytes]; + m_textureUVBytes2 = new byte[numUVBytes]; + m_pinnedYArray = GCHandle.Alloc (m_textureYBytes); + m_pinnedUVArray = GCHandle.Alloc (m_textureUVBytes); + bTexturesInitialized = true; + } + + IntPtr PinByteArray(ref GCHandle handle, byte[] array) + { + handle.Free (); + handle = GCHandle.Alloc (array, GCHandleType.Pinned); + return handle.AddrOfPinnedObject (); + } + + byte [] ByteArrayForFrame(int frame, byte[] array0, byte[] array1) + { + return frame == 1 ? array1 : array0; + } + + byte [] YByteArrayForFrame(int frame) + { + return ByteArrayForFrame (frame, m_textureYBytes, m_textureYBytes2); + } + + byte [] UVByteArrayForFrame(int frame) + { + return ByteArrayForFrame (frame, m_textureUVBytes, m_textureUVBytes2); + } + + void OnDestroy() + { + m_Session.SetCapturePixelData (false, IntPtr.Zero, IntPtr.Zero); + + m_pinnedYArray.Free (); + m_pinnedUVArray.Free (); + + } + + public void OnPreRender() + { + ARTextureHandles handles = m_Session.GetARVideoTextureHandles(); + if (handles.IsNull()) + { + return; + } + + if (!bTexturesInitialized) + return; + + currentFrameIndex = (currentFrameIndex + 1) % 2; + + Resolution currentResolution = Screen.currentResolution; + + + m_Session.SetCapturePixelData (true, PinByteArray(ref m_pinnedYArray,YByteArrayForFrame(currentFrameIndex)), PinByteArray(ref m_pinnedUVArray,UVByteArrayForFrame(currentFrameIndex))); + + connectToEditor.SendToEditor (ConnectionMessageIds.screenCaptureYMsgId, + CompressionHelper.ByteArrayCompress(YByteArrayForFrame(1-currentFrameIndex))); + connectToEditor.SendToEditor (ConnectionMessageIds.screenCaptureUVMsgId, + CompressionHelper.ByteArrayCompress(UVByteArrayForFrame(1-currentFrameIndex))); + + } + #endif + } +} diff --git a/Assets/UnityARKitPlugin/ARKitRemote/UnityRemoteVideo.cs.meta b/Assets/UnityARKitPlugin/ARKitRemote/UnityRemoteVideo.cs.meta new file mode 100644 index 00000000..80b104d8 --- /dev/null +++ b/Assets/UnityARKitPlugin/ARKitRemote/UnityRemoteVideo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cdf0c6a69131b44f5bdb35de994fcea1 +timeCreated: 1499380179 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples.meta b/Assets/UnityARKitPlugin/Examples.meta new file mode 100644 index 00000000..86725cf6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a143135f16d634fa9ba945abac98f63c +folderAsset: yes +timeCreated: 1496972798 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5.meta new file mode 100644 index 00000000..f6cce0c7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a01e87b51a8094ac78a016f24aa36126 +folderAsset: yes +timeCreated: 1517350660 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor.meta new file mode 100644 index 00000000..892a04fb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 22fdc45d7403c4fa4b40da55963ffcf1 +folderAsset: yes +timeCreated: 1517621849 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ARImagesSet_UnityLogo.asset b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ARImagesSet_UnityLogo.asset new file mode 100644 index 00000000..05b78343 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ARImagesSet_UnityLogo.asset @@ -0,0 +1,17 @@ +%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: 11500000, guid: 1c37f7746917f4760aa00e7ff7fd81dc, type: 3} + m_Name: ARImagesSet_UnityLogo + m_EditorClassIdentifier: + resourceGroupName: AR Rezources + referenceImages: + - {fileID: 11400000, guid: 9d6cedfb4c48647ca9007fb8cb8aa6b0, type: 2} + - {fileID: 11400000, guid: fa9c5deee83494083beea0977b5302c2, type: 2} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ARImagesSet_UnityLogo.asset.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ARImagesSet_UnityLogo.asset.meta new file mode 100644 index 00000000..f0b1671c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ARImagesSet_UnityLogo.asset.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 99f631f78c5d14f8cb9cc4e02da07eee +timeCreated: 1518054548 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/GenerateImageAnchor.cs b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/GenerateImageAnchor.cs new file mode 100644 index 00000000..6af24114 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/GenerateImageAnchor.cs @@ -0,0 +1,78 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class GenerateImageAnchor : MonoBehaviour { + + + [SerializeField] + private ARReferenceImage referenceImage; + + [SerializeField] + private GameObject prefabToGenerate; + + private GameObject imageAnchorGO; + + // Use this for initialization + void Start () { + UnityARSessionNativeInterface.ARImageAnchorAddedEvent += AddImageAnchor; + UnityARSessionNativeInterface.ARImageAnchorUpdatedEvent += UpdateImageAnchor; + UnityARSessionNativeInterface.ARImageAnchorRemovedEvent += RemoveImageAnchor; + + } + + void AddImageAnchor(ARImageAnchor arImageAnchor) + { + Debug.LogFormat("image anchor added[{0}] : tracked => {1}", arImageAnchor.identifier, arImageAnchor.isTracked); + if (arImageAnchor.referenceImageName == referenceImage.imageName) { + Vector3 position = UnityARMatrixOps.GetPosition (arImageAnchor.transform); + Quaternion rotation = UnityARMatrixOps.GetRotation (arImageAnchor.transform); + + imageAnchorGO = Instantiate (prefabToGenerate, position, rotation); + } + } + + void UpdateImageAnchor(ARImageAnchor arImageAnchor) + { + Debug.LogFormat("image anchor updated[{0}] : tracked => {1}", arImageAnchor.identifier, arImageAnchor.isTracked); + if (arImageAnchor.referenceImageName == referenceImage.imageName) { + if (arImageAnchor.isTracked) + { + if (!imageAnchorGO.activeSelf) + { + imageAnchorGO.SetActive(true); + } + imageAnchorGO.transform.position = UnityARMatrixOps.GetPosition(arImageAnchor.transform); + imageAnchorGO.transform.rotation = UnityARMatrixOps.GetRotation(arImageAnchor.transform); + } + else if (imageAnchorGO.activeSelf) + { + imageAnchorGO.SetActive(false); + } + } + + } + + void RemoveImageAnchor(ARImageAnchor arImageAnchor) + { + Debug.LogFormat("image anchor removed[{0}] : tracked => {1}", arImageAnchor.identifier, arImageAnchor.isTracked); + if (imageAnchorGO) { + GameObject.Destroy (imageAnchorGO); + } + + } + + void OnDestroy() + { + UnityARSessionNativeInterface.ARImageAnchorAddedEvent -= AddImageAnchor; + UnityARSessionNativeInterface.ARImageAnchorUpdatedEvent -= UpdateImageAnchor; + UnityARSessionNativeInterface.ARImageAnchorRemovedEvent -= RemoveImageAnchor; + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/GenerateImageAnchor.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/GenerateImageAnchor.cs.meta new file mode 100644 index 00000000..68bdc014 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/GenerateImageAnchor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4b2be1c5634b84e8080b2a2491eca344 +timeCreated: 1517621953 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages.meta new file mode 100644 index 00000000..3681235d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cfa39a9dbef344f5393dc1f3a82e9d79 +folderAsset: yes +timeCreated: 1517947942 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogoblackonwhite.jpg b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogoblackonwhite.jpg new file mode 100644 index 00000000..e939bcdd Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogoblackonwhite.jpg differ diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogoblackonwhite.jpg.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogoblackonwhite.jpg.meta new file mode 100644 index 00000000..b5bb5dfb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogoblackonwhite.jpg.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: fd3329f8ed29741c29b3bf4b0032cab9 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogowhiteonblack.jpg b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogowhiteonblack.jpg new file mode 100644 index 00000000..f6b7435a Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogowhiteonblack.jpg differ diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogowhiteonblack.jpg.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogowhiteonblack.jpg.meta new file mode 100644 index 00000000..aa393cc7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/ReferenceImages/unitylogowhiteonblack.jpg.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: f5f7b2e9e954b4a78ab3ac63fb17fb9c +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityARImageAnchor.unity b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityARImageAnchor.unity new file mode 100644 index 00000000..012e91ca --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityARImageAnchor.unity @@ -0,0 +1,809 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &236723161 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 236723163} + - component: {fileID: 236723162} + m_Layer: 0 + m_Name: GenerateImageAnchorCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &236723162 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 236723161} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b2be1c5634b84e8080b2a2491eca344, type: 3} + m_Name: + m_EditorClassIdentifier: + referenceImage: {fileID: 11400000, guid: fa9c5deee83494083beea0977b5302c2, type: 2} + prefabToGenerate: {fileID: 1483093577405612, guid: 9c8a1fc58df6b4d8c8c68e2883659c8a, + type: 2} +--- !u!4 &236723163 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 236723161} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 386, y: 718, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &925273665 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 925273666} + - component: {fileID: 925273667} + m_Layer: 0 + m_Name: GenerateImageAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &925273666 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925273665} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &925273667 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925273665} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b2be1c5634b84e8080b2a2491eca344, type: 3} + m_Name: + m_EditorClassIdentifier: + referenceImage: {fileID: 11400000, guid: 9d6cedfb4c48647ca9007fb8cb8aa6b0, type: 2} + prefabToGenerate: {fileID: 1283292900242102, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, + type: 2} +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 0 + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 + detectionImages: {fileID: 11400000, guid: 99f631f78c5d14f8cb9cc4e02da07eee, type: 2} + maximumNumberOfTrackedImages: 2 + detectionObjects: {fileID: 0} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityARImageAnchor.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityARImageAnchor.unity.meta new file mode 100644 index 00000000..a60fb7ff --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityARImageAnchor.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: befc06ba4fe0046439ef5dac5a33c0e7 +timeCreated: 1517621937 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoReferenceImage.asset b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoReferenceImage.asset new file mode 100644 index 00000000..4d134414 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoReferenceImage.asset @@ -0,0 +1,16 @@ +%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: 11500000, guid: 0414577f9c6b244e696949154859a4af, type: 3} + m_Name: UnityLogoReferenceImage + m_EditorClassIdentifier: + imageName: unitylogoreferenceimage + imageTexture: {fileID: 2800000, guid: fd3329f8ed29741c29b3bf4b0032cab9, type: 3} + physicalSize: 0.06 diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoReferenceImage.asset.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoReferenceImage.asset.meta new file mode 100644 index 00000000..5408ce88 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoReferenceImage.asset.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fa9c5deee83494083beea0977b5302c2 +timeCreated: 1520468043 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoWhiteOnBlack.asset b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoWhiteOnBlack.asset new file mode 100644 index 00000000..f8c18ddf --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoWhiteOnBlack.asset @@ -0,0 +1,16 @@ +%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: 11500000, guid: 0414577f9c6b244e696949154859a4af, type: 3} + m_Name: UnityLogoWhiteOnBlack + m_EditorClassIdentifier: + imageName: unitywhiteonblack + imageTexture: {fileID: 2800000, guid: f5f7b2e9e954b4a78ab3ac63fb17fb9c, type: 3} + physicalSize: 0.06 diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoWhiteOnBlack.asset.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoWhiteOnBlack.asset.meta new file mode 100644 index 00000000..3a4c37c0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARImageAnchor/UnityLogoWhiteOnBlack.asset.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9d6cedfb4c48647ca9007fb8cb8aa6b0 +timeCreated: 1518054500 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize.meta new file mode 100644 index 00000000..48ceb10d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bfeeb4a56cb7c4f9d8964859ba274911 +folderAsset: yes +timeCreated: 1517350675 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/RelocalizationControl.cs b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/RelocalizationControl.cs new file mode 100644 index 00000000..83d205f4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/RelocalizationControl.cs @@ -0,0 +1,47 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.XR.iOS; + +public class RelocalizationControl : MonoBehaviour { + + public Text buttonText; + public Text trackingStateText; + public Text trackingReasonText; + + // Use this for initialization + void Start () { + UnityARSessionNativeInterface.ARSessionShouldAttemptRelocalization = false; + UpdateText (); + + UnityARSessionNativeInterface.ARSessionTrackingChangedEvent += TrackingChanged; + } + + // Update is called once per frame + void Update () { + + } + + void TrackingChanged(UnityARCamera cam) + { + trackingStateText.text = cam.trackingState.ToString (); + trackingReasonText.text = cam.trackingReason.ToString (); + } + + void OnDestroy() + { + UnityARSessionNativeInterface.ARSessionTrackingChangedEvent -= TrackingChanged; + } + + void UpdateText() + { + buttonText.text = UnityARSessionNativeInterface.ARSessionShouldAttemptRelocalization ? "SHOULD RELOCALIZE" : "NO RELOCALIZE"; + } + + public void ToggleRelocalization() + { + UnityARSessionNativeInterface.ARSessionShouldAttemptRelocalization = !UnityARSessionNativeInterface.ARSessionShouldAttemptRelocalization; + UpdateText (); + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/RelocalizationControl.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/RelocalizationControl.cs.meta new file mode 100644 index 00000000..299dbd60 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/RelocalizationControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eac3ceb65349d46409ef81d356324ffb +timeCreated: 1517350960 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/UnityARKitRelocalize.unity b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/UnityARKitRelocalize.unity new file mode 100644 index 00000000..64960303 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/UnityARKitRelocalize.unity @@ -0,0 +1,1467 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &14396414 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 14396415} + - component: {fileID: 14396418} + - component: {fileID: 14396417} + - component: {fileID: 14396416} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &14396415 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + 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_Children: + - {fileID: 1654920540} + - {fileID: 1918392606} + - {fileID: 1450775215} + m_Father: {fileID: 0} + m_RootOrder: 7 + 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 &14396416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &14396417 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &14396418 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + 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!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!1 &514402023 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 514402026} + - component: {fileID: 514402025} + - component: {fileID: 514402024} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &514402024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &514402025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &514402026 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679869} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + m_Layer: 0 + m_Name: HitCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1052679869 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + 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!33 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 3 + getPointCloud: 1 + enableLightEstimation: 1 +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1052679871} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1450775214 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1450775215} + - component: {fileID: 1450775217} + - component: {fileID: 1450775216} + m_Layer: 5 + m_Name: TrackingReason + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1450775215 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450775214} + 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: [] + m_Father: {fileID: 14396415} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 600, y: 25} + m_SizeDelta: {x: 1000, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1450775216 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450775214} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9191176, g: 0.85153544, b: 0.85153544, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text New TextNew TextNew TextNew TextNew TextNew Text +--- !u!222 &1450775217 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450775214} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1566160547 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1566160549} + - component: {fileID: 1566160548} + m_Layer: 0 + m_Name: RelocalizationControlObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1566160548 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566160547} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eac3ceb65349d46409ef81d356324ffb, type: 3} + m_Name: + m_EditorClassIdentifier: + buttonText: {fileID: 1602518695} + trackingStateText: {fileID: 1918392607} + trackingReasonText: {fileID: 1450775216} +--- !u!4 &1566160549 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566160547} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1602518694 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1602518697} + - component: {fileID: 1602518696} + - component: {fileID: 1602518695} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1602518695 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602518694} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Button +--- !u!222 &1602518696 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602518694} +--- !u!224 &1602518697 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602518694} + 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: [] + m_Father: {fileID: 1654920540} + 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!1 &1654920539 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1654920540} + - component: {fileID: 1654920543} + - component: {fileID: 1654920542} + - component: {fileID: 1654920541} + m_Layer: 5 + m_Name: RelocalizeToggleButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1654920540 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1654920539} + 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: 1602518697} + m_Father: {fileID: 14396415} + 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: 400, y: -100} + m_SizeDelta: {x: 400, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1654920541 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1654920539} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1654920542} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1566160548} + m_MethodName: ToggleRelocalization + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1654920542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1654920539} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1654920543 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1654920539} +--- !u!1 &1918392605 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1918392606} + - component: {fileID: 1918392608} + - component: {fileID: 1918392607} + m_Layer: 5 + m_Name: TrackingState + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1918392606 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1918392605} + 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: [] + m_Father: {fileID: 14396415} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 600, y: 100} + m_SizeDelta: {x: 1000, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1918392607 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1918392605} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9191176, g: 0.85153544, b: 0.85153544, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &1918392608 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1918392605} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/UnityARKitRelocalize.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/UnityARKitRelocalize.unity.meta new file mode 100644 index 00000000..bf6d07b4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARKitRelocalize/UnityARKitRelocalize.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d44ef812aa5c94b71884c70a9518c644 +timeCreated: 1517350701 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh.meta new file mode 100644 index 00000000..9dd5ff45 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c21c1506d16bb4a12b0779f54965b0ef +folderAsset: yes +timeCreated: 1517429400 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh/UnityARPlaneMesh.unity b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh/UnityARPlaneMesh.unity new file mode 100644 index 00000000..6724f401 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh/UnityARPlaneMesh.unity @@ -0,0 +1,750 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 3 + getPointCloud: 1 + enableLightEstimation: 1 +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1454536478891118, guid: 24a8c4888599c4670ba129e2f2345e92, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh/UnityARPlaneMesh.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh/UnityARPlaneMesh.unity.meta new file mode 100644 index 00000000..e3f09d65 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPlaneMesh/UnityARPlaneMesh.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 80858f7f97efd46c1ae3ee51a3134eef +timeCreated: 1517431928 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds.meta new file mode 100644 index 00000000..afbbe420 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 51ec150ac2b9b41e0ae2e73f35de5965 +folderAsset: yes +timeCreated: 1543348434 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/PointCloudIdsExample.cs b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/PointCloudIdsExample.cs new file mode 100644 index 00000000..1aa52129 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/PointCloudIdsExample.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class PointCloudIdsExample : MonoBehaviour +{ + bool frameUpdated; + ulong[] m_PointCloudIdentifiers; + HashSet m_IdentifiersSeenSoFar; + int m_ExistingIdsSeen; + + void Start () + { + UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; + frameUpdated = false; + m_IdentifiersSeenSoFar = new HashSet(); + } + + void OnGUI() + { + int seenThisFrame = (m_PointCloudIdentifiers != null) ? m_PointCloudIdentifiers.Length : 0; + string formattedMessage = String.Format("{0} new/ {1} frame/ {2} seen", seenThisFrame-m_ExistingIdsSeen, seenThisFrame, m_IdentifiersSeenSoFar.Count ); + GUI.Label(new Rect(100, 100, 200, 40), formattedMessage); + } + + public void ARFrameUpdated(UnityARCamera camera) + { + if (camera.pointCloud != null) + { + m_PointCloudIdentifiers = camera.pointCloud.Identifiers; + } + frameUpdated = true; + } + + // Update is called once per frame + void Update () + { + if (frameUpdated) + { + m_ExistingIdsSeen = 0; + if (m_PointCloudIdentifiers != null && m_PointCloudIdentifiers.Length > 0) + { + foreach (var currentPointId in m_PointCloudIdentifiers) + { + if (m_IdentifiersSeenSoFar.Contains(currentPointId)) + { + m_ExistingIdsSeen++; + } + else + { + m_IdentifiersSeenSoFar.Add(currentPointId); + } + } + } + frameUpdated = false; + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/PointCloudIdsExample.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/PointCloudIdsExample.cs.meta new file mode 100644 index 00000000..fea860ac --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/PointCloudIdsExample.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 05e1e49fe7d42488697bb55de6470429 +timeCreated: 1543348655 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/UnityPointCloudIds.unity b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/UnityPointCloudIds.unity new file mode 100644 index 00000000..936077cf --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/UnityPointCloudIds.unity @@ -0,0 +1,817 @@ +%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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 1 + m_BakeResolution: 50 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 0 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_projectionMatrixMode: 1 + 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.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1087512205 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1087512206} + - component: {fileID: 1087512207} + m_Layer: 0 + m_Name: PointCloudIdsExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1087512206 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1087512205} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1087512207 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1087512205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 05e1e49fe7d42488697bb55de6470429, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 0 + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 0 + environmentTexturing: 0 + detectionImages: {fileID: 0} + maximumNumberOfTrackedImages: 0 + detectionObjects: {fileID: 0} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/UnityPointCloudIds.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/UnityPointCloudIds.unity.meta new file mode 100644 index 00000000..d74d3f09 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARPointCloudIds/UnityPointCloudIds.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e7b13cc3e03de46c3bdba51876cfc297 +timeCreated: 1543348497 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin.meta new file mode 100644 index 00000000..125f4e24 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7926aaa6453dd4c7f8a6c1490bf4c261 +folderAsset: yes +timeCreated: 1518205629 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/SetWorldOriginControl.cs b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/SetWorldOriginControl.cs new file mode 100644 index 00000000..c38dd78d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/SetWorldOriginControl.cs @@ -0,0 +1,24 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.XR.iOS; + +public class SetWorldOriginControl : MonoBehaviour { + + public Camera arCamera; + public Text positionText; + public Text rotationText; + + + // Update is called once per frame + void Update () { + positionText.text = "Camera position=" + arCamera.transform.position.ToString (); + rotationText.text = "Camera rotation=" + arCamera.transform.rotation.ToString (); + } + + public void SetWorldOrigin() + { + UnityARSessionNativeInterface.GetARSessionNativeInterface().SetWorldOrigin (arCamera.transform); + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/SetWorldOriginControl.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/SetWorldOriginControl.cs.meta new file mode 100644 index 00000000..720ca309 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/SetWorldOriginControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9617a86a116b6451da2a58f5828678d7 +timeCreated: 1518205921 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/UnityARSetWorldOrigin.unity b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/UnityARSetWorldOrigin.unity new file mode 100644 index 00000000..13ea15ff --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/UnityARSetWorldOrigin.unity @@ -0,0 +1,1469 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &14396414 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 14396415} + - component: {fileID: 14396418} + - component: {fileID: 14396417} + - component: {fileID: 14396416} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &14396415 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + 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_Children: + - {fileID: 1654920540} + - {fileID: 1918392606} + - {fileID: 1450775215} + m_Father: {fileID: 0} + m_RootOrder: 7 + 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 &14396416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &14396417 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &14396418 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + 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!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!1 &514402023 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 514402026} + - component: {fileID: 514402025} + - component: {fileID: 514402024} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &514402024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &514402025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &514402026 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679869} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + m_Layer: 0 + m_Name: HitCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1052679869 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + 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!33 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 3 + detectionImages: {fileID: 0} + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1052679871} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1450775214 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1450775215} + - component: {fileID: 1450775217} + - component: {fileID: 1450775216} + m_Layer: 5 + m_Name: Rotation + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1450775215 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450775214} + 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: [] + m_Father: {fileID: 14396415} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 600, y: 25} + m_SizeDelta: {x: 1000, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1450775216 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450775214} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9191176, g: 0.85153544, b: 0.85153544, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text New TextNew TextNew TextNew TextNew TextNew Text +--- !u!222 &1450775217 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450775214} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1566160547 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1566160549} + - component: {fileID: 1566160548} + m_Layer: 0 + m_Name: SetWorldOriginControlObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1566160548 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566160547} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9617a86a116b6451da2a58f5828678d7, type: 3} + m_Name: + m_EditorClassIdentifier: + arCamera: {fileID: 10} + positionText: {fileID: 1918392607} + rotationText: {fileID: 1450775216} +--- !u!4 &1566160549 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566160547} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1602518694 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1602518697} + - component: {fileID: 1602518696} + - component: {fileID: 1602518695} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1602518695 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602518694} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Set World Origin +--- !u!222 &1602518696 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602518694} +--- !u!224 &1602518697 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1602518694} + 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: [] + m_Father: {fileID: 1654920540} + 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!1 &1654920539 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1654920540} + - component: {fileID: 1654920543} + - component: {fileID: 1654920542} + - component: {fileID: 1654920541} + m_Layer: 5 + m_Name: SetWorldOriginButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1654920540 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1654920539} + 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: 1602518697} + m_Father: {fileID: 14396415} + 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: 400, y: -100} + m_SizeDelta: {x: 400, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1654920541 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1654920539} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1654920542} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1566160548} + m_MethodName: SetWorldOrigin + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1654920542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1654920539} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1654920543 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1654920539} +--- !u!1 &1918392605 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1918392606} + - component: {fileID: 1918392608} + - component: {fileID: 1918392607} + m_Layer: 5 + m_Name: Position + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1918392606 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1918392605} + 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: [] + m_Father: {fileID: 14396415} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 600, y: 100} + m_SizeDelta: {x: 1000, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1918392607 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1918392605} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9191176, g: 0.85153544, b: 0.85153544, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &1918392608 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1918392605} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/UnityARSetWorldOrigin.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/UnityARSetWorldOrigin.unity.meta new file mode 100644 index 00000000..efb6b287 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARSetWorldOrigin/UnityARSetWorldOrigin.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3a34cd3250ee14e1c802e3b4aed373c8 +timeCreated: 1518205870 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats.meta new file mode 100644 index 00000000..0550a69f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8426060d697694fdd83c1305e3d42641 +folderAsset: yes +timeCreated: 1518223278 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/FaceTrackingVideoFormatsExample.cs b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/FaceTrackingVideoFormatsExample.cs new file mode 100644 index 00000000..92dcf787 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/FaceTrackingVideoFormatsExample.cs @@ -0,0 +1,50 @@ +using UnityEngine; +using UnityEngine.XR.iOS; + + + +public class FaceTrackingVideoFormatsExample : MonoBehaviour { + + public Transform formatsParent; + public GameObject videoFormatButtonPrefab; + + // Use this for initialization + void Start () { + VideoFormatButton.FormatButtonPressedEvent += ExampletButtonPressed; + PopulateVideoFormatButtons (); + } + + void OnDestroy () { + VideoFormatButton.FormatButtonPressedEvent -= ExampletButtonPressed; + } + + void PopulateVideoFormatButtons() + { + foreach (UnityARVideoFormat vf in UnityARVideoFormat.SupportedFaceTrackingVideoFormats()) + { + GameObject go = Instantiate(videoFormatButtonPrefab, formatsParent); + VideoFormatButton vfb = go.GetComponent (); + if (vfb != null) { + vfb.Populate (vf); + } + } + } + + public void ExampletButtonPressed(UnityARVideoFormat videoFormat) + { + UnityARSessionNativeInterface session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + + var config = new ARKitFaceTrackingConfiguration(); + + if (config.IsSupported) { + config.alignment = UnityARAlignment.UnityARAlignmentGravity; + config.enableLightEstimation = true; + config.videoFormat = videoFormat.videoFormatPtr; + Application.targetFrameRate = videoFormat.framesPerSecond; + + UnityARSessionRunOption runOption = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking; + session.RunWithConfigAndOptions (config, runOption); + } + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/FaceTrackingVideoFormatsExample.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/FaceTrackingVideoFormatsExample.cs.meta new file mode 100644 index 00000000..b7a310bb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/FaceTrackingVideoFormatsExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dc619e8b2beea4a94ae40bf7520d95c3 +timeCreated: 1518224302 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARFaceTrackingVideoFormats.unity b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARFaceTrackingVideoFormats.unity new file mode 100644 index 00000000..ecbd6ef4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARFaceTrackingVideoFormats.unity @@ -0,0 +1,1336 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &14396414 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 14396415} + - component: {fileID: 14396418} + - component: {fileID: 14396417} + - component: {fileID: 14396416} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &14396415 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + 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_Children: + - {fileID: 1566929735} + m_Father: {fileID: 0} + m_RootOrder: 4 + 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 &14396416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &14396417 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &14396418 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + 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!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &274922019 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 274922020} + - component: {fileID: 274922023} + - component: {fileID: 274922022} + - component: {fileID: 274922021} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &274922020 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 274922019} + 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: 1189943984} + m_Father: {fileID: 1566929735} + 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: 1} +--- !u!114 &274922021 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 274922019} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &274922022 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 274922019} +--- !u!114 &274922023 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 274922019} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &514402023 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 514402026} + - component: {fileID: 514402025} + - component: {fileID: 514402024} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &514402024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &514402025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &514402026 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &719579884 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 719579885} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &719579885 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 719579884} + 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: 1614431146} + m_Father: {fileID: 1413404288} + 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: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraTracker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 961e52c3648614224b2a9dffa3055c07, type: 3} + m_Name: + m_EditorClassIdentifier: + trackedCamera: {fileID: 10} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1189943983 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1189943984} + - component: {fileID: 1189943985} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1189943984 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1189943983} + 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: [] + m_Father: {fileID: 274922020} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0.000013223545} + m_SizeDelta: {x: 0, y: 300} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1189943985 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1189943983} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 +--- !u!1 &1363382584 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1363382585} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1363382585 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1363382584} + 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: 1675014625} + m_Father: {fileID: 1682093431} + 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: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1413404287 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1413404288} + - component: {fileID: 1413404291} + - component: {fileID: 1413404290} + - component: {fileID: 1413404289} + m_Layer: 5 + m_Name: Scrollbar Vertical + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1413404288 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1413404287} + 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: 719579885} + m_Father: {fileID: 1566929735} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!114 &1413404289 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1413404287} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1614431147} + m_HandleRect: {fileID: 1614431146} + m_Direction: 2 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1413404290 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1413404287} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1413404291 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1413404287} +--- !u!1 &1566160547 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1566160549} + - component: {fileID: 1566160548} + m_Layer: 0 + m_Name: FaceTrackingVideoFormatExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1566160548 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566160547} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc619e8b2beea4a94ae40bf7520d95c3, type: 3} + m_Name: + m_EditorClassIdentifier: + formatsParent: {fileID: 1189943984} + videoFormatButtonPrefab: {fileID: 1036539979525446, guid: 95c6bff2dfc164406901450885b965af, + type: 2} +--- !u!4 &1566160549 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566160547} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1566929734 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1566929735} + - component: {fileID: 1566929738} + - component: {fileID: 1566929737} + - component: {fileID: 1566929736} + m_Layer: 5 + m_Name: Scroll View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1566929735 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566929734} + 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: 274922020} + - {fileID: 1682093431} + - {fileID: 1413404288} + m_Father: {fileID: 14396415} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -400, y: 156} + m_SizeDelta: {x: 530, y: 400} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1566929736 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566929734} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1566929737 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566929734} +--- !u!114 &1566929738 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566929734} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 1189943984} + m_Horizontal: 1 + m_Vertical: 1 + m_MovementType: 1 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 274922020} + m_HorizontalScrollbar: {fileID: 1682093432} + m_VerticalScrollbar: {fileID: 1413404289} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1614431145 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1614431146} + - component: {fileID: 1614431148} + - component: {fileID: 1614431147} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1614431146 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1614431145} + 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: [] + m_Father: {fileID: 719579885} + 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: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1614431147 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1614431145} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1614431148 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1614431145} +--- !u!1 &1675014624 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1675014625} + - component: {fileID: 1675014627} + - component: {fileID: 1675014626} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1675014625 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1675014624} + 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: [] + m_Father: {fileID: 1363382585} + 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: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1675014626 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1675014624} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1675014627 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1675014624} +--- !u!1 &1682093430 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1682093431} + - component: {fileID: 1682093434} + - component: {fileID: 1682093433} + - component: {fileID: 1682093432} + m_Layer: 5 + m_Name: Scrollbar Horizontal + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1682093431 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1682093430} + 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: 1363382585} + m_Father: {fileID: 1566929735} + m_RootOrder: 1 + 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: 20} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1682093432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1682093430} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1675014626} + m_HandleRect: {fileID: 1675014625} + m_Direction: 0 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1682093433 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1682093430} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1682093434 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1682093430} +--- !u!1 &1769114571 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1769114575} + - component: {fileID: 1769114574} + - component: {fileID: 1769114573} + - component: {fileID: 1769114572} + m_Layer: 0 + m_Name: ARFaceMeshManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1769114572 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1769114571} + m_Mesh: {fileID: 0} +--- !u!23 &1769114573 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1769114571} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!114 &1769114574 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1769114571} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: baec72e2006ae48df9dcbf0eb13377f9, type: 3} + m_Name: + m_EditorClassIdentifier: + meshFilter: {fileID: 1769114572} +--- !u!4 &1769114575 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1769114571} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: -180, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARFaceTrackingVideoFormats.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARFaceTrackingVideoFormats.unity.meta new file mode 100644 index 00000000..bcb6e398 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARFaceTrackingVideoFormats.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5a7424cf0b0f04d4ba41bd0858deea1b +timeCreated: 1543283147 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARVideoFormats.unity b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARVideoFormats.unity new file mode 100644 index 00000000..08932adb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARVideoFormats.unity @@ -0,0 +1,1800 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &14396414 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 14396415} + - component: {fileID: 14396418} + - component: {fileID: 14396417} + - component: {fileID: 14396416} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &14396415 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + 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_Children: + - {fileID: 1566929735} + m_Father: {fileID: 0} + m_RootOrder: 7 + 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 &14396416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &14396417 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &14396418 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14396414} + 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!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &274922019 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 274922020} + - component: {fileID: 274922023} + - component: {fileID: 274922022} + - component: {fileID: 274922021} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &274922020 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 274922019} + 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: 1189943984} + m_Father: {fileID: 1566929735} + 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: 1} +--- !u!114 &274922021 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 274922019} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &274922022 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 274922019} +--- !u!114 &274922023 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 274922019} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!1 &514402023 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 514402026} + - component: {fileID: 514402025} + - component: {fileID: 514402024} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &514402024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &514402025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &514402026 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 514402023} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &719579884 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 719579885} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &719579885 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 719579884} + 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: 1614431146} + m_Father: {fileID: 1413404288} + 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: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679869} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + m_Layer: 0 + m_Name: HitCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1052679869 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + 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!33 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 3 + detectionImages: {fileID: 0} + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1189943983 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1189943984} + - component: {fileID: 1189943985} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1189943984 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1189943983} + 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: [] + m_Father: {fileID: 274922020} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 300} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1189943985 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1189943983} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1052679871} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1363382584 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1363382585} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1363382585 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1363382584} + 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: 1675014625} + m_Father: {fileID: 1682093431} + 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: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1413404287 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1413404288} + - component: {fileID: 1413404291} + - component: {fileID: 1413404290} + - component: {fileID: 1413404289} + m_Layer: 5 + m_Name: Scrollbar Vertical + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1413404288 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1413404287} + 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: 719579885} + m_Father: {fileID: 1566929735} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!114 &1413404289 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1413404287} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1614431147} + m_HandleRect: {fileID: 1614431146} + m_Direction: 2 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1413404290 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1413404287} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1413404291 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1413404287} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1566160547 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1566160549} + - component: {fileID: 1566160548} + m_Layer: 0 + m_Name: VideoFormatExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1566160548 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566160547} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f8733413e47b0493a8897e36a496df50, type: 3} + m_Name: + m_EditorClassIdentifier: + formatsParent: {fileID: 1189943984} + videoFormatButtonPrefab: {fileID: 1036539979525446, guid: 95c6bff2dfc164406901450885b965af, + type: 2} +--- !u!4 &1566160549 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566160547} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1566929734 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1566929735} + - component: {fileID: 1566929738} + - component: {fileID: 1566929737} + - component: {fileID: 1566929736} + m_Layer: 5 + m_Name: Scroll View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1566929735 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566929734} + 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: 274922020} + - {fileID: 1682093431} + - {fileID: 1413404288} + m_Father: {fileID: 14396415} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -400, y: 156} + m_SizeDelta: {x: 530, y: 400} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1566929736 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566929734} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1566929737 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566929734} +--- !u!114 &1566929738 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1566929734} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 1189943984} + m_Horizontal: 1 + m_Vertical: 1 + m_MovementType: 1 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 274922020} + m_HorizontalScrollbar: {fileID: 1682093432} + m_VerticalScrollbar: {fileID: 1413404289} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1614431145 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1614431146} + - component: {fileID: 1614431148} + - component: {fileID: 1614431147} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1614431146 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1614431145} + 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: [] + m_Father: {fileID: 719579885} + 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: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1614431147 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1614431145} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1614431148 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1614431145} +--- !u!1 &1675014624 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1675014625} + - component: {fileID: 1675014627} + - component: {fileID: 1675014626} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1675014625 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1675014624} + 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: [] + m_Father: {fileID: 1363382585} + 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: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1675014626 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1675014624} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1675014627 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1675014624} +--- !u!1 &1682093430 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1682093431} + - component: {fileID: 1682093434} + - component: {fileID: 1682093433} + - component: {fileID: 1682093432} + m_Layer: 5 + m_Name: Scrollbar Horizontal + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1682093431 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1682093430} + 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: 1363382585} + m_Father: {fileID: 1566929735} + m_RootOrder: 1 + 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: 20} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1682093432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1682093430} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1675014626} + m_HandleRect: {fileID: 1675014625} + m_Direction: 0 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1682093433 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1682093430} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1682093434 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1682093430} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARVideoFormats.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARVideoFormats.unity.meta new file mode 100644 index 00000000..454aee99 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/UnityARVideoFormats.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a88a66a31e1c640bb8f6592ac0e4ee7f +timeCreated: 1518290295 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatButton.cs b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatButton.cs new file mode 100644 index 00000000..69e392f4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatButton.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.XR.iOS; + +public class VideoFormatButton : MonoBehaviour { + + public Text videoFormatDescription; + private UnityARVideoFormat arVideoFormat; + + public delegate void VideoFormatButtonPressed(UnityARVideoFormat videoFormat); + public static event VideoFormatButtonPressed FormatButtonPressedEvent; + + public void Populate(UnityARVideoFormat videoFormat) + { + arVideoFormat = videoFormat; + videoFormatDescription.text = "VideoFormat Resolution: " + videoFormat.imageResolutionWidth + "x" + videoFormat.imageResolutionHeight + " FPS: " + videoFormat.framesPerSecond; + } + + public void ButtonPressed() + { + if (FormatButtonPressedEvent != null) { + FormatButtonPressedEvent.Invoke (arVideoFormat); + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatButton.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatButton.cs.meta new file mode 100644 index 00000000..9805a633 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatButton.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2dc7312ca3b1549c6b07084d70ec4345 +timeCreated: 1518290389 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatsExample.cs b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatsExample.cs new file mode 100644 index 00000000..6aa516a8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatsExample.cs @@ -0,0 +1,57 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + + + +public class VideoFormatsExample : MonoBehaviour { + + public Transform formatsParent; + public GameObject videoFormatButtonPrefab; + + // Use this for initialization + void Start () { + VideoFormatButton.FormatButtonPressedEvent += ExampletButtonPressed; + PopulateVideoFormatButtons (); + } + + void OnDestroy () { + VideoFormatButton.FormatButtonPressedEvent -= ExampletButtonPressed; + } + + void PopulateVideoFormatButtons() + { + foreach (UnityARVideoFormat vf in UnityARVideoFormat.SupportedVideoFormats()) + { + GameObject go = Instantiate (videoFormatButtonPrefab, formatsParent); + VideoFormatButton vfb = go.GetComponent (); + if (vfb != null) { + vfb.Populate (vf); + } + } + } + + public void ExampletButtonPressed(UnityARVideoFormat videoFormat) + { + //Restart session with new video format in config + + UnityARSessionNativeInterface session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + + ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration(); + + if (config.IsSupported) { + config.planeDetection = UnityARPlaneDetection.HorizontalAndVertical; + config.alignment = UnityARAlignment.UnityARAlignmentGravity; + config.getPointCloudData = true; + config.enableLightEstimation = true; + config.enableAutoFocus = true; + config.videoFormat = videoFormat.videoFormatPtr; + Application.targetFrameRate = videoFormat.framesPerSecond; + + UnityARSessionRunOption runOption = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking; + session.RunWithConfigAndOptions (config, runOption); + } + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatsExample.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatsExample.cs.meta new file mode 100644 index 00000000..4304c01e --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit1.5/UnityARVideoFormats/VideoFormatsExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f8733413e47b0493a8897e36a496df50 +timeCreated: 1518224302 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0.meta new file mode 100644 index 00000000..01339694 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5afb0c06196084cc78ff12d7dc05de4d +folderAsset: yes +timeCreated: 1523485203 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture.meta new file mode 100644 index 00000000..c378a478 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 43d62f7feb3d040e88880a0627007c65 +folderAsset: yes +timeCreated: 1523650634 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/GenerateEnvironmentProbeAnchors.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/GenerateEnvironmentProbeAnchors.cs new file mode 100644 index 00000000..bf66a513 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/GenerateEnvironmentProbeAnchors.cs @@ -0,0 +1,75 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; +using Collections.Hybrid.Generic; + +public class GenerateEnvironmentProbeAnchors : MonoBehaviour { + + [SerializeField] + ReflectionProbeGameObject m_ReflectionProbePrefab; + + private LinkedListDictionary probeAnchorMap; + + + + void Start () + { + probeAnchorMap = new LinkedListDictionary (); + UnityARSessionNativeInterface.AREnvironmentProbeAnchorAddedEvent += EnvironmentProbeAnchorAdded; + UnityARSessionNativeInterface.AREnvironmentProbeAnchorRemovedEvent += EnvironmentProbeAnchorRemoved; + UnityARSessionNativeInterface.AREnvironmentProbeAnchorUpdatedEvent += EnvironmentProbeAnchorUpdated; + } + + void EnvironmentProbeAnchorUpdated (AREnvironmentProbeAnchor anchorData) + { + if (probeAnchorMap.ContainsKey (anchorData.identifier)) { + probeAnchorMap [anchorData.identifier].UpdateEnvironmentProbe(anchorData); + } + + } + + void EnvironmentProbeAnchorRemoved (AREnvironmentProbeAnchor anchorData) + { + if (probeAnchorMap.ContainsKey (anchorData.identifier)) { + ReflectionProbeGameObject rpgo = probeAnchorMap [anchorData.identifier]; + GameObject.Destroy (rpgo.gameObject); + probeAnchorMap.Remove (anchorData.identifier); + } + } + + void EnvironmentProbeAnchorAdded (AREnvironmentProbeAnchor anchorData) + { + ReflectionProbeGameObject go = GameObject.Instantiate (m_ReflectionProbePrefab); + if (go != null) + { + //do coordinate conversion from ARKit to Unity + go.transform.position = UnityARMatrixOps.GetPosition (anchorData.transform); + go.transform.rotation = UnityARMatrixOps.GetRotation (anchorData.transform); + + probeAnchorMap [anchorData.identifier] = go; + go.UpdateEnvironmentProbe (anchorData); + } + + } + + void OnDestroy() + { + UnityARSessionNativeInterface.AREnvironmentProbeAnchorAddedEvent -= EnvironmentProbeAnchorAdded; + UnityARSessionNativeInterface.AREnvironmentProbeAnchorRemovedEvent -= EnvironmentProbeAnchorRemoved; + UnityARSessionNativeInterface.AREnvironmentProbeAnchorUpdatedEvent -= EnvironmentProbeAnchorUpdated; + + foreach (ReflectionProbeGameObject rpgo in probeAnchorMap.Values) + { + GameObject.Destroy (rpgo); + } + + probeAnchorMap.Clear (); + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/GenerateEnvironmentProbeAnchors.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/GenerateEnvironmentProbeAnchors.cs.meta new file mode 100644 index 00000000..df0cc70e --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/GenerateEnvironmentProbeAnchors.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: dfed9f4e970f64caaa0ed9d980c26ce7 +timeCreated: 1524007750 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/HitCreateEnvironmentProbe.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/HitCreateEnvironmentProbe.cs new file mode 100644 index 00000000..84869513 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/HitCreateEnvironmentProbe.cs @@ -0,0 +1,98 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; +using System; + +public class HitCreateEnvironmentProbe : MonoBehaviour +{ + + public float maxRayDistance = 30.0f; + public LayerMask collisionLayer = 1 << 10; //ARKitPlane layer + + void CreateEnvironmentProbe(Matrix4x4 worldTransform) + { + //note we have not converted to Unity coord system yet, so we can pass it in directly + UnityAREnvironmentProbeAnchorData anchorData; + anchorData.ptrIdentifier = IntPtr.Zero; + anchorData.probeExtent = Vector3.one; + anchorData.transform = UnityARMatrixOps.GetMatrix (worldTransform); //this should be in ARKit coords + anchorData.cubemapData.cubemapPtr = IntPtr.Zero; + anchorData.cubemapData.textureFormat = UnityAREnvironmentTextureFormat.UnityAREnvironmentTextureFormatDefault; + anchorData.cubemapData.width = 0; + anchorData.cubemapData.height = 0; + anchorData.cubemapData.mipmapCount = 0; + anchorData = UnityARSessionNativeInterface.GetARSessionNativeInterface ().AddEnvironmentProbeAnchor (anchorData); + } + + bool HitTestWithResultType (ARPoint point, ARHitTestResultType resultTypes) + { + List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, resultTypes); + if (hitResults.Count > 0) { + foreach (var hitResult in hitResults) { + Debug.Log ("Got hit!"); + //note we have not converted to Unity coord system yet - since we are going to pass this back to ARKit + CreateEnvironmentProbe (hitResult.worldTransform); + return true; + } + } + return false; + } + + // Update is called once per frame + void Update () { + #if UNITY_EDITOR //we will only use this script on the editor side, though there is nothing that would prevent it from working on device + if (Input.GetMouseButtonDown (0)) { + Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); + RaycastHit hit; + + //we'll try to hit one of the plane collider gameobjects that were generated by the plugin + //effectively similar to calling HitTest with ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent + if (Physics.Raycast (ray, out hit, maxRayDistance, collisionLayer)) + { + //Create an environment probe anchor in editor + //we're going to get the position from the contact point + //m_HitTransform.position = hit.point; + //Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", m_HitTransform.position.x, m_HitTransform.position.y, m_HitTransform.position.z)); + + //and the rotation from the transform of the plane collider + //m_HitTransform.rotation = hit.transform.rotation; + } + } + #else + if (Input.touchCount > 0) + { + var touch = Input.GetTouch(0); + if (touch.phase == TouchPhase.Began) + { + var screenPosition = Camera.main.ScreenToViewportPoint(touch.position); + ARPoint point = new ARPoint { + x = screenPosition.x, + y = screenPosition.y + }; + + // prioritize reults types + ARHitTestResultType[] resultTypes = { + //ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingGeometry, + ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent, + // if you want to use infinite planes use this: + //ARHitTestResultType.ARHitTestResultTypeExistingPlane, + //ARHitTestResultType.ARHitTestResultTypeEstimatedHorizontalPlane, + //ARHitTestResultType.ARHitTestResultTypeEstimatedVerticalPlane, + ARHitTestResultType.ARHitTestResultTypeFeaturePoint + }; + + foreach (ARHitTestResultType resultType in resultTypes) + { + if (HitTestWithResultType (point, resultType)) + { + return; + } + } + } + } + #endif + + } + +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/HitCreateEnvironmentProbe.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/HitCreateEnvironmentProbe.cs.meta new file mode 100644 index 00000000..420ded36 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/HitCreateEnvironmentProbe.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 47459a3bcdc854c5492307466f92398e +timeCreated: 1524084457 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/ReflectionProbeGameObject.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/ReflectionProbeGameObject.cs new file mode 100644 index 00000000..1dc3a033 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/ReflectionProbeGameObject.cs @@ -0,0 +1,61 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +[RequireComponent(typeof(ReflectionProbe))] +public class ReflectionProbeGameObject : MonoBehaviour { + + ReflectionProbe reflectionProbe; + bool latchUpdate = false; + Cubemap latchedTexture = null; + + [SerializeField] + GameObject debugExtentGO; + + // Use this for initialization + void Start() + { + reflectionProbe = GetComponent (); + } + + + public void UpdateEnvironmentProbe(AREnvironmentProbeAnchor environmentProbeAnchor) + { + transform.position = UnityARMatrixOps.GetPosition (environmentProbeAnchor.transform); + + Quaternion rot = UnityARMatrixOps.GetRotation (environmentProbeAnchor.transform); + + //rot.z = -rot.z; + //rot.w = -rot.w; + + transform.rotation = rot; + + if (reflectionProbe != null) + { + reflectionProbe.size = environmentProbeAnchor.Extent; + } + + if (debugExtentGO != null) + { + debugExtentGO.transform.localScale = environmentProbeAnchor.Extent; + } + + latchedTexture = environmentProbeAnchor.Cubemap; + latchUpdate = true; + } + + void Update() + { + //always make sure to update texture in next update + if (latchUpdate && reflectionProbe != null) + { + if (reflectionProbe.customBakedTexture != null) + { + Object.Destroy(reflectionProbe.customBakedTexture); + } + reflectionProbe.customBakedTexture = latchedTexture; + latchUpdate = false; + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/ReflectionProbeGameObject.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/ReflectionProbeGameObject.cs.meta new file mode 100644 index 00000000..28def0e7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/ReflectionProbeGameObject.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 92d3ef5f820884ac4a1a0b78cea353af +timeCreated: 1524008371 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchor.unity b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchor.unity new file mode 100644 index 00000000..669ca5fb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchor.unity @@ -0,0 +1,427 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &538073466 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 538073467} + - component: {fileID: 538073468} + m_Layer: 0 + m_Name: GenerateEnvironmentProbeAnchors + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &538073467 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 538073466} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &538073468 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 538073466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dfed9f4e970f64caaa0ed9d980c26ce7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ReflectionProbePrefab: {fileID: 114202174001495314, guid: 209240d9a5b6a473d85f1c9ecc62698b, + type: 2} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 1 + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 + environmentTexturing: 2 + detectionImages: {fileID: 0} + maximumNumberOfTrackedImages: 0 + detectionObjects: {fileID: 0} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchor.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchor.unity.meta new file mode 100644 index 00000000..3bbd97eb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchor.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 90e8d78f99ddb4db1b5a7148d5d063b9 +timeCreated: 1524006207 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchorManual.unity b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchorManual.unity new file mode 100644 index 00000000..ada85147 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchorManual.unity @@ -0,0 +1,471 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &360535780 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 360535782} + - component: {fileID: 360535781} + m_Layer: 0 + m_Name: HitCreateEnvironmentProbe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &360535781 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 360535780} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 47459a3bcdc854c5492307466f92398e, type: 3} + m_Name: + m_EditorClassIdentifier: + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!4 &360535782 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 360535780} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &538073466 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 538073467} + - component: {fileID: 538073468} + m_Layer: 0 + m_Name: GenerateEnvironmentProbeAnchors + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &538073467 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 538073466} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &538073468 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 538073466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dfed9f4e970f64caaa0ed9d980c26ce7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ReflectionProbePrefab: {fileID: 114202174001495314, guid: 209240d9a5b6a473d85f1c9ecc62698b, + type: 2} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 1 + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 + environmentTexturing: 1 + detectionImages: {fileID: 0} + maximumNumberOfTrackedImages: 0 + detectionObjects: {fileID: 0} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchorManual.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchorManual.unity.meta new file mode 100644 index 00000000..6a12be5d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityAREnvironmentTexture/UnityAREnvironmentProbeAnchorManual.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5f542d5b0c973449d94b4c654c3587b8 +timeCreated: 1524006207 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor.meta new file mode 100644 index 00000000..720bd995 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 27514de6a60cf495790ec2b262d99195 +folderAsset: yes +timeCreated: 1523555567 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/CokeCanObject.asset b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/CokeCanObject.asset new file mode 100644 index 00000000..dd5d7ab7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/CokeCanObject.asset @@ -0,0 +1,15 @@ +%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: 11500000, guid: ea5fe5050450e46b696fbcff74cf3370, type: 3} + m_Name: CokeCanObject + m_EditorClassIdentifier: + objectName: cokeCan + referenceObject: {fileID: 102900000, guid: 03163c77b90434530bcfcb50f6da39f5, type: 3} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/CokeCanObject.asset.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/CokeCanObject.asset.meta new file mode 100644 index 00000000..022477a8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/CokeCanObject.asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e19bf88186ac942868db78225b734e9c +timeCreated: 1527702223 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ExampleObjectsSet.asset b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ExampleObjectsSet.asset new file mode 100644 index 00000000..b8696329 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ExampleObjectsSet.asset @@ -0,0 +1,16 @@ +%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: 11500000, guid: a5fac0b2c4da9499891f5a2e62563e15, type: 3} + m_Name: ExampleObjectsSet + m_EditorClassIdentifier: + resourceGroupName: ExampleObjectsResourceGroup + referenceObjectAssets: + - {fileID: 11400000, guid: e19bf88186ac942868db78225b734e9c, type: 2} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ExampleObjectsSet.asset.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ExampleObjectsSet.asset.meta new file mode 100644 index 00000000..0021f7d3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ExampleObjectsSet.asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0700ead5baf8b4b778809cd428565c03 +timeCreated: 1523901996 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/GenerateObjectAnchor.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/GenerateObjectAnchor.cs new file mode 100644 index 00000000..d50ed36f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/GenerateObjectAnchor.cs @@ -0,0 +1,66 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class GenerateObjectAnchor : MonoBehaviour +{ + + [SerializeField] + private ARReferenceObjectAsset referenceObjectAsset; + + [SerializeField] + private GameObject prefabToGenerate; + + private GameObject objectAnchorGO; + + // Use this for initialization + void Start () { + UnityARSessionNativeInterface.ARObjectAnchorAddedEvent += AddObjectAnchor; + UnityARSessionNativeInterface.ARObjectAnchorUpdatedEvent += UpdateObjectAnchor; + UnityARSessionNativeInterface.ARObjectAnchorRemovedEvent += RemoveObjectAnchor; + + } + + void AddObjectAnchor(ARObjectAnchor arObjectAnchor) + { + Debug.Log ("object anchor added"); + if (arObjectAnchor.referenceObjectName == referenceObjectAsset.objectName) { + Vector3 position = UnityARMatrixOps.GetPosition (arObjectAnchor.transform); + Quaternion rotation = UnityARMatrixOps.GetRotation (arObjectAnchor.transform); + + objectAnchorGO = Instantiate (prefabToGenerate, position, rotation); + } + } + + void UpdateObjectAnchor(ARObjectAnchor arObjectAnchor) + { + Debug.Log ("object anchor updated"); + if (arObjectAnchor.referenceObjectName == referenceObjectAsset.objectName) { + objectAnchorGO.transform.position = UnityARMatrixOps.GetPosition (arObjectAnchor.transform); + objectAnchorGO.transform.rotation = UnityARMatrixOps.GetRotation (arObjectAnchor.transform); + } + + } + + void RemoveObjectAnchor(ARObjectAnchor arObjectAnchor) + { + Debug.Log ("object anchor removed"); + if ((arObjectAnchor.referenceObjectName == referenceObjectAsset.objectName) && (objectAnchorGO != null)) { + GameObject.Destroy (objectAnchorGO); + } + } + + void OnDestroy() + { + UnityARSessionNativeInterface.ARObjectAnchorAddedEvent -= AddObjectAnchor; + UnityARSessionNativeInterface.ARObjectAnchorUpdatedEvent -= UpdateObjectAnchor; + UnityARSessionNativeInterface.ARObjectAnchorRemovedEvent -= RemoveObjectAnchor; + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/GenerateObjectAnchor.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/GenerateObjectAnchor.cs.meta new file mode 100644 index 00000000..21b25111 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/GenerateObjectAnchor.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5062efa1920ef4f8b93f82f869e65a8d +timeCreated: 1523558137 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects.meta new file mode 100644 index 00000000..0b4f1bf2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ecf5459ae4f86489a8975203db243ff6 +folderAsset: yes +timeCreated: 1523556077 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.arobject b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.arobject new file mode 100644 index 00000000..ab98c653 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.arobject differ diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.arobject.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.arobject.meta new file mode 100644 index 00000000..2fa119eb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.arobject.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 03163c77b90434530bcfcb50f6da39f5 +timeCreated: 1536711960 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.png b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.png new file mode 100644 index 00000000..cdf73b96 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.png differ diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.png.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.png.meta new file mode 100644 index 00000000..4117ceb7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/ReferenceObjects/cokeCan.png.meta @@ -0,0 +1,78 @@ +fileFormatVersion: 2 +guid: 4e913721b36df4a28958b9165bf4caa8 +timeCreated: 1536712552 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/UnityARObjectAnchor.unity b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/UnityARObjectAnchor.unity new file mode 100644 index 00000000..761d8961 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/UnityARObjectAnchor.unity @@ -0,0 +1,768 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &495387807 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 495387809} + - component: {fileID: 495387808} + m_Layer: 0 + m_Name: GenerateObjectAnchorCokeCan + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &495387808 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 495387807} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5062efa1920ef4f8b93f82f869e65a8d, type: 3} + m_Name: + m_EditorClassIdentifier: + referenceObjectAsset: {fileID: 11400000, guid: e19bf88186ac942868db78225b734e9c, + type: 2} + prefabToGenerate: {fileID: 1283292900242102, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, + type: 2} +--- !u!4 &495387809 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 495387807} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 0 + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 + environmentTexturing: 0 + detectionImages: {fileID: 0} + maximumNumberOfTrackedImages: 0 + detectionObjects: {fileID: 11400000, guid: 0700ead5baf8b4b778809cd428565c03, type: 2} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/UnityARObjectAnchor.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/UnityARObjectAnchor.unity.meta new file mode 100644 index 00000000..d256c638 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARObjectAnchor/UnityARObjectAnchor.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9b7966300d2d04d8e86ace41d59d178c +timeCreated: 1523558024 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap.meta new file mode 100644 index 00000000..db69dbbb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: dc17436be8ab140c4b1439118200cfb4 +folderAsset: yes +timeCreated: 1523485203 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMap.unity b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMap.unity new file mode 100644 index 00000000..7d48dcb5 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMap.unity @@ -0,0 +1,1875 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &228074202 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 228074203} + - component: {fileID: 228074205} + - component: {fileID: 228074204} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &228074203 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 228074202} + 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: [] + m_Father: {fileID: 1841742997} + 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!114 &228074204 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 228074202} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Load +--- !u!222 &228074205 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 228074202} +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!1 &520163593 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 520163597} + - component: {fileID: 520163596} + - component: {fileID: 520163595} + - component: {fileID: 520163594} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &520163594 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 520163593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &520163595 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 520163593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &520163596 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 520163593} + 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 &520163597 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 520163593} + 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_Children: + - {fileID: 2073111660} + - {fileID: 659143301} + - {fileID: 742568397} + m_Father: {fileID: 0} + m_RootOrder: 8 + 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!1 &555720247 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 555720248} + - component: {fileID: 555720249} + m_Layer: 0 + m_Name: AR3DOFCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &555720248 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &555720249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0ff614c6973544218b2c1e3036b8de0a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!1 &659143300 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 659143301} + - component: {fileID: 659143304} + - component: {fileID: 659143303} + - component: {fileID: 659143302} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &659143301 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 659143300} + 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: [] + m_Father: {fileID: 520163597} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.35341156, y: 0.89400005} + m_AnchorMax: {x: 0.91362816, y: 0.9655338} + m_AnchoredPosition: {x: 0.0000076294, y: -0.025024} + m_SizeDelta: {x: 0, y: -0.049957} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &659143302 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 659143300} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b59e1037d79d44fe59df4b634a2862e5, type: 3} + m_Name: + m_EditorClassIdentifier: + text: {fileID: 659143303} + tracking: {fileID: 742568398} +--- !u!114 &659143303 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 659143300} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7794118, g: 0.1260813, b: 0.1260813, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 48 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Init +--- !u!222 &659143304 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 659143300} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &742568396 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 742568397} + - component: {fileID: 742568399} + - component: {fileID: 742568398} + m_Layer: 5 + m_Name: TextTracking + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &742568397 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742568396} + 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: [] + m_Father: {fileID: 520163597} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.35341156, y: 0.744} + m_AnchorMax: {x: 0.91362816, y: 0.82800007} + m_AnchoredPosition: {x: 6.1, y: -0.00007534} + m_SizeDelta: {x: -12.1, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &742568398 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742568396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7794118, g: 0.1260813, b: 0.1260813, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 48 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Init +--- !u!222 &742568399 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742568396} +--- !u!1 &744986759 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 744986761} + - component: {fileID: 744986760} + m_Layer: 0 + m_Name: WorldMapManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &744986760 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 744986759} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b560694452f2c4413b835be89150c3ca, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ARCameraManager: {fileID: 1121666030} +--- !u!4 &744986761 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 744986759} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &947883105 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 947883108} + - component: {fileID: 947883107} + - component: {fileID: 947883106} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &947883106 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &947883107 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &947883108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679869} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + m_Layer: 0 + m_Name: HitCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &1052679869 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + 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!33 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 3 + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 + environmentTexturing: 0 + detectionImages: {fileID: 0} + maximumNumberOfTrackedImages: 0 + detectionObjects: {fileID: 0} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1153389248 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1153389250} + - component: {fileID: 1153389249} + m_Layer: 0 + m_Name: ARKitControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1153389249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4977b930c0f8843c8b8a101ba5bf3c8f, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1153389250 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1052679871} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1319645973 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1319645974} + - component: {fileID: 1319645976} + - component: {fileID: 1319645975} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1319645974 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1319645973} + 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: [] + m_Father: {fileID: 1587227112} + 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!114 &1319645975 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1319645973} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Save +--- !u!222 &1319645976 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1319645973} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1587227111 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1587227112} + - component: {fileID: 1587227115} + - component: {fileID: 1587227114} + - component: {fileID: 1587227113} + m_Layer: 5 + m_Name: Save button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1587227112 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1587227111} + 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: 1319645974} + m_Father: {fileID: 2073111660} + 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.5, y: 0.5} +--- !u!114 &1587227113 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1587227111} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1587227114} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 744986760} + m_MethodName: Save + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1587227114 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1587227111} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1587227115 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1587227111} +--- !u!1 &1841742996 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1841742997} + - component: {fileID: 1841743000} + - component: {fileID: 1841742999} + - component: {fileID: 1841742998} + m_Layer: 5 + m_Name: Load button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1841742997 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1841742996} + 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: 228074203} + m_Father: {fileID: 2073111660} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1841742998 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1841742996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1841742999} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 744986760} + m_MethodName: Load + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1841742999 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1841742996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1841743000 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1841742996} +--- !u!1 &2073111659 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2073111660} + - component: {fileID: 2073111661} + m_Layer: 5 + m_Name: Layout + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2073111660 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2073111659} + 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: 1587227112} + - {fileID: 1841742997} + m_Father: {fileID: 520163597} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.032411557, y: 0.72262573} + m_AnchorMax: {x: 0.19000001, y: 0.9655338} + m_AnchoredPosition: {x: 5.360901, y: 0.000030517578} + m_SizeDelta: {x: -10.7, y: -0.00012207} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2073111661 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2073111659} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 0 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &2101518924 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2101518926} + - component: {fileID: 2101518925} + m_Layer: 0 + m_Name: PointCloudExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &2101518925 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c5ab0fdfbf2334e8dbbcdda6ceada7e3, type: 3} + m_Name: + m_EditorClassIdentifier: + numPointsToShow: 400 + PointCloudPrefab: {fileID: 1845574417345784, guid: 02d2a544d8d594d30b790e76398d0873, + type: 2} +--- !u!4 &2101518926 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.16720128, y: 0.18012214, z: 1.1454113} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMap.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMap.unity.meta new file mode 100644 index 00000000..ff08deb2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMap.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ee2777dc048a5482db055433cf94aa0e +timeCreated: 1523485203 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMapSerialized.unity b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMapSerialized.unity new file mode 100644 index 00000000..292d3233 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMapSerialized.unity @@ -0,0 +1,1875 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &228074202 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 228074203} + - component: {fileID: 228074205} + - component: {fileID: 228074204} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &228074203 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 228074202} + 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: [] + m_Father: {fileID: 1841742997} + 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!114 &228074204 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 228074202} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Load +--- !u!222 &228074205 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 228074202} +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!1 &520163593 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 520163597} + - component: {fileID: 520163596} + - component: {fileID: 520163595} + - component: {fileID: 520163594} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &520163594 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 520163593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &520163595 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 520163593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &520163596 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 520163593} + 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 &520163597 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 520163593} + 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_Children: + - {fileID: 2073111660} + - {fileID: 1872793935} + - {fileID: 855287996} + m_Father: {fileID: 0} + m_RootOrder: 8 + 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!1 &555720247 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 555720248} + - component: {fileID: 555720249} + m_Layer: 0 + m_Name: AR3DOFCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &555720248 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &555720249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0ff614c6973544218b2c1e3036b8de0a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &744986759 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 744986761} + - component: {fileID: 744986760} + m_Layer: 0 + m_Name: WorldMapManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &744986760 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 744986759} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b560694452f2c4413b835be89150c3ca, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ARCameraManager: {fileID: 1121666030} +--- !u!4 &744986761 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 744986759} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &855287995 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 855287996} + - component: {fileID: 855287998} + - component: {fileID: 855287997} + m_Layer: 5 + m_Name: TextTracking + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &855287996 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855287995} + 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: [] + m_Father: {fileID: 520163597} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.3035686, y: 0.72830063} + m_AnchorMax: {x: 0.92, y: 0.8104113} + m_AnchoredPosition: {x: -0.0025177, y: -0.000038147} + m_SizeDelta: {x: -0.0050049, y: -0.000038147} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &855287997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855287995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7794118, g: 0.1260813, b: 0.1260813, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 48 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Init +--- !u!222 &855287998 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855287995} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &947883105 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 947883108} + - component: {fileID: 947883107} + - component: {fileID: 947883106} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &947883106 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &947883107 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &947883108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679869} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + m_Layer: 0 + m_Name: HitCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &1052679869 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + 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!33 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 3 + getPointCloud: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 + environmentTexturing: 0 + detectionImages: {fileID: 0} + maximumNumberOfTrackedImages: 0 + detectionObjects: {fileID: 0} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1153389248 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1153389250} + - component: {fileID: 1153389249} + m_Layer: 0 + m_Name: ARKitControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1153389249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4977b930c0f8843c8b8a101ba5bf3c8f, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1153389250 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1052679871} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1319645973 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1319645974} + - component: {fileID: 1319645976} + - component: {fileID: 1319645975} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1319645974 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1319645973} + 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: [] + m_Father: {fileID: 1587227112} + 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!114 &1319645975 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1319645973} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Save +--- !u!222 &1319645976 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1319645973} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1587227111 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1587227112} + - component: {fileID: 1587227115} + - component: {fileID: 1587227114} + - component: {fileID: 1587227113} + m_Layer: 5 + m_Name: Save button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1587227112 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1587227111} + 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: 1319645974} + m_Father: {fileID: 2073111660} + 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.5, y: 0.5} +--- !u!114 &1587227113 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1587227111} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1587227114} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 744986760} + m_MethodName: SaveSerialized + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1587227114 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1587227111} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1587227115 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1587227111} +--- !u!1 &1841742996 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1841742997} + - component: {fileID: 1841743000} + - component: {fileID: 1841742999} + - component: {fileID: 1841742998} + m_Layer: 5 + m_Name: Load button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1841742997 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1841742996} + 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: 228074203} + m_Father: {fileID: 2073111660} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1841742998 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1841742996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1841742999} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 744986760} + m_MethodName: LoadSerialized + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1841742999 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1841742996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1841743000 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1841742996} +--- !u!1 &1872793934 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1872793935} + - component: {fileID: 1872793938} + - component: {fileID: 1872793937} + - component: {fileID: 1872793936} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1872793935 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1872793934} + 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: [] + m_Father: {fileID: 520163597} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.3035686, y: 0.87679756} + m_AnchorMax: {x: 0.92, y: 0.95523316} + m_AnchoredPosition: {x: -0.0025177, y: 0.0000033379} + m_SizeDelta: {x: -0.0050049, y: 0.00010681} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1872793936 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1872793934} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b59e1037d79d44fe59df4b634a2862e5, type: 3} + m_Name: + m_EditorClassIdentifier: + text: {fileID: 1872793937} + tracking: {fileID: 855287997} +--- !u!114 &1872793937 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1872793934} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7794118, g: 0.1260813, b: 0.1260813, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 48 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Init +--- !u!222 &1872793938 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1872793934} +--- !u!1 &2073111659 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2073111660} + - component: {fileID: 2073111661} + m_Layer: 5 + m_Name: Layout + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2073111660 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2073111659} + 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: 1587227112} + - {fileID: 1841742997} + m_Father: {fileID: 520163597} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.04129422, y: 0.72830063} + m_AnchorMax: {x: 0.22386281, y: 0.9644663} + m_AnchoredPosition: {x: 0.000048637, y: 0.000058651} + m_SizeDelta: {x: -0.000091553, y: 0.000061035} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2073111661 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2073111659} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 0 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &2101518924 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2101518926} + - component: {fileID: 2101518925} + m_Layer: 0 + m_Name: PointCloudExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &2101518925 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c5ab0fdfbf2334e8dbbcdda6ceada7e3, type: 3} + m_Name: + m_EditorClassIdentifier: + numPointsToShow: 400 + PointCloudPrefab: {fileID: 1845574417345784, guid: 02d2a544d8d594d30b790e76398d0873, + type: 2} +--- !u!4 &2101518926 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.16720128, y: 0.18012214, z: 1.1454113} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMapSerialized.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMapSerialized.unity.meta new file mode 100644 index 00000000..53361dec --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMapSerialized.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5886c251920f2454b98358e6027f37df +timeCreated: 1525822678 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UpdateWorldMappingStatus.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UpdateWorldMappingStatus.cs new file mode 100644 index 00000000..54bd057f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UpdateWorldMappingStatus.cs @@ -0,0 +1,31 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.XR.iOS; + +public class UpdateWorldMappingStatus : MonoBehaviour +{ + + public Text text; + public Text tracking; + + + // Use this for initialization + void Start () + { + UnityARSessionNativeInterface.ARFrameUpdatedEvent += CheckWorldMapStatus; + } + + void CheckWorldMapStatus(UnityARCamera cam) + { + text.text = cam.worldMappingStatus.ToString (); + tracking.text = cam.trackingState.ToString () + " " + cam.trackingReason.ToString (); + } + + void OnDestroy() + { + UnityARSessionNativeInterface.ARFrameUpdatedEvent -= CheckWorldMapStatus; + } + +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UpdateWorldMappingStatus.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UpdateWorldMappingStatus.cs.meta new file mode 100644 index 00000000..60784309 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UpdateWorldMappingStatus.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: b59e1037d79d44fe59df4b634a2862e5 +timeCreated: 1525988622 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/WorldMapManager.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/WorldMapManager.cs new file mode 100644 index 00000000..231af7b1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/WorldMapManager.cs @@ -0,0 +1,118 @@ +using System.IO; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class WorldMapManager : MonoBehaviour +{ + [SerializeField] + UnityARCameraManager m_ARCameraManager; + + ARWorldMap m_LoadedMap; + + serializableARWorldMap serializedWorldMap; + + // Use this for initialization + void Start () + { + UnityARSessionNativeInterface.ARFrameUpdatedEvent += OnFrameUpdate; + } + + ARTrackingStateReason m_LastReason; + + void OnFrameUpdate(UnityARCamera arCamera) + { + if (arCamera.trackingReason != m_LastReason) + { + Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None); + Debug.LogFormat("worldTransform: {0}", arCamera.worldTransform.column3); + Debug.LogFormat("trackingState: {0} {1}", arCamera.trackingState, arCamera.trackingReason); + m_LastReason = arCamera.trackingReason; + } + } + + static UnityARSessionNativeInterface session + { + get { return UnityARSessionNativeInterface.GetARSessionNativeInterface(); } + } + + static string path + { + get { return Path.Combine(Application.persistentDataPath, "myFirstWorldMap.worldmap"); } + } + + void OnWorldMap(ARWorldMap worldMap) + { + if (worldMap != null) + { + worldMap.Save(path); + Debug.LogFormat("ARWorldMap saved to {0}", path); + } + } + + public void Save() + { + session.GetCurrentWorldMapAsync(OnWorldMap); + } + + public void Load() + { + Debug.LogFormat("Loading ARWorldMap {0}", path); + var worldMap = ARWorldMap.Load(path); + if (worldMap != null) + { + m_LoadedMap = worldMap; + Debug.LogFormat("Map loaded. Center: {0} Extent: {1}", worldMap.center, worldMap.extent); + + UnityARSessionNativeInterface.ARSessionShouldAttemptRelocalization = true; + + var config = m_ARCameraManager.sessionConfiguration; + config.worldMap = worldMap; + UnityARSessionRunOption runOption = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking; + + Debug.Log("Restarting session with worldMap"); + session.RunWithConfigAndOptions(config, runOption); + + } + } + + + void OnWorldMapSerialized(ARWorldMap worldMap) + { + if (worldMap != null) + { + //we have an operator that converts a ARWorldMap to a serializableARWorldMap + serializedWorldMap = worldMap; + Debug.Log ("ARWorldMap serialized to serializableARWorldMap"); + } + } + + + public void SaveSerialized() + { + session.GetCurrentWorldMapAsync(OnWorldMapSerialized); + } + + public void LoadSerialized() + { + Debug.Log("Loading ARWorldMap from serialized data"); + //we have an operator that converts a serializableARWorldMap to a ARWorldMap + ARWorldMap worldMap = serializedWorldMap; + if (worldMap != null) + { + m_LoadedMap = worldMap; + Debug.LogFormat("Map loaded. Center: {0} Extent: {1}", worldMap.center, worldMap.extent); + + UnityARSessionNativeInterface.ARSessionShouldAttemptRelocalization = true; + + var config = m_ARCameraManager.sessionConfiguration; + config.worldMap = worldMap; + UnityARSessionRunOption runOption = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking; + + Debug.Log("Restarting session with worldMap"); + session.RunWithConfigAndOptions(config, runOption); + } + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/WorldMapManager.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/WorldMapManager.cs.meta new file mode 100644 index 00000000..ef3a59c0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/WorldMapManager.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: b560694452f2c4413b835be89150c3ca +timeCreated: 1523485295 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner.meta new file mode 100644 index 00000000..44844c5f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0314d9e49ee28428cb6f3c88775173be +folderAsset: yes +timeCreated: 1524091409 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/DetectedObjectManager.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/DetectedObjectManager.cs new file mode 100644 index 00000000..c8dd941c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/DetectedObjectManager.cs @@ -0,0 +1,86 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Collections.Hybrid.Generic; +using UnityEngine.XR.iOS; + +public class DetectedObjectManager : MonoBehaviour { + + public GameObject m_ObjectPrefab; + + private LinkedListDictionary objectAnchorMap; + + // Use this for initialization + void Start () { + objectAnchorMap = new LinkedListDictionary (); + UnityARSessionNativeInterface.ARObjectAnchorAddedEvent += ObjectAnchorAdded; + UnityARSessionNativeInterface.ARObjectAnchorRemovedEvent += ObjectAnchorRemoved; + UnityARSessionNativeInterface.ARObjectAnchorUpdatedEvent += ObjectAnchorUpdated; + } + + void ObjectAnchorUpdated (ARObjectAnchor anchorData) + { + Debug.Log ("ObjectAnchorUpdated"); + if (objectAnchorMap.ContainsKey (anchorData.referenceObjectName)) { + GameObject go = objectAnchorMap [anchorData.referenceObjectName]; + //do coordinate conversion from ARKit to Unity + go.transform.position = UnityARMatrixOps.GetPosition (anchorData.transform); + go.transform.rotation = UnityARMatrixOps.GetRotation (anchorData.transform); + + } + + } + + void ObjectAnchorRemoved (ARObjectAnchor anchorData) + { + Debug.Log ("ObjectAnchorRemoved"); + if (objectAnchorMap.ContainsKey (anchorData.referenceObjectName)) { + GameObject rpgo = objectAnchorMap [anchorData.referenceObjectName]; + GameObject.Destroy (rpgo.gameObject); + objectAnchorMap.Remove (anchorData.identifier); + } + } + + void ObjectAnchorAdded (ARObjectAnchor anchorData) + { + Debug.Log ("ObjectAnchorAdded"); + GameObject go = GameObject.Instantiate (m_ObjectPrefab); + if (go != null) + { + //do coordinate conversion from ARKit to Unity + go.transform.position = UnityARMatrixOps.GetPosition (anchorData.transform); + go.transform.rotation = UnityARMatrixOps.GetRotation (anchorData.transform); + + objectAnchorMap [anchorData.referenceObjectName] = go; + go.name = anchorData.referenceObjectName; + ObjectText objText = go.GetComponent (); + if (objText) + { + objText.UpdateTextMesh (anchorData.referenceObjectName); + } + + } + + } + + void OnDestroy() + { + UnityARSessionNativeInterface.ARObjectAnchorAddedEvent -= ObjectAnchorAdded; + UnityARSessionNativeInterface.ARObjectAnchorRemovedEvent -= ObjectAnchorRemoved; + UnityARSessionNativeInterface.ARObjectAnchorUpdatedEvent -= ObjectAnchorUpdated; + + foreach (GameObject rpgo in objectAnchorMap.Values) + { + GameObject.Destroy (rpgo); + } + + objectAnchorMap.Clear (); + + } + + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/DetectedObjectManager.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/DetectedObjectManager.cs.meta new file mode 100644 index 00000000..39438f02 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/DetectedObjectManager.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 987cc8d0095014a95b677de171700cab +timeCreated: 1524178753 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanManager.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanManager.cs new file mode 100644 index 00000000..6a45a4ea --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanManager.cs @@ -0,0 +1,124 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; +using System; +using UnityEngine.UI; +using System.IO; + +public class ObjectScanManager : MonoBehaviour { + + [SerializeField] + ObjectScanSessionManager m_ARSessionManager; + + [SerializeField] + Text listOfObjects; + + int objIndex = 0; + List scannedObjects; + bool detectionMode = false; + + private PickBoundingBox pickBoundingBox; + + void Start() + { + scannedObjects = new List (); + pickBoundingBox = GetComponent (); + } + + void OnDestroy() + { + ClearScannedObjects (); + } + + static UnityARSessionNativeInterface session + { + get { return UnityARSessionNativeInterface.GetARSessionNativeInterface(); } + } + + public void CreateReferenceObject() + { + //this script should be placed on the bounding volume GameObject + CreateReferenceObject (pickBoundingBox.transform, pickBoundingBox.bounds.center-pickBoundingBox.transform.position, pickBoundingBox.bounds.size); + } + + public void CreateReferenceObject(Transform objectTransform, Vector3 center, Vector3 extent) + { + session.ExtractReferenceObjectAsync (objectTransform, center, extent, (ARReferenceObject referenceObject) => { + if (referenceObject != null) { + Debug.LogFormat ("ARReferenceObject created: center {0} extent {1}", referenceObject.center, referenceObject.extent); + referenceObject.name = "objScan_" + objIndex++; + Debug.LogFormat ("ARReferenceObject has name {0}", referenceObject.name); + scannedObjects.Add(referenceObject); + UpdateList(); + } else { + Debug.Log ("Failed to create ARReferenceObject."); + } + }); + } + + void UpdateList() + { + string members = ""; + foreach (ARReferenceObject arro in scannedObjects) { + members += arro.name + ","; + } + listOfObjects.text = members; + } + + public void DetectScannedObjects(Text toChange) + { + detectionMode = !detectionMode; + if (detectionMode) { + StartDetecting (); + toChange.text = "Stop Detecting"; + } else { + m_ARSessionManager.StartObjectScanningSession (); + toChange.text = "Detect Objects"; + } + } + + private void StartDetecting() + { + //create a set out of the scanned objects + IntPtr ptrReferenceObjectsSet = session.CreateNativeReferenceObjectsSet(scannedObjects); + + //restart session without resetting tracking + var config = m_ARSessionManager.sessionConfiguration; + + //use object set from above to detect objects + config.dynamicReferenceObjectsPtr = ptrReferenceObjectsSet; + + //Debug.Log("Restarting session without resetting tracking"); + session.RunWithConfigAndOptions(config, UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking); + + } + + + public void ClearScannedObjects() + { + detectionMode = false; + scannedObjects.Clear (); + UpdateList (); + m_ARSessionManager.StartObjectScanningSession (); + } + + public void SaveScannedObjects() + { + if (scannedObjects.Count == 0) + return; + + string pathToSaveTo = Path.Combine(Application.persistentDataPath, "ARReferenceObjects"); + + if (!Directory.Exists (pathToSaveTo)) + { + Directory.CreateDirectory (pathToSaveTo); + } + + foreach (ARReferenceObject arro in scannedObjects) + { + string fullPath = Path.Combine (pathToSaveTo, arro.name + ".arobject"); + arro.Save (fullPath); + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanManager.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanManager.cs.meta new file mode 100644 index 00000000..6c1f7185 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanManager.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 89ea8e49a2d1a4f0abadbf08359b662e +timeCreated: 1524156699 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanSessionManager.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanSessionManager.cs new file mode 100644 index 00000000..2e4835a3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanSessionManager.cs @@ -0,0 +1,97 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class ObjectScanSessionManager : MonoBehaviour { + + public Camera m_camera; + private UnityARSessionNativeInterface m_session; + + [Header("AR Config Options")] + public UnityARAlignment startAlignment = UnityARAlignment.UnityARAlignmentGravity; + public UnityARPlaneDetection planeDetection = UnityARPlaneDetection.Horizontal; + public bool getPointCloudData = true; + public bool enableLightEstimation = true; + public bool enableAutoFocus = true; + + + private bool sessionStarted = false; + + public ARKitWorldTrackingSessionConfiguration sessionConfiguration + { + get + { + ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration (); + config.planeDetection = planeDetection; + config.alignment = startAlignment; + config.getPointCloudData = getPointCloudData; + config.enableLightEstimation = enableLightEstimation; + config.enableAutoFocus = enableAutoFocus; + + return config; + } + } + + //Warning: using this configuration is expensive CPU and battery-wise - use in limited amounts! + public ARKitObjectScanningSessionConfiguration objScanSessionConfiguration + { + get + { + ARKitObjectScanningSessionConfiguration config = new ARKitObjectScanningSessionConfiguration (); + config.planeDetection = planeDetection; + config.alignment = startAlignment; + config.getPointCloudData = getPointCloudData; + config.enableLightEstimation = enableLightEstimation; + config.enableAutoFocus = enableAutoFocus; + + return config; + } + } + + // Use this for initialization + void Start () { + m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + if (m_camera == null) { + m_camera = Camera.main; + } + Application.targetFrameRate = 60; + + StartObjectScanningSession (); + } + + + public void StartObjectScanningSession() + { + sessionStarted = false; + var config = objScanSessionConfiguration; + if (config.IsSupported) { + m_session.RunWithConfig (config); + UnityARSessionNativeInterface.ARFrameUpdatedEvent += FirstFrameUpdate; + } + } + + + void FirstFrameUpdate(UnityARCamera cam) + { + sessionStarted = true; + UnityARSessionNativeInterface.ARFrameUpdatedEvent -= FirstFrameUpdate; + } + + // Update is called once per frame + + void Update () { + + if (m_camera != null && sessionStarted) + { + // JUST WORKS! + Matrix4x4 matrix = m_session.GetCameraPose(); + m_camera.transform.localPosition = UnityARMatrixOps.GetPosition(matrix); + m_camera.transform.localRotation = UnityARMatrixOps.GetRotation (matrix); + + m_camera.projectionMatrix = m_session.GetCameraProjection (); + } + + } + +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanSessionManager.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanSessionManager.cs.meta new file mode 100644 index 00000000..9c1c24eb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectScanSessionManager.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 17a920f05ea314690b37dfab2c93e97b +timeCreated: 1527116937 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectText.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectText.cs new file mode 100644 index 00000000..26dc53b0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectText.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ObjectText : MonoBehaviour { + + public TextMesh textMesh; + + // Use this for initialization + void Start () { + + } + + public void UpdateTextMesh(string nameOfReferenceObject) + { + textMesh.text = nameOfReferenceObject; + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectText.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectText.cs.meta new file mode 100644 index 00000000..aa0bb186 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/ObjectText.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 39fb4afa2d68741688a6c32909d504c1 +timeCreated: 1524180519 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PickBoundingBox.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PickBoundingBox.cs new file mode 100644 index 00000000..a30fd332 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PickBoundingBox.cs @@ -0,0 +1,484 @@ +using System; +using System.Collections.Generic; + +namespace UnityEngine.XR.iOS +{ + public class PickBoundingBox : MonoBehaviour + { + public Bounds bounds + { + get + { + var center = (m_Bottom.position + m_Top.position) / 2f; + var size = new Vector3( + m_Right.localPosition.x - m_Left.localPosition.x, + m_Top.localPosition.y - m_Bottom.localPosition.y, + m_Front.localPosition.z - m_Back.localPosition.z); + + return new Bounds(center, size); + } + + set + { + var center = value.center; + var extents = value.extents; + var size = value.size; + + transform.position = center + Vector3.down * extents.y; + + m_Bottom.transform.localPosition = Vector3.zero; + m_Top.transform.localPosition = new Vector3(0f, size.y, 0f); + m_Left.transform.localPosition = new Vector3(-extents.x, extents.y, 0f); + m_Right.transform.localPosition = new Vector3(extents.x, extents.y, 0f); + m_Back.transform.localPosition = new Vector3(0f, extents.y, -extents.z); + m_Front.transform.localPosition = new Vector3(0f, extents.y, extents.z); + + m_Top.transform.localScale = new Vector3(size.x, 1f, size.z); + m_Bottom.transform.localScale = new Vector3(size.x, 1f, size.z); + m_Back.transform.localScale = new Vector3(size.x, size.y, 1f); + m_Front.transform.localScale = new Vector3(size.x, size.y, 1f); + m_Left.transform.localScale = new Vector3(1f, size.y, size.z); + m_Right.transform.localScale = new Vector3(1f, size.y, size.z); + } + } + + enum HitType + { + None, + BoxFace, + ARPlane, + Rotate + } + + [SerializeField] + Transform m_Top; + + [SerializeField] + Transform m_Bottom; + + [SerializeField] + Transform m_Left; + + [SerializeField] + Transform m_Right; + + [SerializeField] + Transform m_Back; + + [SerializeField] + Transform m_Front; + + [SerializeField] + Material m_UnselectedMaterial; + + [SerializeField] + Material m_SelectedMaterial; + + RaycastHit m_PhysicsHit; + + ARHitTestResult m_ARHit; + + Vector3 m_BeganFacePosition; + + HitType m_LastHitType = HitType.None; + + float m_InitialPinchDistance; + + Bounds m_InitialPinchBounds; + + const float k_PinchTurnRatio = Mathf.PI / 2; + + const float k_MinTurnAngle = 0f; + + const float k_PinchRatio = 1f; + + const float k_MinPinchDistance = 0f; + + float m_TurnAngleDelta; + + float m_PinchDistanceDelta; + + float m_PinchDistance; + + float rotationOnYAxis + { + get + { + return transform.rotation.eulerAngles.y; + } + + set + { + var euler = transform.eulerAngles; + euler.y = value; + transform.eulerAngles = euler; + } + } + + bool touched + { + get + { + return Input.GetMouseButton(0) || (Input.touchCount > 0); + } + } + + bool DoPhysicsRaycast(Touch touch, ref RaycastHit hitOut) + { + var ray = Camera.main.ScreenPointToRay(touch.position); + var layerMask = 1 << gameObject.layer; + RaycastHit hit; + if (!Physics.Raycast(ray, out hit, Mathf.Infinity, layerMask)) + return false; + + hitOut = hit; + return true; + } + + bool DoARRaycast(Touch touch, ref ARHitTestResult hitOut) + { + var screenPosition = Camera.main.ScreenToViewportPoint(touch.position); + ARPoint point = new ARPoint() + { + x = screenPosition.x, + y = screenPosition.y + }; + + var hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface().HitTest(point, ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent); + if (hitResults.Count < 1) + return false; + + hitOut = hitResults[0]; + return true; + } + + void SetFaceMaterial(Collider collider, Material material) + { + var meshRenderer = collider.gameObject.GetComponent(); + meshRenderer.material = material; + } + + void DoBegan(Touch touch) + { + if (Input.touchCount > 1) + return; + + m_LastHitType = HitType.None; + + // First, see if we hit any face + if (DoPhysicsRaycast(touch, ref m_PhysicsHit)) + { + m_LastHitType = HitType.BoxFace; + m_BeganFacePosition = GetFaceFromCollider(m_PhysicsHit.collider).position; + SetFaceMaterial(m_PhysicsHit.collider, m_SelectedMaterial); + return; + } + + // Check AR plane + ARHitTestResult arHit = new ARHitTestResult(); + if (DoARRaycast(touch, ref arHit)) + { + if (m_ARHit.anchorIdentifier != arHit.anchorIdentifier) + { + // This means we've hit a different plane, so move immediately + transform.position = UnityARMatrixOps.GetPosition(arHit.worldTransform); + } + + m_LastHitType = HitType.ARPlane; + m_ARHit = arHit; + } + } + + void DoRotateScale() + { + Calculate(); + + if (m_LastHitType != HitType.Rotate) + { + m_InitialPinchDistance = m_PinchDistance; + m_InitialPinchBounds = bounds; + } + + if (Mathf.Abs(m_TurnAngleDelta) > 0f) + rotationOnYAxis -= m_TurnAngleDelta; + + var scale = m_PinchDistance / m_InitialPinchDistance; + var size = m_InitialPinchBounds.size * scale; + if (size.x < .01f || size.y < 0.01f || size.z < 0.01f) + return; + + var center = bounds.center; + center = m_Bottom.position + Vector3.up * (size.y / 2f); + bounds = new Bounds(center, size); + } + + void DoMoved(Touch touch) + { + if (Input.touchCount == 2) + { + ResetMaterial(); + DoRotateScale(); + + // This prevents any other move logic from running + // until the number of touches drops back to zero. + m_LastHitType = HitType.Rotate; + } + else + { + switch (m_LastHitType) + { + case HitType.BoxFace: + MoveFace(touch); + break; + case HitType.ARPlane: + MovePlane(touch); + break; + } + } + } + + Transform GetFaceFromCollider(Collider collider) + { + return collider.gameObject.transform.parent.parent; + } + + void MoveFace(Touch touch) + { + // http://morroworks.com/Content/Docs/Rays%20closest%20point.pdf + + var faceTransform = GetFaceFromCollider(m_PhysicsHit.collider); + var a = m_PhysicsHit.normal; + var A = m_PhysicsHit.point; + + var ray = Camera.main.ScreenPointToRay(touch.position); + var b = ray.direction; + var B = ray.origin; + + // Compute 'delta', an offset on the ray defined by the hit's point and normal + // which is closest to the screen ray. A + delta would be the point on the face ray + // which is closest to the screen ray + var c = A - B; + var ab = Vector3.Dot(a, b); + var bc = Vector3.Dot(b, c); + var ac = Vector3.Dot(a, c); + var denom = 1f - ab * ab; + if (Mathf.Abs(denom) < 0.001f) + return; + + var delta = a * ((ab * bc - ac) / denom); + + faceTransform.position = m_BeganFacePosition + delta; + + if (faceTransform == m_Top || faceTransform == m_Bottom) + { + var length = m_Top.localPosition.y - m_Bottom.localPosition.y; + + AdjustY(m_Left, length); + AdjustY(m_Right, length); + AdjustY(m_Back, length); + AdjustY(m_Front, length); + } + + if (faceTransform == m_Left || faceTransform == m_Right) + { + var length = m_Right.localPosition.x - m_Left.localPosition.x; + + AdjustX(m_Bottom, length); + AdjustX(m_Top, length); + AdjustX(m_Back, length); + AdjustX(m_Front, length); + } + + if (faceTransform == m_Back || faceTransform == m_Front) + { + var length = m_Front.localPosition.z - m_Back.localPosition.z; + + AdjustZ(m_Top, length); + AdjustZ(m_Bottom, length); + AdjustZ(m_Left, length); + AdjustZ(m_Right, length); + } + + Recenter(); + } + + void Recenter() + { + // Recenter the box + var center = bounds.center; + var delta = center - transform.position; + delta.y = 0f; + transform.position += delta; + + m_Top.transform.position -= delta; + m_Bottom.transform.position -= delta; + m_Front.transform.position -= delta; + m_Back.transform.position -= delta; + m_Left.transform.position -= delta; + m_Right.transform.position -= delta; + } + + void AdjustX(Transform face, float length) + { + var localScale = face.localScale; + localScale.x = length; + face.localScale = localScale; + + var localPosition = face.localPosition; + localPosition.x = m_Left.localPosition.x + length / 2; + face.localPosition = localPosition; + } + + void AdjustY(Transform face, float length) + { + var localScale = face.localScale; + localScale.y = length; + face.localScale = localScale; + + var localPosition = face.localPosition; + localPosition.y = m_Bottom.localPosition.y + length / 2; + face.localPosition = localPosition; + } + + void AdjustZ(Transform face, float length) + { + var localScale = face.localScale; + localScale.z = length; + face.localScale = localScale; + + var localPosition = face.localPosition; + localPosition.z = m_Back.localPosition.z + length / 2; + face.localPosition = localPosition; + } + + void MovePlane(Touch touch) + { + ARHitTestResult arHit = new ARHitTestResult(); + if (DoARRaycast(touch, ref arHit)) + { + var hitPosition = UnityARMatrixOps.GetPosition(arHit.worldTransform); + + if (m_ARHit.anchorIdentifier != arHit.anchorIdentifier) + { + // This means we've hit a different plane, so move to it immediately + transform.position = hitPosition; + } + else + { + // Calculate the difference + var lastPosition = UnityARMatrixOps.GetPosition(m_ARHit.worldTransform); + var delta = hitPosition - lastPosition; + transform.position += delta; + } + + m_ARHit = arHit; + } + } + +#if UNITY_EDITOR + Vector3 m_LastTouchPosition; +#endif + + Touch GetTouch() + { +#if UNITY_EDITOR + var touch = new Touch(); + if (Input.GetMouseButtonDown(0)) + touch.phase = TouchPhase.Began; + else if (Input.GetMouseButton(0) && m_LastTouchPosition != Input.mousePosition) + touch.phase = TouchPhase.Moved; + else + touch.phase = TouchPhase.Stationary; + + touch.position = Input.mousePosition; + m_LastTouchPosition = touch.position; + return touch; +#else + return Input.GetTouch(0); +#endif + } + + void Update() + { + if (touched) + { + var touch = GetTouch(); + switch (touch.phase) + { + case TouchPhase.Began: + DoBegan(touch); + break; + case TouchPhase.Moved: + DoMoved(touch); + break; + } + } + else + { + ResetMaterial(); + m_LastHitType = HitType.None; + } + } + + void ResetMaterial() + { + if ((m_LastHitType == HitType.BoxFace) && (m_PhysicsHit.collider != null)) + SetFaceMaterial(m_PhysicsHit.collider, m_UnselectedMaterial); + } + + void Calculate() + { + m_PinchDistance = m_PinchDistanceDelta = 0f; + m_TurnAngleDelta = 0f; + + // if two fingers are touching the screen at the same time ... + if (Input.touchCount != 2) + return; + + Touch touch1 = Input.touches[0]; + Touch touch2 = Input.touches[1]; + + // ... if at least one of them moved ... + // if (touch1.phase != TouchPhase.Moved && touch2.phase != TouchPhase.Moved) + // return; + + // ... check the delta distance between them ... + m_PinchDistance = Vector2.Distance(touch1.position, touch2.position); + float prevDistance = Vector2.Distance(touch1.position - touch1.deltaPosition, + touch2.position - touch2.deltaPosition); + m_PinchDistanceDelta = m_PinchDistance - prevDistance; + + // ... if it's greater than a minimum threshold, it's a pinch! + if (Mathf.Abs(m_PinchDistanceDelta) > k_MinPinchDistance) { + m_PinchDistanceDelta *= k_PinchRatio; + } else { + m_PinchDistance = m_PinchDistanceDelta = 0; + } + + // ... or check the delta angle between them ... + var turnAngle = Angle(touch1.position, touch2.position); + float prevTurn = Angle(touch1.position - touch1.deltaPosition, + touch2.position - touch2.deltaPosition); + m_TurnAngleDelta = Mathf.DeltaAngle(prevTurn, turnAngle); + + // ... if it's greater than a minimum threshold, it's a turn! + if (Mathf.Abs(m_TurnAngleDelta) > k_MinTurnAngle) + m_TurnAngleDelta *= k_PinchTurnRatio; + } + + static float Angle (Vector2 pos1, Vector2 pos2) + { + Vector2 from = pos2 - pos1; + Vector2 to = new Vector2(1, 0); + + float result = Vector2.Angle( from, to ); + Vector3 cross = Vector3.Cross( from, to ); + + if (cross.z > 0f) + result = 360f - result; + + return result; + } + } +} + diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PickBoundingBox.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PickBoundingBox.cs.meta new file mode 100644 index 00000000..0ba91704 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PickBoundingBox.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 4d2687bd3ffe8429eb1a387f5598413c +timeCreated: 1523908858 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PrintBounds.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PrintBounds.cs new file mode 100644 index 00000000..44b86b4e --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PrintBounds.cs @@ -0,0 +1,29 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace UnityEngine.XR.iOS +{ + [RequireComponent(typeof(UnityEngine.UI.Text))] + public class PrintBounds : MonoBehaviour + { + [SerializeField] + PickBoundingBox m_Picker; + + Text m_BoundsText; + + void Start() + { + m_BoundsText = GetComponent(); + } + + // Update is called once per frame + void Update() + { + var bounds = m_Picker.bounds; + m_BoundsText.text = string.Format("Bounds:{0}", bounds.ToString("F2")) + string.Format(",size={0} ", bounds.size.ToString("F2")); + m_BoundsText.text += string.Format ("Transform.pos:{0} rot:{1}", m_Picker.transform.position.ToString ("F2"), m_Picker.transform.rotation.ToString ("F2")); + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PrintBounds.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PrintBounds.cs.meta new file mode 100644 index 00000000..bed15422 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/PrintBounds.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: a3894bd9b250945f19eb977dae78188d +timeCreated: 1523924951 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/UnityObjectScanner.unity b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/UnityObjectScanner.unity new file mode 100644 index 00000000..228169bd --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/UnityObjectScanner.unity @@ -0,0 +1,2760 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1001 &43367616 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 240125472} + m_Modifications: + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.x + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.z + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Name + value: Bottom + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 1424221161384634, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &43367617 stripped +Transform: + m_PrefabParentObject: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, + type: 2} + m_PrefabInternal: {fileID: 43367616} +--- !u!1 &186637783 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 186637784} + - component: {fileID: 186637786} + - component: {fileID: 186637785} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &186637784 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 186637783} + 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: [] + m_Father: {fileID: 1124492520} + 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!114 &186637785 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 186637783} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Clear Objects +--- !u!222 &186637786 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 186637783} +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &240125471 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 240125472} + m_Layer: 11 + m_Name: BottomParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &240125472 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 240125471} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 1, z: 0.1} + m_Children: + - {fileID: 43367617} + m_Father: {fileID: 2105024678} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &336245683 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 336245684} + - component: {fileID: 336245686} + - component: {fileID: 336245685} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &336245684 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 336245683} + 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: [] + m_Father: {fileID: 1450359361} + 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!114 &336245685 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 336245683} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Create Object +--- !u!222 &336245686 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 336245683} +--- !u!1 &365527399 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 365527400} + m_Layer: 11 + m_Name: FrontParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &365527400 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 365527399} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.05, z: 0.05} + m_LocalScale: {x: 0.1, y: 0.1, z: 1} + m_Children: + - {fileID: 660356438} + m_Father: {fileID: 2105024678} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &408484964 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 408484965} + - component: {fileID: 408484967} + - component: {fileID: 408484966} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &408484965 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 408484964} + 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: [] + m_Father: {fileID: 1466458554} + 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!114 &408484966 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 408484964} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Save Objects +--- !u!222 &408484967 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 408484964} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 500 + particleSize: 0.01 +--- !u!1 &506506027 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 506506028} + m_Layer: 11 + m_Name: TopParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &506506028 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 506506027} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.1, z: 0} + m_LocalScale: {x: 0.1, y: 1, z: 0.1} + m_Children: + - {fileID: 647952921} + m_Father: {fileID: 2105024678} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &519187371 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 519187373} + - component: {fileID: 519187372} + m_Layer: 0 + m_Name: ObjScanSessionManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &519187372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 519187371} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 17a920f05ea314690b37dfab2c93e97b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 1 + getPointCloudData: 1 + enableLightEstimation: 1 + enableAutoFocus: 1 +--- !u!4 &519187373 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 519187371} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &567648595 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 567648596} + - component: {fileID: 567648599} + - component: {fileID: 567648598} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &567648596 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 567648595} + 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: [] + m_Father: {fileID: 850784691} + 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!114 &567648598 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 567648595} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &567648599 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 567648595} +--- !u!1001 &589357555 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 982863011} + m_Modifications: + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Name + value: Back + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 1424221161384634, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &589357556 stripped +Transform: + m_PrefabParentObject: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, + type: 2} + m_PrefabInternal: {fileID: 589357555} +--- !u!1 &603632967 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 603632968} + - component: {fileID: 603632970} + - component: {fileID: 603632969} + m_Layer: 5 + m_Name: ButtonContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &603632968 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 603632967} + 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: 1450359361} + - {fileID: 1736104561} + - {fileID: 1124492520} + - {fileID: 1466458554} + m_Father: {fileID: 1668561367} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.044117343, y: 0.8708924} + m_AnchorMax: {x: 0.9398827, y: 0.97867954} + m_AnchoredPosition: {x: 11.429663, y: 1.8000488} + m_SizeDelta: {x: -22.9, y: 3.6001} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &603632969 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 603632967} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 0 + m_Spacing: 30 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!222 &603632970 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 603632967} +--- !u!1 &617451154 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 617451155} + - component: {fileID: 617451158} + - component: {fileID: 617451157} + m_Layer: 5 + m_Name: BoxBounds + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &617451155 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 617451154} + 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: 1471599124} + m_Father: {fileID: 2099945969} + 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.5, y: 0.5} +--- !u!114 &617451157 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 617451154} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &617451158 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 617451154} +--- !u!1001 &647952920 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 506506028} + m_Modifications: + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Name + value: Top + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 1424221161384634, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &647952921 stripped +Transform: + m_PrefabParentObject: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, + type: 2} + m_PrefabInternal: {fileID: 647952920} +--- !u!1001 &660356437 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 365527400} + m_Modifications: + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.y + value: 0.000001899898 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.z + value: 0.000001899898 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.y + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.w + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Name + value: Front + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.z + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 1424221161384634, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: -90 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &660356438 stripped +Transform: + m_PrefabParentObject: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, + type: 2} + m_PrefabInternal: {fileID: 660356437} +--- !u!1 &796484059 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 796484061} + - component: {fileID: 796484060} + m_Layer: 0 + m_Name: DetectionObjectManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &796484060 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 796484059} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 987cc8d0095014a95b677de171700cab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ObjectPrefab: {fileID: 1182685253350136, guid: c2c40ff3dd4b046f4a09d7d727a9d9d3, + type: 2} +--- !u!4 &796484061 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 796484059} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.05, z: -2.98} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &850784690 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 850784691} + - component: {fileID: 850784693} + - component: {fileID: 850784692} + m_Layer: 5 + m_Name: ListOfObjects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &850784691 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 850784690} + 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: 567648596} + m_Father: {fileID: 1558989019} + 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.5, y: 0.5} +--- !u!114 &850784692 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 850784690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &850784693 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 850784690} +--- !u!1 &855175345 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 855175346} + - component: {fileID: 855175348} + - component: {fileID: 855175347} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &855175346 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855175345} + 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: [] + m_Father: {fileID: 1736104561} + 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!114 &855175347 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855175345} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Detect Objects +--- !u!222 &855175348 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855175345} +--- !u!1 &947883105 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 947883108} + - component: {fileID: 947883107} + - component: {fileID: 947883106} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &947883106 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &947883107 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &947883108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 947883105} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &982863010 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 982863011} + m_Layer: 11 + m_Name: BackParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &982863011 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 982863010} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.05, z: -0.05} + m_LocalScale: {x: 0.1, y: 0.1, z: 1} + m_Children: + - {fileID: 589357556} + m_Father: {fileID: 2105024678} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + - component: {fileID: 1052679873} + m_Layer: 0 + m_Name: HitScanObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.05, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!114 &1052679873 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 89ea8e49a2d1a4f0abadbf08359b662e, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ARSessionManager: {fileID: 519187372} + listOfObjects: {fileID: 0} +--- !u!1 &1124492519 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1124492520} + - component: {fileID: 1124492523} + - component: {fileID: 1124492522} + - component: {fileID: 1124492521} + m_Layer: 5 + m_Name: ClearObjects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1124492520 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1124492519} + 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: 186637784} + m_Father: {fileID: 603632968} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &1124492521 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1124492519} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1124492522} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2105024676} + m_MethodName: ClearScannedObjects + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1124492522 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1124492519} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1124492523 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1124492519} +--- !u!1001 &1147504524 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1472952121} + m_Modifications: + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.x + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.z + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.w + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Name + value: Left + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.z + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1424221161384634, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1147504525 stripped +Transform: + m_PrefabParentObject: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, + type: 2} + m_PrefabInternal: {fileID: 1147504524} +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitScanObjectParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + 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: 1052679871} + - {fileID: 2105024678} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1450359360 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1450359361} + - component: {fileID: 1450359364} + - component: {fileID: 1450359363} + - component: {fileID: 1450359362} + m_Layer: 5 + m_Name: CreateObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1450359361 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450359360} + 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: 336245684} + m_Father: {fileID: 603632968} + 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.5, y: 0.5} +--- !u!114 &1450359362 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450359360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1450359363} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2105024676} + m_MethodName: CreateReferenceObject + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1450359363 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450359360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1450359364 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450359360} +--- !u!1 &1466458553 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1466458554} + - component: {fileID: 1466458557} + - component: {fileID: 1466458556} + - component: {fileID: 1466458555} + m_Layer: 5 + m_Name: SaveObjects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1466458554 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1466458553} + 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: 408484965} + m_Father: {fileID: 603632968} + m_RootOrder: 3 + 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.5, y: 0.5} +--- !u!114 &1466458555 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1466458553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1466458556} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2105024676} + m_MethodName: SaveScannedObjects + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1466458556 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1466458553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1466458557 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1466458553} +--- !u!1 &1471599123 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1471599124} + - component: {fileID: 1471599127} + - component: {fileID: 1471599126} + - component: {fileID: 1471599125} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1471599124 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1471599123} + 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: [] + m_Father: {fileID: 617451155} + 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!114 &1471599125 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1471599123} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a3894bd9b250945f19eb977dae78188d, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Picker: {fileID: 2105024677} +--- !u!114 &1471599126 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1471599123} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &1471599127 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1471599123} +--- !u!1 &1472952120 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1472952121} + m_Layer: 11 + m_Name: LeftParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1472952121 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1472952120} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.05, y: 0.05, z: 0} + m_LocalScale: {x: 1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1147504525} + m_Father: {fileID: 2105024678} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1507836920 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 2105024678} + m_Modifications: + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1507836921 stripped +Transform: + m_PrefabParentObject: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, + type: 2} + m_PrefabInternal: {fileID: 1507836920} +--- !u!1 &1558989018 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1558989019} + - component: {fileID: 1558989021} + - component: {fileID: 1558989020} + m_Layer: 5 + m_Name: TextContainer (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1558989019 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1558989018} + 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: 850784691} + m_Father: {fileID: 1668561367} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.24437015, y: 0.7798344} + m_AnchorMax: {x: 0.74500006, y: 0.85657066} + m_AnchoredPosition: {x: 0, y: 0.000061035156} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1558989020 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1558989018} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 0 + m_Spacing: 30 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!222 &1558989021 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1558989018} +--- !u!1 &1668561363 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1668561367} + - component: {fileID: 1668561366} + - component: {fileID: 1668561365} + - component: {fileID: 1668561364} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1668561364 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1668561363} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 3 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1668561365 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1668561363} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1668561366 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1668561363} + 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 &1668561367 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1668561363} + 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_Children: + - {fileID: 603632968} + - {fileID: 2099945969} + - {fileID: 1558989019} + m_Father: {fileID: 0} + m_RootOrder: 5 + 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!1 &1736104560 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1736104561} + - component: {fileID: 1736104564} + - component: {fileID: 1736104563} + - component: {fileID: 1736104562} + m_Layer: 5 + m_Name: DetectObjects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1736104561 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1736104560} + 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: 855175346} + m_Father: {fileID: 603632968} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1736104562 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1736104560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1736104563} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2105024676} + m_MethodName: DetectScannedObjects + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 855175347} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Text, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1736104563 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1736104560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1736104564 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1736104560} +--- !u!1 &1804222418 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1804222419} + m_Layer: 11 + m_Name: RightParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1804222419 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1804222418} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.05, y: 0.05, z: 0} + m_LocalScale: {x: 1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1994763036} + m_Father: {fileID: 2105024678} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1994763035 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1804222419} + m_Modifications: + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.z + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Name + value: Right + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalEulerAnglesHint.z + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 1106013321793048, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 1424221161384634, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_Layer + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5dcebda15b99e4457a22a698a16c0c4e, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1994763036 stripped +Transform: + m_PrefabParentObject: {fileID: 4063972062076818, guid: 5dcebda15b99e4457a22a698a16c0c4e, + type: 2} + m_PrefabInternal: {fileID: 1994763035} +--- !u!1 &2099945968 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2099945969} + - component: {fileID: 2099945971} + - component: {fileID: 2099945970} + m_Layer: 5 + m_Name: TextContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2099945969 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2099945968} + 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: 617451155} + m_Father: {fileID: 1668561367} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.24437015, y: 0.059785042} + m_AnchorMax: {x: 0.7608349, y: 0.16452338} + m_AnchoredPosition: {x: -2, y: -0.7000122} + m_SizeDelta: {x: -4, y: 8} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2099945970 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2099945968} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 0 + m_Spacing: 30 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!222 &2099945971 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2099945968} +--- !u!1 &2105024675 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2105024678} + - component: {fileID: 2105024677} + - component: {fileID: 2105024676} + m_Layer: 11 + m_Name: Bounding Box + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2105024676 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2105024675} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 89ea8e49a2d1a4f0abadbf08359b662e, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ARSessionManager: {fileID: 519187372} + listOfObjects: {fileID: 567648598} +--- !u!114 &2105024677 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2105024675} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d2687bd3ffe8429eb1a387f5598413c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Top: {fileID: 506506028} + m_Bottom: {fileID: 240125472} + m_Left: {fileID: 1472952121} + m_Right: {fileID: 1804222419} + m_Back: {fileID: 982863011} + m_Front: {fileID: 365527400} + m_UnselectedMaterial: {fileID: 2100000, guid: 0b37a3e843c7c41d897de1445ba4b187, + type: 2} + m_SelectedMaterial: {fileID: 2100000, guid: 57bf08b71b2b14f8995a08cfc781d4cf, type: 2} +--- !u!4 &2105024678 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2105024675} + 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: 506506028} + - {fileID: 240125472} + - {fileID: 1472952121} + - {fileID: 1804222419} + - {fileID: 365527400} + - {fileID: 982863011} + - {fileID: 1507836921} + m_Father: {fileID: 1286139108} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/UnityObjectScanner.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/UnityObjectScanner.unity.meta new file mode 100644 index 00000000..820f967f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityObjectScanner/UnityObjectScanner.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b2b783b17754448c29d3b316a4a366c0 +timeCreated: 1524091536 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes.meta new file mode 100644 index 00000000..df242311 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9ebacf7535cd84238a1d576722f1eb8b +folderAsset: yes +timeCreated: 1528230429 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/TongueDetector.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/TongueDetector.cs new file mode 100644 index 00000000..0c9b52a1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/TongueDetector.cs @@ -0,0 +1,58 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; +using UnityEngine.UI; + +public class TongueDetector : MonoBehaviour +{ + public GameObject tongueImage; + bool shapeEnabled = false; + Dictionary currentBlendShapes; + + // Use this for initialization + void Start () + { + UnityARSessionNativeInterface.ARFaceAnchorAddedEvent += FaceAdded; + UnityARSessionNativeInterface.ARFaceAnchorUpdatedEvent += FaceUpdated; + UnityARSessionNativeInterface.ARFaceAnchorRemovedEvent += FaceRemoved; + + } + + void OnGUI() + { + bool enableTongue = false; + + if (shapeEnabled) + { + if (currentBlendShapes.ContainsKey (ARBlendShapeLocation.TongueOut)) + { + enableTongue = (currentBlendShapes [ARBlendShapeLocation.TongueOut] > 0.5f); + + } + + } + + tongueImage.SetActive (enableTongue); + } + + void FaceAdded (ARFaceAnchor anchorData) + { + shapeEnabled = true; + currentBlendShapes = anchorData.blendShapes; + } + + void FaceUpdated (ARFaceAnchor anchorData) + { + currentBlendShapes = anchorData.blendShapes; + } + + void FaceRemoved (ARFaceAnchor anchorData) + { + shapeEnabled = false; + } + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/TongueDetector.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/TongueDetector.cs.meta new file mode 100644 index 00000000..66a982ca --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/TongueDetector.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: ac3dd8ef8241540e293e48c558f22254 +timeCreated: 1528230551 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityEyeManager.cs b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityEyeManager.cs new file mode 100644 index 00000000..911e5462 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityEyeManager.cs @@ -0,0 +1,76 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class UnityEyeManager : MonoBehaviour +{ + [SerializeField] + private GameObject eyePrefab; + + private UnityARSessionNativeInterface m_session; + private GameObject leftEyeGo; + private GameObject rightEyeGo; + + // Use this for initialization + void Start () { + m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + + Application.targetFrameRate = 60; + ARKitFaceTrackingConfiguration config = new ARKitFaceTrackingConfiguration(); + config.alignment = UnityARAlignment.UnityARAlignmentGravity; + config.enableLightEstimation = true; + + if (config.IsSupported ) + { + + m_session.RunWithConfig (config); + + UnityARSessionNativeInterface.ARFaceAnchorAddedEvent += FaceAdded; + UnityARSessionNativeInterface.ARFaceAnchorUpdatedEvent += FaceUpdated; + UnityARSessionNativeInterface.ARFaceAnchorRemovedEvent += FaceRemoved; + + } + + leftEyeGo = GameObject.Instantiate (eyePrefab); + rightEyeGo = GameObject.Instantiate (eyePrefab); + + leftEyeGo.SetActive (false); + rightEyeGo.SetActive (false); + + } + + void FaceAdded (ARFaceAnchor anchorData) + { + leftEyeGo.transform.position = anchorData.leftEyePose.position; + leftEyeGo.transform.rotation = anchorData.leftEyePose.rotation; + + rightEyeGo.transform.position = anchorData.rightEyePose.position; + rightEyeGo.transform.rotation = anchorData.rightEyePose.rotation; + + leftEyeGo.SetActive (true); + rightEyeGo.SetActive (true); + } + + void FaceUpdated (ARFaceAnchor anchorData) + { + leftEyeGo.transform.position = anchorData.leftEyePose.position; + leftEyeGo.transform.rotation = anchorData.leftEyePose.rotation; + + rightEyeGo.transform.position = anchorData.rightEyePose.position; + rightEyeGo.transform.rotation = anchorData.rightEyePose.rotation; + + } + + void FaceRemoved (ARFaceAnchor anchorData) + { + leftEyeGo.SetActive (false); + rightEyeGo.SetActive (false); + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityEyeManager.cs.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityEyeManager.cs.meta new file mode 100644 index 00000000..880e9e5a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityEyeManager.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: f5e00426d34cb40fe8536720471a24bb +timeCreated: 1528231673 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityTongueAndEyes.unity b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityTongueAndEyes.unity new file mode 100644 index 00000000..6aed5ba7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityTongueAndEyes.unity @@ -0,0 +1,719 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &158778991 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 158778993} + - component: {fileID: 158778992} + m_Layer: 0 + m_Name: TongueDetector + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &158778992 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 158778991} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac3dd8ef8241540e293e48c558f22254, type: 3} + m_Name: + m_EditorClassIdentifier: + tongueImage: {fileID: 1129581296} +--- !u!4 &158778993 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 158778991} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &392764811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 392764813} + - component: {fileID: 392764812} + m_Layer: 0 + m_Name: ARCameraTracker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &392764812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 961e52c3648614224b2a9dffa3055c07, type: 3} + m_Name: + m_EditorClassIdentifier: + trackedCamera: {fileID: 10} +--- !u!4 &392764813 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1129581296 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1129581297} + - component: {fileID: 1129581299} + - component: {fileID: 1129581298} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1129581297 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1129581296} + 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: [] + m_Father: {fileID: 1583570690} + 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.5, y: 0.5} +--- !u!114 &1129581298 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1129581296} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9411765, g: 0.29757786, b: 0.29757786, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1129581299 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1129581296} +--- !u!1 &1176133656 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1176133658} + - component: {fileID: 1176133657} + 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 &1176133657 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1176133656} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1176133658 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1176133656} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1333776921 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1333776923} + - component: {fileID: 1333776922} + m_Layer: 0 + m_Name: EyeManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1333776922 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1333776921} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f5e00426d34cb40fe8536720471a24bb, type: 3} + m_Name: + m_EditorClassIdentifier: + eyePrefab: {fileID: 1989800666789462, guid: e43066e50be7c43908f324c203e4c784, type: 2} +--- !u!4 &1333776923 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1333776921} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1531.0001, y: 772.999, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1583570689 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1583570690} + - component: {fileID: 1583570691} + m_Layer: 5 + m_Name: Layout + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1583570690 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1583570689} + 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: 1129581297} + m_Father: {fileID: 1966922332} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.45254835, y: 0.7425873} + m_AnchorMax: {x: 0.55300003, y: 0.92300004} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1583570691 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1583570689} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1966922328 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1966922332} + - component: {fileID: 1966922331} + - component: {fileID: 1966922330} + - component: {fileID: 1966922329} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1966922329 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1966922328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1966922330 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1966922328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1966922331 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1966922328} + 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 &1966922332 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1966922328} + 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_Children: + - {fileID: 1583570690} + m_Father: {fileID: 0} + m_RootOrder: 4 + 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!1 &2101694690 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2101694693} + - component: {fileID: 2101694692} + - component: {fileID: 2101694691} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2101694691 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101694690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &2101694692 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101694690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &2101694693 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101694690} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityTongueAndEyes.unity.meta b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityTongueAndEyes.unity.meta new file mode 100644 index 00000000..c708a5ef --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityTongueAndEyes/UnityTongueAndEyes.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 16c7209035275422aaed5631de9e5c7c +timeCreated: 1528230458 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample.meta b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample.meta new file mode 100644 index 00000000..c9dfd650 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0a88daffac7ad42debbc62feb726fe89 +folderAsset: yes +timeCreated: 1499364808 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/AddRemoveAnchorScene.unity b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/AddRemoveAnchorScene.unity new file mode 100644 index 00000000..6e0395d6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/AddRemoveAnchorScene.unity @@ -0,0 +1,498 @@ +%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: 8 + 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, g: 0, b: 0, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 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: 3 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !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 + m_NavMeshData: {fileID: 0} +--- !u!1 &309784413 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 309784415} + - component: {fileID: 309784414} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &309784414 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 309784413} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &309784415 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 309784413} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &460174269 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 460174270} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &460174270 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 460174269} + 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: 1066395759} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &921644534 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 921644536} + - component: {fileID: 921644535} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &921644535 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 921644534} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 1066395753} +--- !u!4 &921644536 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 921644534} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1066395752 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1066395759} + - component: {fileID: 1066395753} + - component: {fileID: 1066395758} + - component: {fileID: 1066395757} + - component: {fileID: 1066395756} + - component: {fileID: 1066395755} + - component: {fileID: 1066395754} + 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 &1066395753 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066395752} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 37.809998 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!114 &1066395754 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066395752} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1066395755 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066395752} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!81 &1066395756 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066395752} + m_Enabled: 1 +--- !u!124 &1066395757 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066395752} + m_Enabled: 1 +--- !u!92 &1066395758 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066395752} + m_Enabled: 1 +--- !u!4 &1066395759 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066395752} + 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: [] + m_Father: {fileID: 460174270} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1534253375 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1534253377} + - component: {fileID: 1534253376} + m_Layer: 0 + m_Name: UnityARUserAnchorExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1534253376 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1534253375} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 677b99d7d687d4052a5c5e8006696910, type: 3} + m_Name: + m_EditorClassIdentifier: + prefabObject: {fileID: 1186787012349198, guid: 2c5f8d679f3e64a40a967471f4fa7030, + type: 2} + distanceFromCamera: 1 +--- !u!4 &1534253377 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1534253375} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.12229473, y: -0.051660307, z: -0.15891978} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1630078604 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1630078606} + - component: {fileID: 1630078605} + - component: {fileID: 1630078607} + 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 &1630078605 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1630078604} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + 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_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1630078606 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1630078604} + 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: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!114 &1630078607 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1630078604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &2124718359 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4049466131849386, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4049466131849386, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4049466131849386, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + propertyPath: m_LocalPosition.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4049466131849386, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4049466131849386, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4049466131849386, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4049466131849386, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4049466131849386, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 2c5f8d679f3e64a40a967471f4fa7030, type: 2} + m_IsPrefabParent: 0 diff --git a/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/AddRemoveAnchorScene.unity.meta b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/AddRemoveAnchorScene.unity.meta new file mode 100644 index 00000000..9986a7cf --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/AddRemoveAnchorScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c59061d8b0a364aa58f20007a956f23a +timeCreated: 1499365892 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/RandomCube.prefab b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/RandomCube.prefab new file mode 100644 index 00000000..0ca531d5 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/RandomCube.prefab @@ -0,0 +1,356 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1186787012349198} + m_IsPrefabParent: 1 +--- !u!1 &1186787012349198 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4049466131849386} + - component: {fileID: 33594885957908722} + - component: {fileID: 65701560840435550} + - component: {fileID: 23051406642599826} + - component: {fileID: 114190960555266974} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1245096981341778 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4963628858650934} + - component: {fileID: 33551439693999448} + - component: {fileID: 65727314346539104} + - component: {fileID: 23445139610750294} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1680011897905006 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4725039523228064} + - component: {fileID: 33372701587230516} + - component: {fileID: 65345363346622658} + - component: {fileID: 23986206071300102} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1845792716165042 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4310065768079020} + - component: {fileID: 33391250605112606} + - component: {fileID: 65976022695541428} + - component: {fileID: 23603276169709218} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4049466131849386 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1186787012349198} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 4310065768079020} + - {fileID: 4725039523228064} + - {fileID: 4963628858650934} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4310065768079020 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1845792716165042} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 4049466131849386} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4725039523228064 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1680011897905006} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 4049466131849386} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!4 &4963628858650934 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1245096981341778} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 4049466131849386} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &23051406642599826 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1186787012349198} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!23 &23445139610750294 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1245096981341778} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!23 &23603276169709218 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1845792716165042} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!23 &23986206071300102 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1680011897905006} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33372701587230516 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1680011897905006} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33391250605112606 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1845792716165042} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33551439693999448 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1245096981341778} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33594885957908722 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1186787012349198} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65345363346622658 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1680011897905006} + 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!65 &65701560840435550 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1186787012349198} + 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!65 &65727314346539104 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1245096981341778} + 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!65 &65976022695541428 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1845792716165042} + 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!114 &114190960555266974 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1186787012349198} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d24244ceb54d42ca92481ba81c45056, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/RandomCube.prefab.meta b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/RandomCube.prefab.meta new file mode 100644 index 00000000..a26f0317 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/RandomCube.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2c5f8d679f3e64a40a967471f4fa7030 +timeCreated: 1499371804 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/UnityARUserAnchorExample.cs b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/UnityARUserAnchorExample.cs new file mode 100644 index 00000000..dd35f635 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/UnityARUserAnchorExample.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using UnityEngine; +using UnityEngine.XR.iOS; + +/** + This Class will place a game object with an UnityARUserAnchorComponent attached to it. + It will then call the RemoveAnchor API after 5 seconds. This scipt will subscribe to the + AnchorRemoved event and remove the game object from the scene. + */ +public class UnityARUserAnchorExample : MonoBehaviour { + + + public GameObject prefabObject; + // Distance in Meters + public int distanceFromCamera = 1; + private HashSet m_Clones; + + + private float m_TimeUntilRemove = 5.0f; + + void Awake() { + UnityARSessionNativeInterface.ARUserAnchorAddedEvent += ExampleAddAnchor; + UnityARSessionNativeInterface.ARUserAnchorRemovedEvent += AnchorRemoved; + m_Clones = new HashSet(); + } + + public void ExampleAddAnchor(ARUserAnchor anchor) + { + if (m_Clones.Contains(anchor.identifier)) + { + Console.WriteLine("Our anchor was added!"); + } + } + + public void AnchorRemoved(ARUserAnchor anchor) + { + if (m_Clones.Contains(anchor.identifier)) + { + m_Clones.Remove(anchor.identifier); + Console.WriteLine("AnchorRemovedExample: " + anchor.identifier); + } + } + + // Update is called once per frame + void Update () { + if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began) + { + GameObject clone = Instantiate(prefabObject, Camera.main.transform.position + (this.distanceFromCamera * Camera.main.transform.forward), Quaternion.identity); + UnityARUserAnchorComponent component = clone.GetComponent(); + m_Clones.Add(component.AnchorId); + m_TimeUntilRemove = 4.0f; + } + + // just remove anchors afte a certain amount of time for example's sake. + m_TimeUntilRemove -= Time.deltaTime; + if (m_TimeUntilRemove <= 0.0f) + { + foreach (string id in m_Clones) + { + Console.WriteLine("Removing anchor with id: " + id); + UnityARSessionNativeInterface.GetARSessionNativeInterface().RemoveUserAnchor(id); + break; + } + m_TimeUntilRemove = 4.0f; + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/UnityARUserAnchorExample.cs.meta b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/UnityARUserAnchorExample.cs.meta new file mode 100644 index 00000000..79dbc9bd --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/AddRemoveAnchorExample/UnityARUserAnchorExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 677b99d7d687d4052a5c5e8006696910 +timeCreated: 1499374237 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common.meta b/Assets/UnityARKitPlugin/Examples/Common.meta new file mode 100644 index 00000000..7d0e2616 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 99a3c390b086e41bcae2b94fee5d253a +folderAsset: yes +timeCreated: 1503626045 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials.meta new file mode 100644 index 00000000..22b412f0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 80ed123283a674013aef17bc2c431e8b +folderAsset: yes +timeCreated: 1503626045 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_pattern.svg.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_pattern.svg.mat new file mode 100644 index 00000000..066d2d89 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_pattern.svg.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: 2000px-Checkerboard_pattern.svg + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 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} + - _textureCbCr: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _textureY: + 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: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_pattern.svg.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_pattern.svg.mat.meta new file mode 100755 index 00000000..81aeddc0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_pattern.svg.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 48f9ec19142bd7e4c9f2441ab5799cca +timeCreated: 1489779706 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_patternUV.svg.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_patternUV.svg.mat new file mode 100644 index 00000000..c8cbf95f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_patternUV.svg.mat @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: 2000px-Checkerboard_patternUV.svg + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 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: 2800000, guid: 70976333360a046c1bcf8dc7cb1f593c, type: 3} + 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: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_patternUV.svg.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_patternUV.svg.mat.meta new file mode 100755 index 00000000..023a0adb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/2000px-Checkerboard_patternUV.svg.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 66fbc43c67b564bb4a4c2c2dcd6c1970 +timeCreated: 1489779706 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/ARKitPlaneMesh.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/ARKitPlaneMesh.mat new file mode 100644 index 00000000..715c78cf --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/ARKitPlaneMesh.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: ARKitPlaneMesh + 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: [] + 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: 10, y: 10} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: b4088316296d14245a7a76db89247808, type: 3} + m_Scale: {x: 10, y: 10} + 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: 10 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 3 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 0 + m_Colors: + - _Color: {r: 0.50735295, g: 0.49989188, b: 0.49989188, a: 0.347} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/ARKitPlaneMesh.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/ARKitPlaneMesh.mat.meta new file mode 100644 index 00000000..3d6cf04c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/ARKitPlaneMesh.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 04845b76859034d95b1487d887525145 +timeCreated: 1517432121 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/BallMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/BallMaterial.mat new file mode 100644 index 00000000..2eead3b3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/BallMaterial.mat @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: BallMaterial + m_Shader: {fileID: 4800000, guid: aef340cb91e534f40870ff658a7aecee, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + 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: 10904, guid: 0000000000000000f000000000000000, type: 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.635 + - _GlossyReflections: 1 + - _Metallic: 0.2 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.9044118, g: 0.13300176, b: 0.13300176, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/BallMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/BallMaterial.mat.meta new file mode 100644 index 00000000..9495de15 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/BallMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f5e394a942fae453583e8e6009ee49a1 +timeCreated: 1496972319 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Selected.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Selected.mat new file mode 100644 index 00000000..71df42aa --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Selected.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: BoundingBox_Selected + 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: [] + 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: 10 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 3 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 0 + m_Colors: + - _Color: {r: 1, g: 0.93103456, b: 0, a: 0.566} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Selected.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Selected.mat.meta new file mode 100644 index 00000000..52b3b747 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Selected.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 57bf08b71b2b14f8995a08cfc781d4cf +timeCreated: 1523909746 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Unselected.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Unselected.mat new file mode 100644 index 00000000..bd1fc142 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Unselected.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: BoundingBox_Unselected + 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: [] + 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: 10 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 3 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 0 + m_Colors: + - _Color: {r: 1, g: 0, b: 0, a: 0.853} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Unselected.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Unselected.mat.meta new file mode 100644 index 00000000..440568a3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/BoundingBox_Unselected.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0b37a3e843c7c41d897de1445ba4b187 +timeCreated: 1523909746 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/EnvironmentMapMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/EnvironmentMapMaterial.mat new file mode 100644 index 00000000..d3fc4a2a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/EnvironmentMapMaterial.mat @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: EnvironmentMapMaterial + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + 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} + - _Cube: + 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} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Shininess: 0.078125 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _ReflectColor: {r: 1, g: 1, b: 1, a: 0.5} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/EnvironmentMapMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/EnvironmentMapMaterial.mat.meta new file mode 100644 index 00000000..fd05b07c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/EnvironmentMapMaterial.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6ff108178bf6e47d0ab6282a6ddfa885 +timeCreated: 1523651292 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/MeshBorder.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/MeshBorder.mat new file mode 100644 index 00000000..c1407996 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/MeshBorder.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: MeshBorder + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 2 + 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.41911763, g: 1, b: 0.5673427, a: 1} + - _EmissionColor: {r: 0.20539579, g: 0.9632353, b: 0.27334002, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/MeshBorder.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/MeshBorder.mat.meta new file mode 100644 index 00000000..5aed62f8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/MeshBorder.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 78f2880d33df84ede869907822bbb8c4 +timeCreated: 1517447583 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/Plane Physic Material.physicMaterial b/Assets/UnityARKitPlugin/Examples/Common/Materials/Plane Physic Material.physicMaterial new file mode 100644 index 00000000..ebe9f03a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/Plane Physic Material.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Plane Physic Material + dynamicFriction: 0.5 + staticFriction: 0.5 + bounciness: 0.1 + frictionCombine: 0 + bounceCombine: 0 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/Plane Physic Material.physicMaterial.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/Plane Physic Material.physicMaterial.meta new file mode 100644 index 00000000..ef21431a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/Plane Physic Material.physicMaterial.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: beba2f308446f43da8e82c54f30f93b5 +timeCreated: 1496984011 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/PlayerMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/PlayerMaterial.mat new file mode 100644 index 00000000..72c16e8c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/PlayerMaterial.mat @@ -0,0 +1,168 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: PlayerMaterial + m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _NORMALMAP + _SPECGLOSSMAP _UVSEC_UV1 + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: a3cc890ba79fb47449fb51893aa9b363, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 2800000, guid: d98be175031405b4fb3f6a5f459a22e4, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Occlusion + second: + m_Texture: {fileID: 2800000, guid: 6ae2af98f5c9f0243806bfb6ccbbdd19, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _SpecGlossMap + second: + m_Texture: {fileID: 2800000, guid: bc9b1c6383841ea4f9e532a49c651ff6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 2800000, guid: 6ae2af98f5c9f0243806bfb6ccbbdd19, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _Shininess + second: .115098767 + data: + first: + name: _AlphaTestRef + second: .5 + data: + first: + name: _Lightmapping + second: 1 + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Parallax + second: .0199999996 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: .600000024 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _EmissionScaleUI + second: 1 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: .99999994} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} + data: + first: + name: _SpecColor + second: {r: .25, g: .213235289, b: .213235289, a: 1} + data: + first: + name: _SpecularColor + second: {r: .200000003, g: .200000003, b: .200000003, a: 1} + data: + first: + name: _EmissionColorUI + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _EmissionColorWithMapUI + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/PlayerMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/PlayerMaterial.mat.meta new file mode 100644 index 00000000..b1cf5151 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/PlayerMaterial.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 3ea44298aa419344dbdcf87dd1a50533 +NativeFormatImporter: + userData: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudMaterial.mat new file mode 100644 index 00000000..b19acc63 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudMaterial.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: PointCloudMaterial + m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 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: 10305, guid: 0000000000000000f000000000000000, type: 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.797 + - _GlossyReflections: 1 + - _InvFade: 2.2 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _TintColor: {r: 1, g: 1, b: 0, a: 0.5} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudMaterial.mat.meta new file mode 100644 index 00000000..d6c635df --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3a044f7471feb4bd4be40dcec09eae05 +timeCreated: 1493918099 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudParticleMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudParticleMaterial.mat new file mode 100644 index 00000000..ef289bd6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudParticleMaterial.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: PointCloudParticleMaterial + m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 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: 10300, guid: 0000000000000000f000000000000000, type: 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.797 + - _GlossyReflections: 1 + - _InvFade: 2.2 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _TintColor: {r: 1, g: 1, b: 0, a: 0.5} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudParticleMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudParticleMaterial.mat.meta new file mode 100644 index 00000000..359e0a0a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/PointCloudParticleMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f7cffc03fadd142ea81401e16399833e +timeCreated: 1493918099 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBack.renderTexture b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBack.renderTexture new file mode 100644 index 00000000..06c4a463 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBack.renderTexture @@ -0,0 +1,26 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: RTBack + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_Width: 256 + m_Height: 256 + m_AntiAliasing: 1 + m_DepthFormat: 2 + m_ColorFormat: 0 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_TextureSettings: + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapMode: 1 + m_Dimension: 2 + m_VolumeDepth: 1 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBack.renderTexture.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBack.renderTexture.meta new file mode 100644 index 00000000..c2d9c622 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBack.renderTexture.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8bf5451fa758d4c7cb976751e582bdc5 +timeCreated: 1509125000 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBottom.renderTexture b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBottom.renderTexture new file mode 100644 index 00000000..49a9e8d1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBottom.renderTexture @@ -0,0 +1,26 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: RTBottom + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_Width: 256 + m_Height: 256 + m_AntiAliasing: 1 + m_DepthFormat: 2 + m_ColorFormat: 0 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_TextureSettings: + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapMode: 1 + m_Dimension: 2 + m_VolumeDepth: 1 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBottom.renderTexture.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBottom.renderTexture.meta new file mode 100644 index 00000000..ec57db2d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTBottom.renderTexture.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f547bf7e1be7a4cd794d316baa8f21fb +timeCreated: 1509125000 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTFront.renderTexture b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTFront.renderTexture new file mode 100644 index 00000000..b251a0c8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTFront.renderTexture @@ -0,0 +1,26 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: RTFront + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_Width: 256 + m_Height: 256 + m_AntiAliasing: 1 + m_DepthFormat: 2 + m_ColorFormat: 0 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_TextureSettings: + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapMode: 1 + m_Dimension: 2 + m_VolumeDepth: 1 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTFront.renderTexture.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTFront.renderTexture.meta new file mode 100644 index 00000000..8fa7e795 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTFront.renderTexture.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e4a4722373175490a93a7956b23953ec +timeCreated: 1509125000 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTLeft.renderTexture b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTLeft.renderTexture new file mode 100644 index 00000000..50c1d209 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTLeft.renderTexture @@ -0,0 +1,26 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: RTLeft + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_Width: 256 + m_Height: 256 + m_AntiAliasing: 1 + m_DepthFormat: 2 + m_ColorFormat: 0 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_TextureSettings: + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapMode: 1 + m_Dimension: 2 + m_VolumeDepth: 1 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTLeft.renderTexture.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTLeft.renderTexture.meta new file mode 100644 index 00000000..314872d7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTLeft.renderTexture.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9121db1a6b1c443fb39767c96cb1ed3 +timeCreated: 1509125000 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTRight.renderTexture b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTRight.renderTexture new file mode 100644 index 00000000..06cf27da --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTRight.renderTexture @@ -0,0 +1,26 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: RTRight + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_Width: 256 + m_Height: 256 + m_AntiAliasing: 1 + m_DepthFormat: 2 + m_ColorFormat: 0 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_TextureSettings: + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapMode: 1 + m_Dimension: 2 + m_VolumeDepth: 1 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTRight.renderTexture.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTRight.renderTexture.meta new file mode 100644 index 00000000..6029051a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTRight.renderTexture.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9492362d6426443583dcad13f6515da +timeCreated: 1509125000 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTTop.renderTexture b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTTop.renderTexture new file mode 100644 index 00000000..2bd1d9aa --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTTop.renderTexture @@ -0,0 +1,26 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: RTTop + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_Width: 256 + m_Height: 256 + m_AntiAliasing: 1 + m_DepthFormat: 2 + m_ColorFormat: 0 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_TextureSettings: + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapMode: 1 + m_Dimension: 2 + m_VolumeDepth: 1 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/RTTop.renderTexture.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTTop.renderTexture.meta new file mode 100644 index 00000000..e211f45b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/RTTop.renderTexture.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4bf99f420eecb4d14841917a1a5830fe +timeCreated: 1509125000 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/SphereMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/SphereMaterial.mat new file mode 100644 index 00000000..04964fa4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/SphereMaterial.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: SphereMaterial + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + 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.5, g: 0.5, b: 0.5, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/SphereMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/SphereMaterial.mat.meta new file mode 100644 index 00000000..5b3fe2f0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/SphereMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: df83d7f64be1a4ef7b2c936b6de3c7a0 +timeCreated: 1509045622 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/XColor.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/XColor.mat new file mode 100644 index 00000000..fac04cdd --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/XColor.mat @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: XColor + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 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: 1, g: 0, b: 0.06206894, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/XColor.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/XColor.mat.meta new file mode 100644 index 00000000..edb13a9f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/XColor.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: aaae8be92ba59487a9946818d7a2017f +timeCreated: 1493855225 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/YColor.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/YColor.mat new file mode 100644 index 00000000..119b9433 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/YColor.mat @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: YColor + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 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.19463666, g: 0.88235295, b: 0.31320846, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/YColor.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/YColor.mat.meta new file mode 100644 index 00000000..4071b169 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/YColor.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8fa2e9e7c08844dd4a8d581610839228 +timeCreated: 1493855225 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/ZColor.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/ZColor.mat new file mode 100644 index 00000000..c97c2fb8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/ZColor.mat @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: ZColor + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 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, g: 0.13103437, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/ZColor.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/ZColor.mat.meta new file mode 100644 index 00000000..e2f3d31a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/ZColor.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d55ccb0db00e54a1696c1e96094d706d +timeCreated: 1493855225 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/debugPlaneMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/debugPlaneMaterial.mat new file mode 100644 index 00000000..e21e2af5 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/debugPlaneMaterial.mat @@ -0,0 +1,82 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: debugPlaneMaterial + m_Shader: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHATEST_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaTex: + 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: 2800000, guid: 5db0892a9f35841a1aafa4d2f617eaf3, type: 3} + 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: + - PixelSnap: 0 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EnableExternalAlpha: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _MaskingAlphaCutoff: 0 + - _Metallic: 0 + - _Mode: 1 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/debugPlaneMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/debugPlaneMaterial.mat.meta new file mode 100644 index 00000000..8e0c1e5b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/debugPlaneMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b36939cf153274ec29fbf2f10d0a49d7 +timeCreated: 1492715747 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/occlusionPlaneMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/occlusionPlaneMaterial.mat new file mode 100644 index 00000000..f36e6ab4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/occlusionPlaneMaterial.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: occlusionPlaneMaterial + m_Shader: {fileID: 4800000, guid: 1e5df5a56a7624e0981993663cf33154, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 1990 + 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: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/occlusionPlaneMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/occlusionPlaneMaterial.mat.meta new file mode 100644 index 00000000..417927cf --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/occlusionPlaneMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 25eeebe0578974575aac9f24b4ede717 +timeCreated: 1497288096 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/shadowPlaneMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Materials/shadowPlaneMaterial.mat new file mode 100644 index 00000000..535f8d4b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/shadowPlaneMaterial.mat @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: shadowPlaneMaterial + m_Shader: {fileID: 4800000, guid: abcf973b8dc974208a882fe4b8c6b73f, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 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: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Materials/shadowPlaneMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Materials/shadowPlaneMaterial.mat.meta new file mode 100644 index 00000000..76bf1ad2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Materials/shadowPlaneMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 16f11da3beeaf498f8526286a295a38e +timeCreated: 1497288096 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Models.meta b/Assets/UnityARKitPlugin/Examples/Common/Models.meta new file mode 100644 index 00000000..51fa2ac5 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Models.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a7bb5a53dd8ac49759db6bf17162dd20 +folderAsset: yes +timeCreated: 1503626045 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Models/Characters.meta b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters.meta new file mode 100644 index 00000000..e4c0349b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a2db6ed60f35771478d3b31828b24fe8 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials.meta b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials.meta new file mode 100644 index 00000000..5c854227 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9e9efecd428e54b9aabf3e5fc4fbc526 +folderAsset: yes +timeCreated: 1501101803 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials/GunMaterial.mat b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials/GunMaterial.mat new file mode 100644 index 00000000..5e01d4e5 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials/GunMaterial.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GunMaterial + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + 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: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials/GunMaterial.mat.meta b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials/GunMaterial.mat.meta new file mode 100644 index 00000000..48243ac4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Materials/GunMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fb5e14eb1d53543c2a0f0fb4f0bedcd8 +timeCreated: 1501101803 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Player.fbx b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Player.fbx new file mode 100644 index 00000000..e1947f28 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Player.fbx differ diff --git a/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Player.fbx.meta b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Player.fbx.meta new file mode 100644 index 00000000..a2af3d54 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Models/Characters/Player.fbx.meta @@ -0,0 +1,729 @@ +fileFormatVersion: 2 +guid: f1d84cc28597f5641a3d9cbc4df7e306 +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: Ctrl_Grp + 100002: Gun + 100004: Gun 1 + 100006: GunBarrelEnd + 100008: GunBarrelStretch + 100010: Hat1 + 100012: Hat2 + 100014: Hat3 + 100016: Hat4 + 100018: Hat5 + 100020: HatEnd + 100022: Head + 100024: Hips + 100026: HipSway + 100028: LeftBrow1 + 100030: LeftBrow1End + 100032: LeftBrow2 + 100034: LeftBrow2End + 100036: LeftBrow3 + 100038: LeftBrow3End + 100040: LeftHand1 + 100042: LeftHand2 + 100044: LeftLeg + 100046: LeftLowerArm + 100048: LeftLowerArm2 + 100050: LeftLowerArm2_IK + 100052: LeftLowerArm_2_FK + 100054: LeftLowerArm_FK + 100056: LeftLowerArm_IK + 100058: LeftShoulder + 100060: LeftThumb1 + 100062: LeftThumb2 + 100064: LeftToe + 100066: LeftUpperArm + 100068: LeftUpperArm_FK + 100070: LeftUpperArm_IK + 100072: LeftWrist + 100074: LeftWrist_FK + 100076: LeftWrist_IK + 100078: //RootNode + 100080: Player + 100082: PlayerCtrl + 100084: RightBrow1 + 100086: RightBrow1End + 100088: RightBrow2 + 100090: RightBrow2End + 100092: RightBrow3 + 100094: RightBrow3End + 100096: RightHand1 + 100098: RightHand2 + 100100: RightLeg + 100102: RightLowerArm + 100104: RightLowerArm2 + 100106: RightLowerArm2_FK + 100108: RightLowerArm2_IK + 100110: RightLowerArm_FK + 100112: RightLowerArm_IK + 100114: RightShoulder + 100116: RightThumb1 + 100118: RightThumb2 + 100120: RightToe + 100122: RightUpperArm + 100124: RightUpperArm_FK + 100126: RightUpperArm_IK + 100128: RightWrist + 100130: RightWrist_FK + 100132: RightWrist_IK + 100134: Root + 100136: Spine + 100138: Tail1 + 100140: Tail2 + 100142: Tail3 + 400000: Ctrl_Grp + 400002: Gun + 400004: Gun 1 + 400006: GunBarrelEnd + 400008: GunBarrelStretch + 400010: Hat1 + 400012: Hat2 + 400014: Hat3 + 400016: Hat4 + 400018: Hat5 + 400020: HatEnd + 400022: Head + 400024: Hips + 400026: HipSway + 400028: LeftBrow1 + 400030: LeftBrow1End + 400032: LeftBrow2 + 400034: LeftBrow2End + 400036: LeftBrow3 + 400038: LeftBrow3End + 400040: LeftHand1 + 400042: LeftHand2 + 400044: LeftLeg + 400046: LeftLowerArm + 400048: LeftLowerArm2 + 400050: LeftLowerArm2_IK + 400052: LeftLowerArm_2_FK + 400054: LeftLowerArm_FK + 400056: LeftLowerArm_IK + 400058: LeftShoulder + 400060: LeftThumb1 + 400062: LeftThumb2 + 400064: LeftToe + 400066: LeftUpperArm + 400068: LeftUpperArm_FK + 400070: LeftUpperArm_IK + 400072: LeftWrist + 400074: LeftWrist_FK + 400076: LeftWrist_IK + 400078: Player + 400080: //RootNode + 400082: PlayerCtrl + 400084: RightBrow1 + 400086: RightBrow1End + 400088: RightBrow2 + 400090: RightBrow2End + 400092: RightBrow3 + 400094: RightBrow3End + 400096: RightHand1 + 400098: RightHand2 + 400100: RightLeg + 400102: RightLowerArm + 400104: RightLowerArm2 + 400106: RightLowerArm2_FK + 400108: RightLowerArm2_IK + 400110: RightLowerArm_FK + 400112: RightLowerArm_IK + 400114: RightShoulder + 400116: RightThumb1 + 400118: RightThumb2 + 400120: RightToe + 400122: RightUpperArm + 400124: RightUpperArm_FK + 400126: RightUpperArm_IK + 400128: RightWrist + 400130: RightWrist_FK + 400132: RightWrist_IK + 400134: Root + 400136: Spine + 400138: Tail1 + 400140: Tail2 + 400142: Tail3 + 4300000: Gun + 4300002: Player + 7400000: Move + 7400002: Idle + 7400004: Death + 9500000: //RootNode + 13700000: Gun + 13700002: Player + materials: + importMaterials: 1 + materialName: 1 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 1 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: + - PlayerCtrl/Ctrl_Grp/Gun 1/GunBarrelStretch/GunBarrelEnd + clipAnimations: + - serializedVersion: 16 + name: Move + takeName: Take 001 + firstFrame: 1 + lastFrame: 25 + wrapMode: 0 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 0 + loopTime: 1 + loopBlend: 1 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: + - path: + weight: 1 + - path: Gun + weight: 1 + - path: Player + weight: 1 + - path: PlayerCtrl + weight: 1 + - path: PlayerCtrl/Ctrl_Grp + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1 + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1/GunBarrelStretch + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1/GunBarrelStretch/GunBarrelEnd + weight: 1 + - path: PlayerCtrl/Root + weight: 1 + - path: PlayerCtrl/Root/Hips + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/LeftLeg + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/LeftLeg/LeftToe + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/RightLeg + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/RightLeg/RightToe + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4/Hat5 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4/Hat5/HatEnd + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow1/LeftBrow1End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow2/LeftBrow2End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow3/LeftBrow3End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow1/RightBrow1End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow2/RightBrow2End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow3/RightBrow3End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftHand1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftHand1/LeftHand2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftThumb1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftThumb1/LeftThumb2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK/LeftLowerArm_2_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK/LeftLowerArm_2_FK/LeftWrist_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK/LeftLowerArm2_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK/LeftLowerArm2_IK/LeftWrist_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightHand1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightHand1/RightHand2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightThumb1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightThumb1/RightThumb2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK/RightLowerArm2_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK/RightLowerArm2_FK/RightWrist_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK/RightLowerArm2_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK/RightLowerArm2_IK/RightWrist_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1/Tail2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1/Tail2/Tail3 + weight: 1 + maskType: 0 + maskSource: {instanceID: 0} + - serializedVersion: 16 + name: Idle + takeName: Take 001 + firstFrame: 137 + lastFrame: 512 + wrapMode: 0 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 0 + loopTime: 0 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: + - path: + weight: 1 + - path: Gun + weight: 1 + - path: Player + weight: 1 + - path: PlayerCtrl + weight: 1 + - path: PlayerCtrl/Ctrl_Grp + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1 + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1/GunBarrelStretch + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1/GunBarrelStretch/GunBarrelEnd + weight: 1 + - path: PlayerCtrl/Root + weight: 1 + - path: PlayerCtrl/Root/Hips + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/LeftLeg + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/LeftLeg/LeftToe + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/RightLeg + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/RightLeg/RightToe + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4/Hat5 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4/Hat5/HatEnd + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow1/LeftBrow1End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow2/LeftBrow2End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow3/LeftBrow3End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow1/RightBrow1End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow2/RightBrow2End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow3/RightBrow3End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftHand1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftHand1/LeftHand2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftThumb1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftThumb1/LeftThumb2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK/LeftLowerArm_2_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK/LeftLowerArm_2_FK/LeftWrist_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK/LeftLowerArm2_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK/LeftLowerArm2_IK/LeftWrist_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightHand1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightHand1/RightHand2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightThumb1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightThumb1/RightThumb2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK/RightLowerArm2_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK/RightLowerArm2_FK/RightWrist_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK/RightLowerArm2_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK/RightLowerArm2_IK/RightWrist_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1/Tail2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1/Tail2/Tail3 + weight: 1 + maskType: 0 + maskSource: {instanceID: 0} + - serializedVersion: 16 + name: Death + takeName: Take 001 + firstFrame: 525 + lastFrame: 650 + wrapMode: 0 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 0 + loopTime: 0 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: + - time: .997762918 + functionName: RestartLevel + data: + objectReferenceParameter: {instanceID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 + transformMask: + - path: + weight: 1 + - path: Gun + weight: 1 + - path: Player + weight: 1 + - path: PlayerCtrl + weight: 1 + - path: PlayerCtrl/Ctrl_Grp + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1 + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1/GunBarrelStretch + weight: 1 + - path: PlayerCtrl/Ctrl_Grp/Gun 1/GunBarrelStretch/GunBarrelEnd + weight: 1 + - path: PlayerCtrl/Root + weight: 1 + - path: PlayerCtrl/Root/Hips + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/LeftLeg + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/LeftLeg/LeftToe + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/RightLeg + weight: 1 + - path: PlayerCtrl/Root/Hips/HipSway/RightLeg/RightToe + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4/Hat5 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/Hat1/Hat2/Hat3/Hat4/Hat5/HatEnd + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow1/LeftBrow1End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow2/LeftBrow2End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/LeftBrow3/LeftBrow3End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow1/RightBrow1End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow2/RightBrow2End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow3 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/Head/RightBrow3/RightBrow3End + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftHand1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftHand1/LeftHand2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftThumb1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm/LeftLowerArm/LeftLowerArm2/LeftWrist/LeftThumb1/LeftThumb2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK/LeftLowerArm_2_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_FK/LeftLowerArm_FK/LeftLowerArm_2_FK/LeftWrist_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK/LeftLowerArm2_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/LeftShoulder/LeftUpperArm_IK/LeftLowerArm_IK/LeftLowerArm2_IK/LeftWrist_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightHand1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightHand1/RightHand2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightThumb1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm/RightLowerArm/RightLowerArm2/RightWrist/RightThumb1/RightThumb2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK/RightLowerArm2_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_FK/RightLowerArm_FK/RightLowerArm2_FK/RightWrist_FK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK/RightLowerArm2_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Spine/RightShoulder/RightUpperArm_IK/RightLowerArm_IK/RightLowerArm2_IK/RightWrist_IK + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1 + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1/Tail2 + weight: 1 + - path: PlayerCtrl/Root/Hips/Tail1/Tail2/Tail3 + weight: 1 + maskType: 0 + maskSource: {instanceID: 0} + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .00999999978 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 180 + splitTangentsAcrossUV: 1 + normalImportMode: 1 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs.meta new file mode 100644 index 00000000..62506037 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6c232e85bbf134253ab599b8e50e5913 +folderAsset: yes +timeCreated: 1503626045 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ARKitPlaneGeometry.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ARKitPlaneGeometry.prefab new file mode 100644 index 00000000..556bfefb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ARKitPlaneGeometry.prefab @@ -0,0 +1,181 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1454536478891118} + m_IsPrefabParent: 1 +--- !u!1 &1454536478891118 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4397932033875444} + - component: {fileID: 114233479572983226} + - component: {fileID: 33944727969295592} + - component: {fileID: 23418819279109146} + - component: {fileID: 120946215887499020} + m_Layer: 0 + m_Name: ARKitPlaneGeometry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4397932033875444 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1454536478891118} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23418819279109146 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1454536478891118} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 04845b76859034d95b1487d887525145, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33944727969295592 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1454536478891118} + m_Mesh: {fileID: 0} +--- !u!114 &114233479572983226 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1454536478891118} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8e41ddf2dd3348c18a8734d14dbb2ba, type: 3} + m_Name: + m_EditorClassIdentifier: + meshFilter: {fileID: 33944727969295592} + lineRenderer: {fileID: 120946215887499020} +--- !u!120 &120946215887499020 +LineRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1454536478891118} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 2100000, guid: 78f2880d33df84ede869907822bbb8c4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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_Positions: [] + m_Parameters: + serializedVersion: 2 + widthMultiplier: 0.01 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 1 + generateLightingData: 0 + m_UseWorldSpace: 0 + m_Loop: 1 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ARKitPlaneGeometry.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ARKitPlaneGeometry.prefab.meta new file mode 100644 index 00000000..3e615413 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ARKitPlaneGeometry.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 24a8c4888599c4670ba129e2f2345e92 +timeCreated: 1517432446 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefab.prefab new file mode 100644 index 00000000..3867a253 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefab.prefab @@ -0,0 +1,290 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1283292900242102} + m_IsPrefabParent: 1 +--- !u!1 &1002751330891202 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4164134588576822} + - component: {fileID: 33275157455057778} + - component: {fileID: 65093749995601518} + - component: {fileID: 23070030122106588} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1283292900242102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4685467192569254} + m_Layer: 0 + m_Name: AxesPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1750183344893220 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4582153473062144} + - component: {fileID: 33511840340325712} + - component: {fileID: 65689136147619232} + - component: {fileID: 23609516180793172} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1933987289073590 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4662238078288102} + - component: {fileID: 33460574759219864} + - component: {fileID: 65982032763208194} + - component: {fileID: 23768232061673068} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4164134588576822 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1002751330891202} + m_LocalRotation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5} + m_LocalPosition: {x: 0, y: 0, z: -0.65} + m_LocalScale: {x: 0.05, y: 1.3, z: 0.05} + m_Children: [] + m_Father: {fileID: 4685467192569254} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 90} +--- !u!4 &4582153473062144 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1750183344893220} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0.65, y: 0, z: 0} + m_LocalScale: {x: 0.05, y: 1.3080443, z: 0.05} + m_Children: [] + m_Father: {fileID: 4685467192569254} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!4 &4662238078288102 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1933987289073590} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.65, z: 0} + m_LocalScale: {x: 0.05, y: 1.3, z: 0.05} + m_Children: [] + m_Father: {fileID: 4685467192569254} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4685467192569254 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1283292900242102} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.15, y: 0.15, z: 0.15} + m_Children: + - {fileID: 4662238078288102} + - {fileID: 4582153473062144} + - {fileID: 4164134588576822} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23070030122106588 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1002751330891202} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!23 &23609516180793172 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1750183344893220} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!23 &23768232061673068 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1933987289073590} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33275157455057778 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1002751330891202} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33460574759219864 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1933987289073590} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33511840340325712 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1750183344893220} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65093749995601518 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1002751330891202} + 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!65 &65689136147619232 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1750183344893220} + 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!65 &65982032763208194 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1933987289073590} + 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} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefab.prefab.meta new file mode 100644 index 00000000..1a2d209d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f +timeCreated: 1505951457 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefabSmall.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefabSmall.prefab new file mode 100644 index 00000000..4f3a973a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefabSmall.prefab @@ -0,0 +1,296 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1989800666789462} + m_IsPrefabParent: 1 +--- !u!1 &1047659880581714 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4662127416016888} + - component: {fileID: 33809825632264738} + - component: {fileID: 65074666735754164} + - component: {fileID: 23057509346120128} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1206408471899944 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4231051145621136} + - component: {fileID: 33092003988897118} + - component: {fileID: 65862126899404686} + - component: {fileID: 23880860190282932} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1923977496546282 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4840798833953044} + - component: {fileID: 33701381244079034} + - component: {fileID: 65338933589883942} + - component: {fileID: 23948700575899194} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1989800666789462 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4177158024167098} + m_Layer: 0 + m_Name: AxesPrefabSmall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4177158024167098 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1989800666789462} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.04, y: 0.04, z: 0.04} + m_Children: + - {fileID: 4231051145621136} + - {fileID: 4662127416016888} + - {fileID: 4840798833953044} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4231051145621136 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1206408471899944} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.65, z: 0} + m_LocalScale: {x: 0.05, y: 1.3, z: 0.05} + m_Children: [] + m_Father: {fileID: 4177158024167098} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4662127416016888 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1047659880581714} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0.65, y: 0, z: 0} + m_LocalScale: {x: 0.05, y: 1.3080443, z: 0.05} + m_Children: [] + m_Father: {fileID: 4177158024167098} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!4 &4840798833953044 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1923977496546282} + m_LocalRotation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5} + m_LocalPosition: {x: 0, y: 0, z: -0.65} + m_LocalScale: {x: 0.05, y: 1.3, z: 0.05} + m_Children: [] + m_Father: {fileID: 4177158024167098} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 90} +--- !u!23 &23057509346120128 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1047659880581714} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!23 &23880860190282932 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1206408471899944} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!23 &23948700575899194 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1923977496546282} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33092003988897118 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1206408471899944} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33701381244079034 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1923977496546282} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33809825632264738 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1047659880581714} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65074666735754164 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1047659880581714} + 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!65 &65338933589883942 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1923977496546282} + 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!65 &65862126899404686 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1206408471899944} + 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} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefabSmall.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefabSmall.prefab.meta new file mode 100644 index 00000000..120d4986 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/AxesPrefabSmall.prefab.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e43066e50be7c43908f324c203e4c784 +timeCreated: 1528232493 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/BallPrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/BallPrefab.prefab new file mode 100644 index 00000000..ee1fb851 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/BallPrefab.prefab @@ -0,0 +1,111 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1154719652421038} + m_IsPrefabParent: 1 +--- !u!1 &1154719652421038 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4284708646823142} + - component: {fileID: 33846996785084984} + - component: {fileID: 135626873687639864} + - component: {fileID: 23727198747687476} + - component: {fileID: 54261416861304404} + m_Layer: 0 + m_Name: BallPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4284708646823142 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1154719652421038} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.03, y: 0.03, z: 0.03} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23727198747687476 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1154719652421038} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 2100000, guid: f5e394a942fae453583e8e6009ee49a1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33846996785084984 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1154719652421038} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54261416861304404 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1154719652421038} + serializedVersion: 2 + m_Mass: 0.01 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 1 +--- !u!135 &135626873687639864 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1154719652421038} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/BallPrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/BallPrefab.prefab.meta new file mode 100644 index 00000000..f60a94c5 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/BallPrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e11b49885a57845e3b22a6355928ed72 +timeCreated: 1496972639 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/Box Face.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/Box Face.prefab new file mode 100644 index 00000000..90ed412e --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/Box Face.prefab @@ -0,0 +1,219 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1106013321793048} + m_IsPrefabParent: 1 +--- !u!1 &1106013321793048 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4063972062076818} + m_Layer: 0 + m_Name: Box Face + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1424221161384634 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4086131831731902} + - component: {fileID: 33565380843865698} + - component: {fileID: 64845931279974550} + - component: {fileID: 23982269222545282} + - component: {fileID: 120648566903742748} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4063972062076818 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1106013321793048} + 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: 4086131831731902} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4086131831731902 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1424221161384634} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 4063972062076818} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23982269222545282 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1424221161384634} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 0b37a3e843c7c41d897de1445ba4b187, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33565380843865698 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1424221161384634} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!64 &64845931279974550 +MeshCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1424221161384634} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 14 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!120 &120648566903742748 +LineRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1424221161384634} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 10306, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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_Positions: + - {x: -5.02, y: 0.02, z: 5.02} + - {x: 5.02, y: 0.02, z: 5.02} + - {x: 5.02, y: 0.02, z: -5.02} + - {x: -5.02, y: 0.02, z: -5.02} + m_Parameters: + serializedVersion: 2 + widthMultiplier: 0.004 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 0, g: 0, b: 0, a: 1} + key1: {r: 0, g: 0, b: 0, a: 1} + key2: {r: 0, g: 0, b: 0, a: 1} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 65535 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 4 + numCapVertices: 4 + alignment: 0 + textureMode: 0 + generateLightingData: 0 + m_UseWorldSpace: 0 + m_Loop: 1 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/Box Face.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/Box Face.prefab.meta new file mode 100644 index 00000000..18b60d26 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/Box Face.prefab.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5dcebda15b99e4457a22a698a16c0c4e +timeCreated: 1523909948 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/CollSphere.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/CollSphere.prefab new file mode 100644 index 00000000..48bcf018 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/CollSphere.prefab @@ -0,0 +1,62 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1054048126866664} + m_IsPrefabParent: 1 +--- !u!1 &1054048126866664 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4813142357266462} + - component: {fileID: 33999288727854204} + - component: {fileID: 135561595105751414} + m_Layer: 0 + m_Name: CollSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4813142357266462 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1054048126866664} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.07, y: 0.07, z: 0.07} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33999288727854204 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1054048126866664} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!135 &135561595105751414 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1054048126866664} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/CollSphere.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/CollSphere.prefab.meta new file mode 100644 index 00000000..a8115e19 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/CollSphere.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 772733b9aeeb7481ea21ab0986f34715 +timeCreated: 1496987653 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/DebugReflectionProbePrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/DebugReflectionProbePrefab.prefab new file mode 100644 index 00000000..c843cd85 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/DebugReflectionProbePrefab.prefab @@ -0,0 +1,303 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1492549396392088} + m_IsPrefabParent: 1 +--- !u!1 &1434987884414202 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4401081094900818} + - component: {fileID: 33821986554932488} + - component: {fileID: 23143455151469382} + m_Layer: 0 + m_Name: ProbeDisplaySphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1469030072650682 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4634024269126554} + - component: {fileID: 33216440770601858} + - component: {fileID: 23187205584536320} + m_Layer: 0 + m_Name: ExtentsCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1492549396392088 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4068427091230080} + - component: {fileID: 215591045736345138} + - component: {fileID: 114202174001495314} + m_Layer: 0 + m_Name: DebugReflectionProbePrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1916635269132358 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4016636400643422} + - component: {fileID: 33207807387034524} + - component: {fileID: 23836971309031484} + m_Layer: 0 + m_Name: ReflectiveCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4016636400643422 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1916635269132358} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.3, y: 0.3, z: 0.3} + m_Children: [] + m_Father: {fileID: 4068427091230080} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4068427091230080 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1492549396392088} + 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: 4401081094900818} + - {fileID: 4634024269126554} + - {fileID: 4016636400643422} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4401081094900818 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1434987884414202} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.05, z: 0} + m_LocalScale: {x: 0.3, y: 0.3, z: 0.3} + m_Children: [] + m_Father: {fileID: 4068427091230080} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4634024269126554 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1469030072650682} + 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: [] + m_Father: {fileID: 4068427091230080} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23143455151469382 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1434987884414202} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 6ff108178bf6e47d0ab6282a6ddfa885, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!23 &23187205584536320 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1469030072650682} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: b36939cf153274ec29fbf2f10d0a49d7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!23 &23836971309031484 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1916635269132358} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 6ff108178bf6e47d0ab6282a6ddfa885, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33207807387034524 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1916635269132358} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33216440770601858 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1469030072650682} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &33821986554932488 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1434987884414202} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114202174001495314 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1492549396392088} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 92d3ef5f820884ac4a1a0b78cea353af, type: 3} + m_Name: + m_EditorClassIdentifier: + debugExtentGO: {fileID: 1469030072650682} +--- !u!215 &215591045736345138 +ReflectionProbe: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1492549396392088} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 2 + m_RefreshMode: 0 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 1, y: 1, z: 1} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/DebugReflectionProbePrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/DebugReflectionProbePrefab.prefab.meta new file mode 100644 index 00000000..735855e3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/DebugReflectionProbePrefab.prefab.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 209240d9a5b6a473d85f1c9ecc62698b +timeCreated: 1524006967 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ObjectText.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ObjectText.prefab new file mode 100644 index 00000000..f86bd830 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ObjectText.prefab @@ -0,0 +1,111 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1182685253350136} + m_IsPrefabParent: 1 +--- !u!1 &1182685253350136 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4625840769180078} + - component: {fileID: 23223494561589674} + - component: {fileID: 102775171231232374} + - component: {fileID: 114795513701302610} + m_Layer: 0 + m_Name: ObjectText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4625840769180078 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1182685253350136} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23223494561589674 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1182685253350136} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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!102 &102775171231232374 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1182685253350136} + m_Text: Hello World + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 20 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!114 &114795513701302610 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1182685253350136} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 39fb4afa2d68741688a6c32909d504c1, type: 3} + m_Name: + m_EditorClassIdentifier: + textMesh: {fileID: 102775171231232374} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ObjectText.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ObjectText.prefab.meta new file mode 100644 index 00000000..bb78b30b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ObjectText.prefab.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c2c40ff3dd4b046f4a09d7d727a9d9d3 +timeCreated: 1524180818 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePainterPrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePainterPrefab.prefab new file mode 100644 index 00000000..584991c0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePainterPrefab.prefab @@ -0,0 +1,3228 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1450711119300942} + m_IsPrefabParent: 1 +--- !u!1 &1450711119300942 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4129580775725456} + - component: {fileID: 198095342896748244} + - component: {fileID: 199554783549644966} + m_Layer: 0 + m_Name: ParticlePainterPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4129580775725456 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1450711119300942} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!198 &198095342896748244 +ParticleSystem: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1450711119300942} + serializedVersion: 5 + lengthInSec: 5 + simulationSpeed: 1 + looping: 0 + prewarm: 0 + playOnAwake: 0 + useUnscaledTime: 0 + autoRandomSeed: 1 + startDelay: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + moveWithTransform: 0 + moveWithCustomTransform: {fileID: 0} + scalingMode: 1 + randomSeed: 138096577 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + minMaxState: 0 + scalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSpeed: + minMaxState: 0 + scalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startColor: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + startSize: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeY: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeZ: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationX: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationY: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotation: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + randomizeRotationDirection: 0 + maxNumParticles: 1000 + size3D: 0 + rotation3D: 0 + gravityModifier: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ShapeModule: + serializedVersion: 5 + enabled: 0 + type: 4 + angle: 25 + length: 5 + boxThickness: {x: 0, y: 0, z: 0} + radiusThickness: 1 + donutRadius: 0.2 + m_Position: {x: 0, y: 0, z: 0} + m_Rotation: {x: 0, y: 0, z: 0} + m_Scale: {x: 1, y: 1, z: 1} + placementMode: 0 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + randomPositionAmount: 0 + radius: + value: 1 + mode: 0 + spread: 0 + speed: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + arc: + value: 360 + mode: 0 + spread: 0 + speed: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + EmissionModule: + enabled: 0 + serializedVersion: 4 + rateOverTime: + minMaxState: 0 + scalar: 10 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rateOverDistance: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_BurstCount: 0 + m_Bursts: [] + SizeModule: + enabled: 0 + curve: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + minMaxState: 0 + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + ColorModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + UVModule: + enabled: 0 + mode: 0 + frameOverTime: + minMaxState: 1 + scalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startFrame: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + flipU: 0 + flipV: 0 + randomRow: 1 + sprites: + - sprite: {fileID: 0} + VelocityModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ForceModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + enabled: 0 + multiplier: 1 + ClampVelocityModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + magnitude: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxis: 0 + inWorldSpace: 0 + dampen: 1 + NoiseModule: + enabled: 0 + strength: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthY: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthZ: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + frequency: 0.5 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remap: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapY: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapZ: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapEnabled: 0 + positionAmount: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rotationAmount: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + sizeAmount: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + SizeBySpeedModule: + enabled: 0 + curve: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + minMaxState: 0 + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + colliderForce: 0 + multiplyColliderForceByParticleSize: 0 + multiplyColliderForceByParticleSpeed: 0 + multiplyColliderForceByCollisionAngle: 1 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Bounce: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_EnergyLossOnCollision: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 0 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - emitter: {fileID: 0} + type: 0 + properties: 0 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + intensityCurve: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + maxLights: 20 + TrailModule: + enabled: 0 + ratio: 1 + lifetime: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minVertexDistance: 0.2 + textureMode: 0 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + generateLightingData: 0 + colorOverLifetime: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + widthOverTrail: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorOverTrail: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + CustomDataModule: + enabled: 0 + mode0: 0 + vectorComponentCount0: 4 + color0: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + vector0_0: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector0_1: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector0_2: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector0_3: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + mode1: 0 + vectorComponentCount1: 4 + color1: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + vector1_0: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector1_1: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector1_2: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector1_3: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!199 &199554783549644966 +ParticleSystemRenderer: + serializedVersion: 4 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1450711119300942} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10306, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_VertexStreams: 00010304 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} + m_MaskInteraction: 0 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePainterPrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePainterPrefab.prefab.meta new file mode 100644 index 00000000..8a86a28d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePainterPrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 200646a121c9c46f69245ca2c1b789ee +timeCreated: 1494016471 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePrefab.prefab new file mode 100644 index 00000000..f3ea353a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePrefab.prefab @@ -0,0 +1,3228 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1780633876005026} + m_IsPrefabParent: 1 +--- !u!1 &1780633876005026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4076562046720424} + - component: {fileID: 198314236125653888} + - component: {fileID: 199793676405310172} + m_Layer: 0 + m_Name: ParticlePrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4076562046720424 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1780633876005026} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!198 &198314236125653888 +ParticleSystem: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1780633876005026} + serializedVersion: 5 + lengthInSec: 5 + simulationSpeed: 1 + looping: 0 + prewarm: 0 + playOnAwake: 0 + useUnscaledTime: 0 + autoRandomSeed: 1 + startDelay: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + moveWithTransform: 0 + moveWithCustomTransform: {fileID: 0} + scalingMode: 1 + randomSeed: 73567786 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + minMaxState: 0 + scalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSpeed: + minMaxState: 0 + scalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startColor: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + startSize: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeY: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeZ: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationX: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationY: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotation: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + randomizeRotationDirection: 0 + maxNumParticles: 1000 + size3D: 0 + rotation3D: 0 + gravityModifier: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ShapeModule: + serializedVersion: 5 + enabled: 0 + type: 4 + angle: 25 + length: 5 + boxThickness: {x: 0, y: 0, z: 0} + radiusThickness: 1 + donutRadius: 0.2 + m_Position: {x: 0, y: 0, z: 0} + m_Rotation: {x: 0, y: 0, z: 0} + m_Scale: {x: 1, y: 1, z: 1} + placementMode: 0 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + randomPositionAmount: 0 + radius: + value: 1 + mode: 0 + spread: 0 + speed: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + arc: + value: 360 + mode: 0 + spread: 0 + speed: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + EmissionModule: + enabled: 0 + serializedVersion: 4 + rateOverTime: + minMaxState: 0 + scalar: 10 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rateOverDistance: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_BurstCount: 0 + m_Bursts: [] + SizeModule: + enabled: 0 + curve: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + minMaxState: 0 + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + ColorModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + UVModule: + enabled: 0 + mode: 0 + frameOverTime: + minMaxState: 1 + scalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startFrame: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + flipU: 0 + flipV: 0 + randomRow: 1 + sprites: + - sprite: {fileID: 0} + VelocityModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ForceModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + enabled: 0 + multiplier: 1 + ClampVelocityModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + magnitude: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxis: 0 + inWorldSpace: 0 + dampen: 1 + NoiseModule: + enabled: 0 + strength: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthY: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthZ: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + frequency: 0.5 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remap: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapY: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapZ: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapEnabled: 0 + positionAmount: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rotationAmount: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + sizeAmount: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + SizeBySpeedModule: + enabled: 0 + curve: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + minMaxState: 1 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + minMaxState: 0 + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + colliderForce: 0 + multiplyColliderForceByParticleSize: 0 + multiplyColliderForceByParticleSpeed: 0 + multiplyColliderForceByCollisionAngle: 1 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Bounce: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_EnergyLossOnCollision: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 0 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - emitter: {fileID: 0} + type: 0 + properties: 0 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + intensityCurve: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + maxLights: 20 + TrailModule: + enabled: 0 + ratio: 1 + lifetime: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minVertexDistance: 0.2 + textureMode: 0 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + generateLightingData: 0 + colorOverLifetime: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + widthOverTrail: + minMaxState: 0 + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorOverTrail: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + CustomDataModule: + enabled: 0 + mode0: 0 + vectorComponentCount0: 4 + color0: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + vector0_0: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector0_1: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector0_2: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector0_3: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + mode1: 0 + vectorComponentCount1: 4 + color1: + serializedVersion: 2 + minMaxState: 0 + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + vector1_0: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector1_1: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector1_2: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vector1_3: + minMaxState: 0 + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!199 &199793676405310172 +ParticleSystemRenderer: + serializedVersion: 4 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1780633876005026} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 2100000, guid: f7cffc03fadd142ea81401e16399833e, type: 2} + - {fileID: 10306, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_VertexStreams: 00010304 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} + m_MaskInteraction: 0 diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePrefab.prefab.meta new file mode 100644 index 00000000..c50263a3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/ParticlePrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 87db9decf4b3e4cb8bf3eea22ccd37f5 +timeCreated: 1494009634 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/PointCloudPrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/PointCloudPrefab.prefab new file mode 100644 index 00000000..5be7a26c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/PointCloudPrefab.prefab @@ -0,0 +1,95 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1845574417345784} + m_IsPrefabParent: 1 +--- !u!1 &1845574417345784 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4456704908116418} + - component: {fileID: 33975515242258592} + - component: {fileID: 135719125020529502} + - component: {fileID: 23860415727414328} + m_Layer: 0 + m_Name: PointCloudPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4456704908116418 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1845574417345784} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.005, y: 0.005, z: 0.005} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23860415727414328 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1845574417345784} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 3a044f7471feb4bd4be40dcec09eae05, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33975515242258592 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1845574417345784} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!135 &135719125020529502 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1845574417345784} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/PointCloudPrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/PointCloudPrefab.prefab.meta new file mode 100644 index 00000000..8c027ef6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/PointCloudPrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 02d2a544d8d594d30b790e76398d0873 +timeCreated: 1493917937 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/SmallCylinder.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/SmallCylinder.prefab new file mode 100644 index 00000000..b5e66097 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/SmallCylinder.prefab @@ -0,0 +1,98 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1038700575102576} + m_IsPrefabParent: 1 +--- !u!1 &1038700575102576 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4201160133663790} + - component: {fileID: 33319336645203722} + - component: {fileID: 136188397985162384} + - component: {fileID: 23239402007188596} + m_Layer: 0 + m_Name: SmallCylinder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4201160133663790 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1038700575102576} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.03, y: 0.03, z: 0.03} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23239402007188596 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1038700575102576} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33319336645203722 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1038700575102576} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!136 &136188397985162384 +CapsuleCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1038700575102576} + 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} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/SmallCylinder.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/SmallCylinder.prefab.meta new file mode 100644 index 00000000..dd21d747 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/SmallCylinder.prefab.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 39807a5465c08453e85a08bd6829affe +timeCreated: 1523642785 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/VideoFormatButton.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/VideoFormatButton.prefab new file mode 100644 index 00000000..eaa76e99 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/VideoFormatButton.prefab @@ -0,0 +1,222 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1036539979525446} + m_IsPrefabParent: 1 +--- !u!1 &1036539979525446 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224026297216334730} + - component: {fileID: 222243427012927500} + - component: {fileID: 114376118785565002} + - component: {fileID: 114629669440864654} + - component: {fileID: 114897616703469284} + m_Layer: 5 + m_Name: VideoFormatButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1546711103148714 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224856131708948742} + - component: {fileID: 222162933481526488} + - component: {fileID: 114345207391426152} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &114345207391426152 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1546711103148714} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Set World Origin +--- !u!114 &114376118785565002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1036539979525446} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114629669440864654 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1036539979525446} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114376118785565002} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 114897616703469284} + m_MethodName: ButtonPressed + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114897616703469284 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1036539979525446} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2dc7312ca3b1549c6b07084d70ec4345, type: 3} + m_Name: + m_EditorClassIdentifier: + videoFormatDescription: {fileID: 114345207391426152} +--- !u!222 &222162933481526488 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1546711103148714} +--- !u!222 &222243427012927500 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1036539979525446} +--- !u!224 &224026297216334730 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1036539979525446} + 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: 224856131708948742} + m_Father: {fileID: 0} + 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: 421, y: 718} + m_SizeDelta: {x: 500, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224856131708948742 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1546711103148714} + 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: [] + m_Father: {fileID: 224026297216334730} + 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/UnityARKitPlugin/Examples/Common/Prefabs/VideoFormatButton.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/VideoFormatButton.prefab.meta new file mode 100644 index 00000000..1f283904 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/VideoFormatButton.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 95c6bff2dfc164406901450885b965af +timeCreated: 1518224083 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/collisionPlanePrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/collisionPlanePrefab.prefab new file mode 100644 index 00000000..17678818 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/collisionPlanePrefab.prefab @@ -0,0 +1,93 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1372998203143648} + m_IsPrefabParent: 1 +--- !u!1 &1243282721867180 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4459804331441636} + - component: {fileID: 33784412182206160} + - component: {fileID: 64007261467877126} + m_Layer: 10 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1372998203143648 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4787822665528772} + m_Layer: 0 + m_Name: collisionPlanePrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4459804331441636 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1243282721867180} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.125, y: 0.125, z: 0.125} + m_Children: [] + m_Father: {fileID: 4787822665528772} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4787822665528772 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1372998203143648} + 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: 4459804331441636} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33784412182206160 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1243282721867180} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!64 &64007261467877126 +MeshCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1243282721867180} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/collisionPlanePrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/collisionPlanePrefab.prefab.meta new file mode 100644 index 00000000..1d41738f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/collisionPlanePrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 813dd14a7826b4795823dd39ac4cc050 +timeCreated: 1492718811 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/cube.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/cube.prefab new file mode 100644 index 00000000..10ab3c14 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/cube.prefab @@ -0,0 +1,95 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1483093577405612} + m_IsPrefabParent: 1 +--- !u!1 &1483093577405612 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4842779887363256} + - component: {fileID: 33871579265233608} + - component: {fileID: 65425379401162706} + - component: {fileID: 23053345987231900} + m_Layer: 0 + m_Name: cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4842779887363256 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1483093577405612} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 386, y: 718, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23053345987231900 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1483093577405612} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33871579265233608 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1483093577405612} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65425379401162706 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1483093577405612} + 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} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/cube.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/cube.prefab.meta new file mode 100644 index 00000000..88e2bf89 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/cube.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9c8a1fc58df6b4d8c8c68e2883659c8a +timeCreated: 1520468628 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/debugPlanePrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/debugPlanePrefab.prefab new file mode 100644 index 00000000..552c7258 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/debugPlanePrefab.prefab @@ -0,0 +1,139 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1372998203143648} + m_IsPrefabParent: 1 +--- !u!1 &1243282721867180 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4459804331441636} + - component: {fileID: 33784412182206160} + - component: {fileID: 64007261467877126} + - component: {fileID: 23522069187022562} + - component: {fileID: 65567926102939020} + m_Layer: 10 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1372998203143648 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4787822665528772} + m_Layer: 0 + m_Name: debugPlanePrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4459804331441636 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1243282721867180} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 4787822665528772} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4787822665528772 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1372998203143648} + 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: 4459804331441636} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23522069187022562 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1243282721867180} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: b36939cf153274ec29fbf2f10d0a49d7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33784412182206160 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1243282721867180} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!64 &64007261467877126 +MeshCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1243282721867180} + m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65567926102939020 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1243282721867180} + m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 10, y: 0.1, z: 10} + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/debugPlanePrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/debugPlanePrefab.prefab.meta new file mode 100644 index 00000000..70895266 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/debugPlanePrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f879aaf3eeb0c467eb22cbaf08dc97a4 +timeCreated: 1492718811 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/occlusionPlanePrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/occlusionPlanePrefab.prefab new file mode 100644 index 00000000..62bcce3b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/occlusionPlanePrefab.prefab @@ -0,0 +1,139 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1983520619281468} + m_IsPrefabParent: 1 +--- !u!1 &1835668619836898 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4301351458783932} + - component: {fileID: 33801103126895618} + - component: {fileID: 64514493211635788} + - component: {fileID: 23308608047570514} + - component: {fileID: 65158357074468436} + m_Layer: 10 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1983520619281468 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4023412880410692} + m_Layer: 0 + m_Name: occlusionPlanePrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4023412880410692 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1983520619281468} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.173, z: 1.058} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4301351458783932} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4301351458783932 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 4023412880410692} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23308608047570514 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 25eeebe0578974575aac9f24b4ede717, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33801103126895618 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!64 &64514493211635788 +MeshCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65158357074468436 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 10, y: 0.1, z: 10} + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/occlusionPlanePrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/occlusionPlanePrefab.prefab.meta new file mode 100644 index 00000000..0cbebdee --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/occlusionPlanePrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9eb96f002ffce4560879b18f2e0502e5 +timeCreated: 1497394239 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/shadowPlanePrefab.prefab b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/shadowPlanePrefab.prefab new file mode 100644 index 00000000..d10d72a4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/shadowPlanePrefab.prefab @@ -0,0 +1,139 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1983520619281468} + m_IsPrefabParent: 1 +--- !u!1 &1835668619836898 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4301351458783932} + - component: {fileID: 33801103126895618} + - component: {fileID: 64514493211635788} + - component: {fileID: 23308608047570514} + - component: {fileID: 65158357074468436} + m_Layer: 10 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1983520619281468 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4023412880410692} + m_Layer: 0 + m_Name: shadowPlanePrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4023412880410692 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1983520619281468} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.173, z: 1.058} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4301351458783932} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4301351458783932 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 4023412880410692} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23308608047570514 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 16f11da3beeaf498f8526286a295a38e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33801103126895618 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!64 &64514493211635788 +MeshCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65158357074468436 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1835668619836898} + m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 10, y: 0.1, z: 10} + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Prefabs/shadowPlanePrefab.prefab.meta b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/shadowPlanePrefab.prefab.meta new file mode 100644 index 00000000..91202c33 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Prefabs/shadowPlanePrefab.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 696855730620a483c9ae4c242e312b28 +timeCreated: 1497394239 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Shaders.meta b/Assets/UnityARKitPlugin/Examples/Common/Shaders.meta new file mode 100644 index 00000000..321be64e --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Shaders.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 74f51f2576219447b8322610cbd17b01 +folderAsset: yes +timeCreated: 1503626045 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Shaders/InstancedSurfaceShader.shader b/Assets/UnityARKitPlugin/Examples/Common/Shaders/InstancedSurfaceShader.shader new file mode 100644 index 00000000..f1c613b3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Shaders/InstancedSurfaceShader.shader @@ -0,0 +1,52 @@ +// Upgrade NOTE: upgraded instancing buffer 'Props' to new syntax. + +Shader "Custom/InstancedSurfaceShader" { + Properties { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + SubShader { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + + struct Input { + float2 uv_MainTex; + }; + + half _Glossiness; + half _Metallic; + fixed4 _Color; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_DEFINE_INSTANCED_PROP (fixed4, _InstanceColor) +#define _InstanceColor_arr Props + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) { + // Albedo comes from a texture tinted by color + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * UNITY_ACCESS_INSTANCED_PROP (_InstanceColor_arr, _InstanceColor); + o.Albedo = c.rgb; + // Metallic and smoothness come from slider variables + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Shaders/InstancedSurfaceShader.shader.meta b/Assets/UnityARKitPlugin/Examples/Common/Shaders/InstancedSurfaceShader.shader.meta new file mode 100644 index 00000000..f15bb97d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Shaders/InstancedSurfaceShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: aef340cb91e534f40870ff658a7aecee +timeCreated: 1496974206 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileARShadow.shader b/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileARShadow.shader new file mode 100644 index 00000000..7104bebe --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileARShadow.shader @@ -0,0 +1,73 @@ +//This is based on a shader from https://alastaira.wordpress.com/2014/12/30/adding-shadows-to-a-unity-vertexfragment-shader-in-7-easy-steps/ + +Shader "Custom/MobileARShadow" +{ + SubShader { + Pass { + + // 1.) This will be the base forward rendering pass in which ambient, vertex, and + // main directional light will be applied. Additional lights will need additional passes + // using the "ForwardAdd" lightmode. + // see: http://docs.unity3d.com/Manual/SL-PassTags.html + Tags { "LightMode" = "ForwardBase" "RenderType"="Opaque" "Queue"="Geometry+1" "ForceNoShadowCasting"="True" } + LOD 150 + Blend Zero SrcColor + ZWrite On + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + // 2.) This matches the "forward base" of the LightMode tag to ensure the shader compiles + // properly for the forward bass pass. As with the LightMode tag, for any additional lights + // this would be changed from _fwdbase to _fwdadd. + #pragma multi_compile_fwdbase + + // 3.) Reference the Unity library that includes all the lighting shadow macros + #include "AutoLight.cginc" + + + struct v2f + { + float4 pos : SV_POSITION; + + // 4.) The LIGHTING_COORDS macro (defined in AutoLight.cginc) defines the parameters needed to sample + // the shadow map. The (0,1) specifies which unused TEXCOORD semantics to hold the sampled values - + // As I'm not using any texcoords in this shader, I can use TEXCOORD0 and TEXCOORD1 for the shadow + // sampling. If I was already using TEXCOORD for UV coordinates, say, I could specify + // LIGHTING_COORDS(1,2) instead to use TEXCOORD1 and TEXCOORD2. + LIGHTING_COORDS(0,1) + }; + + + v2f vert(appdata_base v) { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + + // 5.) The TRANSFER_VERTEX_TO_FRAGMENT macro populates the chosen LIGHTING_COORDS in the v2f structure + // with appropriate values to sample from the shadow/lighting map + TRANSFER_VERTEX_TO_FRAGMENT(o); + + return o; + } + + fixed4 frag(v2f i) : COLOR { + + // 6.) The LIGHT_ATTENUATION samples the shadowmap (using the coordinates calculated by TRANSFER_VERTEX_TO_FRAGMENT + // and stored in the structure defined by LIGHTING_COORDS), and returns the value as a float. + float attenuation = LIGHT_ATTENUATION(i); + return fixed4(1.0,1.0,1.0,1.0) * attenuation; + } + + ENDCG + } + } + + // 7.) To receive or cast a shadow, shaders must implement the appropriate "Shadow Collector" or "Shadow Caster" pass. + // Although we haven't explicitly done so in this shader, if these passes are missing they will be read from a fallback + // shader instead, so specify one here to import the collector/caster passes used in that fallback. + Fallback "VertexLit" + +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileARShadow.shader.meta b/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileARShadow.shader.meta new file mode 100644 index 00000000..954faff6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileARShadow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: abcf973b8dc974208a882fe4b8c6b73f +timeCreated: 1497394336 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileOcclusion.shader b/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileOcclusion.shader new file mode 100644 index 00000000..e47ccaa0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileOcclusion.shader @@ -0,0 +1,44 @@ +Shader "Custom/MobileOcclusion" +{ + SubShader { + Pass { + // Render the Occlusion shader before all + // opaque geometry to prime the depth buffer. + Tags { "Queue"="Geometry" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float4 position : SV_POSITION; + }; + + v2f vert (appdata input) + { + v2f output; + + output.position = UnityObjectToClipPos(input.vertex); + return output; + } + + fixed4 frag (v2f input) : SV_Target + { + return fixed4(0.5, 0.3, 0.0, 1.0); + } + ENDCG + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileOcclusion.shader.meta b/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileOcclusion.shader.meta new file mode 100644 index 00000000..6c8b84a5 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Shaders/MobileOcclusion.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1e5df5a56a7624e0981993663cf33154 +timeCreated: 1498679026 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures.meta b/Assets/UnityARKitPlugin/Examples/Common/Textures.meta new file mode 100644 index 00000000..6f9a40d9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 52d64d946d6be4c8aa622c3f5e6bf042 +folderAsset: yes +timeCreated: 1503626045 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerDiffuse.png b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerDiffuse.png new file mode 100644 index 00000000..711c6cf5 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerDiffuse.png differ diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerDiffuse.png.meta b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerDiffuse.png.meta new file mode 100644 index 00000000..926c7410 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerDiffuse.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: a3cc890ba79fb47449fb51893aa9b363 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerNormals.png b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerNormals.png new file mode 100644 index 00000000..06b143f4 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerNormals.png differ diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerNormals.png.meta b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerNormals.png.meta new file mode 100644 index 00000000..c71477bb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerNormals.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: d98be175031405b4fb3f6a5f459a22e4 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 1 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerOcclusion.png b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerOcclusion.png new file mode 100644 index 00000000..7d9147b1 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerOcclusion.png differ diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerOcclusion.png.meta b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerOcclusion.png.meta new file mode 100644 index 00000000..b34c1584 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerOcclusion.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 6ae2af98f5c9f0243806bfb6ccbbdd19 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerSpecular.tif b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerSpecular.tif new file mode 100644 index 00000000..b79174c7 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerSpecular.tif differ diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerSpecular.tif.meta b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerSpecular.tif.meta new file mode 100644 index 00000000..3b5799ff --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Textures/PlayerSpecular.tif.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: bc9b1c6383841ea4f9e532a49c651ff6 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/checker_large UV.gif b/Assets/UnityARKitPlugin/Examples/Common/Textures/checker_large UV.gif new file mode 100755 index 00000000..dbdaec46 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/Common/Textures/checker_large UV.gif differ diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/checker_large UV.gif.meta b/Assets/UnityARKitPlugin/Examples/Common/Textures/checker_large UV.gif.meta new file mode 100644 index 00000000..f7d87c2b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Textures/checker_large UV.gif.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: 70976333360a046c1bcf8dc7cb1f593c +timeCreated: 1489788026 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: tvOS + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 256 + textureFormat: 4 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + - buildTarget: WebGL + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/debugPlaneTile.png b/Assets/UnityARKitPlugin/Examples/Common/Textures/debugPlaneTile.png new file mode 100644 index 00000000..b72323fc Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/Common/Textures/debugPlaneTile.png differ diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/debugPlaneTile.png.meta b/Assets/UnityARKitPlugin/Examples/Common/Textures/debugPlaneTile.png.meta new file mode 100644 index 00000000..60e57418 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Textures/debugPlaneTile.png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: 5db0892a9f35841a1aafa4d2f617eaf3 +timeCreated: 1492718703 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/unitylogo.png b/Assets/UnityARKitPlugin/Examples/Common/Textures/unitylogo.png new file mode 100644 index 00000000..d3da6217 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/Common/Textures/unitylogo.png differ diff --git a/Assets/UnityARKitPlugin/Examples/Common/Textures/unitylogo.png.meta b/Assets/UnityARKitPlugin/Examples/Common/Textures/unitylogo.png.meta new file mode 100644 index 00000000..3757d286 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/Common/Textures/unitylogo.png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: b4088316296d14245a7a76db89247808 +timeCreated: 1517444849 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking.meta new file mode 100644 index 00000000..d727f4f6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 669335d2fe29243de91f7a0d430b31f9 +folderAsset: yes +timeCreated: 1505775209 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/ARCameraTracker.cs b/Assets/UnityARKitPlugin/Examples/FaceTracking/ARCameraTracker.cs new file mode 100644 index 00000000..a14e3f32 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/ARCameraTracker.cs @@ -0,0 +1,38 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class ARCameraTracker : MonoBehaviour { + + [SerializeField] + private Camera trackedCamera; + + private bool sessionStarted = false; + + // Use this for initialization + void Start () { + UnityARSessionNativeInterface.ARFrameUpdatedEvent += FirstFrameUpdate; + } + + void OnDestroy() + { + } + + void FirstFrameUpdate(UnityARCamera cam) + { + sessionStarted = true; + UnityARSessionNativeInterface.ARFrameUpdatedEvent -= FirstFrameUpdate; + } + + // Update is called once per frame + void Update () { + if (trackedCamera != null && sessionStarted) { + Matrix4x4 cameraPose = UnityARSessionNativeInterface.GetARSessionNativeInterface ().GetCameraPose (); + trackedCamera.transform.localPosition = UnityARMatrixOps.GetPosition (cameraPose); + trackedCamera.transform.localRotation = UnityARMatrixOps.GetRotation (cameraPose); + + trackedCamera.projectionMatrix = UnityARSessionNativeInterface.GetARSessionNativeInterface ().GetCameraProjection (); + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/ARCameraTracker.cs.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/ARCameraTracker.cs.meta new file mode 100644 index 00000000..407de988 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/ARCameraTracker.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 961e52c3648614224b2a9dffa3055c07 +timeCreated: 1505866337 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapeDriver.cs b/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapeDriver.cs new file mode 100644 index 00000000..9efcc19d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapeDriver.cs @@ -0,0 +1,45 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class BlendshapeDriver : MonoBehaviour { + + SkinnedMeshRenderer skinnedMeshRenderer; + Dictionary currentBlendShapes; + + // Use this for initialization + void Start () { + skinnedMeshRenderer = GetComponent (); + + if (skinnedMeshRenderer) { + UnityARSessionNativeInterface.ARFaceAnchorAddedEvent += FaceAdded; + UnityARSessionNativeInterface.ARFaceAnchorUpdatedEvent += FaceUpdated; + } + } + + void FaceAdded (ARFaceAnchor anchorData) + { + currentBlendShapes = anchorData.blendShapes; + } + + void FaceUpdated (ARFaceAnchor anchorData) + { + currentBlendShapes = anchorData.blendShapes; + } + + + // Update is called once per frame + void Update () { + + if (currentBlendShapes != null) { + foreach(KeyValuePair kvp in currentBlendShapes) + { + int blendShapeIndex = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex ("blendShape2." + kvp.Key); + if (blendShapeIndex >= 0 ) { + skinnedMeshRenderer.SetBlendShapeWeight (blendShapeIndex, kvp.Value * 100.0f); + } + } + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapeDriver.cs.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapeDriver.cs.meta new file mode 100644 index 00000000..d6788c51 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapeDriver.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b4b0f477e0af343a89cdf372c8f19c89 +timeCreated: 1510188584 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapePrinter.cs b/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapePrinter.cs new file mode 100644 index 00000000..538d0c42 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapePrinter.cs @@ -0,0 +1,70 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class BlendshapePrinter : MonoBehaviour { + + bool shapeEnabled = false; + Dictionary currentBlendShapes; + + // Use this for initialization + void Start () { + UnityARSessionNativeInterface.ARFaceAnchorAddedEvent += FaceAdded; + UnityARSessionNativeInterface.ARFaceAnchorUpdatedEvent += FaceUpdated; + UnityARSessionNativeInterface.ARFaceAnchorRemovedEvent += FaceRemoved; + + } + + void OnGUI() + { + if (shapeEnabled) { + + string blendshapes = ""; + string shapeNames = ""; + string valueNames = ""; + foreach(KeyValuePair kvp in currentBlendShapes) { + blendshapes += " ["; + blendshapes += kvp.Key.ToString (); + blendshapes += ":"; + blendshapes += kvp.Value.ToString (); + blendshapes += "]\n"; + shapeNames += "\""; + shapeNames += kvp.Key.ToString (); + shapeNames += "\",\n"; + valueNames += kvp.Value.ToString (); + valueNames += "\n"; + } + + GUILayout.BeginHorizontal (GUILayout.ExpandHeight(true)); + GUILayout.Box (blendshapes); + GUILayout.EndHorizontal (); + + Debug.Log (shapeNames); + Debug.Log (valueNames); + + } + } + + void FaceAdded (ARFaceAnchor anchorData) + { + shapeEnabled = true; + currentBlendShapes = anchorData.blendShapes; + } + + void FaceUpdated (ARFaceAnchor anchorData) + { + currentBlendShapes = anchorData.blendShapes; + } + + void FaceRemoved (ARFaceAnchor anchorData) + { + shapeEnabled = false; + } + + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapePrinter.cs.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapePrinter.cs.meta new file mode 100644 index 00000000..b590651d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/BlendshapePrinter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bc6438cd254de46d9aab501d3d1660b4 +timeCreated: 1506122750 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceAnchorScene.unity b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceAnchorScene.unity new file mode 100644 index 00000000..77dace36 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceAnchorScene.unity @@ -0,0 +1,451 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &392764811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 392764813} + - component: {fileID: 392764812} + m_Layer: 0 + m_Name: ARCameraTracker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &392764812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 961e52c3648614224b2a9dffa3055c07, type: 3} + m_Name: + m_EditorClassIdentifier: + trackedCamera: {fileID: 10} +--- !u!4 &392764813 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &750418576 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 750418578} + - component: {fileID: 750418577} + m_Layer: 0 + m_Name: ARFaceAnchorManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &750418577 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750418576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbb9909788bbd469bbce3102485cc0d9, type: 3} + m_Name: + m_EditorClassIdentifier: + anchorPrefab: {fileID: 883728463} +--- !u!4 &750418578 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750418576} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &883728462 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4685467192569254, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4164134588576822, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + propertyPath: m_LocalPosition.z + value: -0.65 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &883728463 stripped +GameObject: + m_PrefabParentObject: {fileID: 1283292900242102, guid: 8855f6e449b9d4d3fae7f0a1a5ff9c2f, + type: 2} + m_PrefabInternal: {fileID: 883728462} +--- !u!1 &941817061 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 941817063} + - component: {fileID: 941817062} + 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 &941817062 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 941817061} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &941817063 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 941817061} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: -0.5947815, y: -0.55055016, z: 0.5245318} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceAnchorScene.unity.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceAnchorScene.unity.meta new file mode 100644 index 00000000..56ebea5c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceAnchorScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 46e299c2ec1244fbaa1b9b14e2ab198a +timeCreated: 1505775273 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeScene.unity b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeScene.unity new file mode 100644 index 00000000..2f0547f1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeScene.unity @@ -0,0 +1,481 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &392764811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 392764813} + - component: {fileID: 392764812} + m_Layer: 0 + m_Name: ARCameraTracker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &392764812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 961e52c3648614224b2a9dffa3055c07, type: 3} + m_Name: + m_EditorClassIdentifier: + trackedCamera: {fileID: 10} +--- !u!4 &392764813 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &539730392 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 539730393} + - component: {fileID: 539730394} + m_Layer: 0 + m_Name: BlendshapeOutput + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &539730393 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 539730392} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &539730394 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 539730392} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bc6438cd254de46d9aab501d3d1660b4, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666032} + - component: {fileID: 1121666031} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARFaceMeshManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1121666030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Mesh: {fileID: 0} +--- !u!23 &1121666031 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!114 &1121666032 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: baec72e2006ae48df9dcbf0eb13377f9, type: 3} + m_Name: + m_EditorClassIdentifier: + meshFilter: {fileID: 1121666030} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: -180, z: 0} +--- !u!1 &1176133656 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1176133658} + - component: {fileID: 1176133657} + 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 &1176133657 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1176133656} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1176133658 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1176133656} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeScene.unity.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeScene.unity.meta new file mode 100644 index 00000000..8fc60446 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 74c2619dd419d4704bba49146f77161d +timeCreated: 1505775273 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeSloth.unity b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeSloth.unity new file mode 100644 index 00000000..cb6892af --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeSloth.unity @@ -0,0 +1,582 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.83823526, g: 0.8135813, b: 0.8135813, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &108640178 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 13700000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_BlendShapeWeights.Array.size + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 13700000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_AABB.m_Center.y + value: -0.015557218 + objectReference: {fileID: 0} + - target: {fileID: 13700000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_AABB.m_Extent.x + value: 0.113363 + objectReference: {fileID: 0} + - target: {fileID: 13700000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_AABB.m_Extent.y + value: 0.13194084 + objectReference: {fileID: 0} + - target: {fileID: 13700000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_AABB.m_Extent.z + value: 0.13394047 + objectReference: {fileID: 0} + - target: {fileID: 13700000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_DirtyAABB + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13700000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + propertyPath: m_BlendShapeWeights.Array.data[43] + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + m_IsPrefabParent: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &392764811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 392764813} + - component: {fileID: 392764812} + m_Layer: 0 + m_Name: ARCameraTracker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &392764812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 961e52c3648614224b2a9dffa3055c07, type: 3} + m_Name: + m_EditorClassIdentifier: + trackedCamera: {fileID: 10} +--- !u!4 &392764813 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &750418576 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 750418578} + - component: {fileID: 750418577} + m_Layer: 0 + m_Name: ARFaceAnchorManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &750418577 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750418576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbb9909788bbd469bbce3102485cc0d9, type: 3} + m_Name: + m_EditorClassIdentifier: + anchorPrefab: {fileID: 1485951615} +--- !u!4 &750418578 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750418576} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &941817061 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 941817063} + - component: {fileID: 941817062} + 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 &941817062 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 941817061} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1.5 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &941817063 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 941817061} + m_LocalRotation: {x: 0.06905144, y: 0.42192638, z: -0.89212835, w: 0.14600354} + m_LocalPosition: {x: -0.5947815, y: -0.55055016, z: 0.5245318} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 129.377, y: 180, z: 18.58899} +--- !u!1 &1485951615 stripped +GameObject: + m_PrefabParentObject: {fileID: 100004, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + m_PrefabInternal: {fileID: 108640178} +--- !u!1 &1795977282 stripped +GameObject: + m_PrefabParentObject: {fileID: 100002, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} + m_PrefabInternal: {fileID: 108640178} +--- !u!114 &1795977284 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1795977282} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b4b0f477e0af343a89cdf372c8f19c89, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &2063811114 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2063811116} + - component: {fileID: 2063811115} + m_Layer: 0 + m_Name: Directional light (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &2063811115 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2063811114} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &2063811116 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2063811114} + m_LocalRotation: {x: 0.89530635, y: -0.030857006, z: 0.1811015, w: -0.4058037} + m_LocalPosition: {x: -0.5947815, y: -0.55055016, z: 0.5245318} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 225.681, y: -30, z: 16.825989} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeSloth.unity.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeSloth.unity.meta new file mode 100644 index 00000000..78ee59b7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceBlendshapeSloth.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9bc483a4023d4829a88ddc3adff3caf +timeCreated: 1510188488 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceDirectionalLightEstimate.unity b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceDirectionalLightEstimate.unity new file mode 100644 index 00000000..2dfa2be8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceDirectionalLightEstimate.unity @@ -0,0 +1,1680 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &6170189 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 6170191} + - component: {fileID: 6170190} + m_Layer: 0 + m_Name: ARFaceAnchorManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &6170190 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 6170189} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbb9909788bbd469bbce3102485cc0d9, type: 3} + m_Name: + m_EditorClassIdentifier: + anchorPrefab: {fileID: 1374808482} +--- !u!4 &6170191 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 6170189} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &392764811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 392764813} + - component: {fileID: 392764812} + m_Layer: 0 + m_Name: ARCameraTracker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &392764812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 961e52c3648614224b2a9dffa3055c07, type: 3} + m_Name: + m_EditorClassIdentifier: + trackedCamera: {fileID: 10} +--- !u!4 &392764813 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &441856550 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 441856551} + - component: {fileID: 441856555} + - component: {fileID: 441856554} + - component: {fileID: 441856553} + - component: {fileID: 441856552} + m_Layer: 0 + m_Name: LeftCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &441856551 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 441856550} + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -4, y: 0, z: 0} + m_LocalScale: {x: 10, y: 10, z: 10} + m_Children: [] + m_Father: {fileID: 1374808486} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!81 &441856552 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 441856550} + m_Enabled: 1 +--- !u!92 &441856553 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 441856550} + m_Enabled: 1 +--- !u!124 &441856554 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 441856550} + m_Enabled: 1 +--- !u!20 &441856555 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 441856550} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 10 + field of view: 17 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: a9121db1a6b1c443fb39767c96cb1ed3, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &502808686 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 502808690} + - component: {fileID: 502808689} + - component: {fileID: 502808688} + - component: {fileID: 502808687} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &502808687 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 502808686} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &502808688 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 502808686} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &502808689 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 502808686} + 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 &502808690 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 502808686} + 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_Children: + - {fileID: 1942819082} + - {fileID: 1021282578} + - {fileID: 617153813} + - {fileID: 2079179064} + - {fileID: 1480609582} + - {fileID: 1253721739} + m_Father: {fileID: 0} + m_RootOrder: 6 + 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!1 &524142605 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 524142606} + - component: {fileID: 524142610} + - component: {fileID: 524142609} + - component: {fileID: 524142608} + - component: {fileID: 524142607} + m_Layer: 0 + m_Name: TopCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &524142606 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 524142605} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 4, z: 0} + m_LocalScale: {x: 10, y: 10, z: 10} + m_Children: [] + m_Father: {fileID: 1374808486} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!81 &524142607 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 524142605} + m_Enabled: 1 +--- !u!92 &524142608 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 524142605} + m_Enabled: 1 +--- !u!124 &524142609 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 524142605} + m_Enabled: 1 +--- !u!20 &524142610 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 524142605} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 10 + field of view: 17 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: 4bf99f420eecb4d14841917a1a5830fe, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &617153812 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 617153813} + - component: {fileID: 617153815} + - component: {fileID: 617153814} + m_Layer: 5 + m_Name: RawImageLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &617153813 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 617153812} + 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: [] + m_Father: {fileID: 502808690} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &617153814 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 617153812} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 8400000, guid: a9121db1a6b1c443fb39767c96cb1ed3, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &617153815 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 617153812} +--- !u!1 &898814857 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 898814860} + - component: {fileID: 898814859} + - component: {fileID: 898814858} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &898814858 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 898814857} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &898814859 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 898814857} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &898814860 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 898814857} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1021282577 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1021282578} + - component: {fileID: 1021282580} + - component: {fileID: 1021282579} + m_Layer: 5 + m_Name: RawImageBottom + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1021282578 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1021282577} + 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: [] + m_Father: {fileID: 502808690} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &1021282579 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1021282577} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 8400000, guid: f547bf7e1be7a4cd794d316baa8f21fb, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1021282580 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1021282577} +--- !u!1 &1253721738 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1253721739} + - component: {fileID: 1253721741} + - component: {fileID: 1253721740} + m_Layer: 5 + m_Name: RawImageFront + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1253721739 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1253721738} + 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: [] + m_Father: {fileID: 502808690} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 1, y: 0} +--- !u!114 &1253721740 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1253721738} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 8400000, guid: e4a4722373175490a93a7956b23953ec, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1253721741 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1253721738} +--- !u!1 &1299116141 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1299116143} + - component: {fileID: 1299116142} + m_Layer: 0 + m_Name: Light Probe Group + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!220 &1299116142 +LightProbeGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1299116141} + m_Enabled: 1 + m_SourcePositions: + - {x: 1, y: 1, z: 1} + - {x: 1, y: 1, z: -1} + - {x: 1, y: -1, z: 1} + - {x: 1, y: -1, z: -1} + - {x: -1, y: 1, z: 1} + - {x: -1, y: 1, z: -1} + - {x: -1, y: -1, z: 1} + - {x: -1, y: -1, z: -1} +--- !u!4 &1299116143 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1299116141} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1312088809 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1312088811} + - component: {fileID: 1312088810} + m_Layer: 0 + m_Name: ARKitLightManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1312088810 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1312088809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b95baf0d5f840f4bd22de86c996c08, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1312088811 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1312088809} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1354140585 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1354140586} + - component: {fileID: 1354140590} + - component: {fileID: 1354140589} + - component: {fileID: 1354140588} + - component: {fileID: 1354140587} + m_Layer: 0 + m_Name: 'BackCamera ' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1354140586 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1354140585} + m_LocalRotation: {x: -0, y: 1, z: -0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 4} + m_LocalScale: {x: 10, y: 10, z: 10} + m_Children: [] + m_Father: {fileID: 1374808486} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!81 &1354140587 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1354140585} + m_Enabled: 1 +--- !u!92 &1354140588 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1354140585} + m_Enabled: 1 +--- !u!124 &1354140589 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1354140585} + m_Enabled: 1 +--- !u!20 &1354140590 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1354140585} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 10 + field of view: 17 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: 8bf5451fa758d4c7cb976751e582bdc5, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &1374808482 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1374808486} + - component: {fileID: 1374808485} + - component: {fileID: 1374808484} + - component: {fileID: 1374808483} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1374808483 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1374808482} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: df83d7f64be1a4ef7b2c936b6de3c7a0, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!135 &1374808484 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1374808482} + 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!33 &1374808485 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1374808482} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1374808486 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1374808482} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 2077901980} + - {fileID: 1354140586} + - {fileID: 524142606} + - {fileID: 1705525079} + - {fileID: 441856551} + - {fileID: 2049354840} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1480609581 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1480609582} + - component: {fileID: 1480609584} + - component: {fileID: 1480609583} + m_Layer: 5 + m_Name: RawImageBack + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1480609582 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1480609581} + 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: [] + m_Father: {fileID: 502808690} + m_RootOrder: 4 + 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: 100, y: 100} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1480609583 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1480609581} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 8400000, guid: 8bf5451fa758d4c7cb976751e582bdc5, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1480609584 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1480609581} +--- !u!1 &1705525078 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1705525079} + - component: {fileID: 1705525083} + - component: {fileID: 1705525082} + - component: {fileID: 1705525081} + - component: {fileID: 1705525080} + m_Layer: 0 + m_Name: 'BottomCamera ' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1705525079 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1705525078} + m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: -4, z: 0} + m_LocalScale: {x: 10, y: 10, z: 10} + m_Children: [] + m_Father: {fileID: 1374808486} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!81 &1705525080 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1705525078} + m_Enabled: 1 +--- !u!92 &1705525081 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1705525078} + m_Enabled: 1 +--- !u!124 &1705525082 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1705525078} + m_Enabled: 1 +--- !u!20 &1705525083 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1705525078} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 10 + field of view: 17 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: f547bf7e1be7a4cd794d316baa8f21fb, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &1715245184 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1715245185} + - component: {fileID: 1715245187} + - component: {fileID: 1715245186} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1715245185 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1715245184} + 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: [] + m_Father: {fileID: 1942819082} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: -15} + m_SizeDelta: {x: 100, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1715245186 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1715245184} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Top +--- !u!222 &1715245187 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1715245184} +--- !u!1 &1942819081 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1942819082} + - component: {fileID: 1942819084} + - component: {fileID: 1942819083} + m_Layer: 5 + m_Name: RawImageTop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1942819082 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1942819081} + 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: 1715245185} + m_Father: {fileID: 502808690} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -100} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1942819083 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1942819081} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 8400000, guid: 4bf99f420eecb4d14841917a1a5830fe, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1942819084 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1942819081} +--- !u!1 &2049354839 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2049354840} + - component: {fileID: 2049354844} + - component: {fileID: 2049354843} + - component: {fileID: 2049354842} + - component: {fileID: 2049354841} + m_Layer: 0 + m_Name: RightCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2049354840 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2049354839} + m_LocalRotation: {x: -0, y: -0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 4, y: 0, z: 0} + m_LocalScale: {x: 10, y: 10, z: 10} + m_Children: [] + m_Father: {fileID: 1374808486} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0} +--- !u!81 &2049354841 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2049354839} + m_Enabled: 1 +--- !u!92 &2049354842 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2049354839} + m_Enabled: 1 +--- !u!124 &2049354843 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2049354839} + m_Enabled: 1 +--- !u!20 &2049354844 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2049354839} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 10 + field of view: 17 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: a9492362d6426443583dcad13f6515da, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &2077901979 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2077901980} + - component: {fileID: 2077901984} + - component: {fileID: 2077901983} + - component: {fileID: 2077901982} + - component: {fileID: 2077901981} + m_Layer: 0 + m_Name: FrontCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2077901980 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2077901979} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -4} + m_LocalScale: {x: 10, y: 10, z: 10} + m_Children: [] + m_Father: {fileID: 1374808486} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!81 &2077901981 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2077901979} + m_Enabled: 1 +--- !u!92 &2077901982 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2077901979} + m_Enabled: 1 +--- !u!124 &2077901983 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2077901979} + m_Enabled: 1 +--- !u!20 &2077901984 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2077901979} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 10 + field of view: 17 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: e4a4722373175490a93a7956b23953ec, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &2079179063 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2079179064} + - component: {fileID: 2079179066} + - component: {fileID: 2079179065} + m_Layer: 5 + m_Name: RawImageRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2079179064 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2079179063} + 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: [] + m_Father: {fileID: 502808690} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 1, y: 0.5} +--- !u!114 &2079179065 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2079179063} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 8400000, guid: a9492362d6426443583dcad13f6515da, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &2079179066 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2079179063} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceDirectionalLightEstimate.unity.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceDirectionalLightEstimate.unity.meta new file mode 100644 index 00000000..27bd5e50 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceDirectionalLightEstimate.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 360fd35caee4f4e069485021a27c0b06 +timeCreated: 1507762821 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceMeshScene.unity b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceMeshScene.unity new file mode 100644 index 00000000..1b7dac0c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceMeshScene.unity @@ -0,0 +1,441 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &392764811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 392764813} + - component: {fileID: 392764812} + m_Layer: 0 + m_Name: ARCameraTracker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &392764812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 961e52c3648614224b2a9dffa3055c07, type: 3} + m_Name: + m_EditorClassIdentifier: + trackedCamera: {fileID: 10} +--- !u!4 &392764813 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 392764811} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666032} + - component: {fileID: 1121666031} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARFaceMeshManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1121666030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Mesh: {fileID: 0} +--- !u!23 &1121666031 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!114 &1121666032 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: baec72e2006ae48df9dcbf0eb13377f9, type: 3} + m_Name: + m_EditorClassIdentifier: + meshFilter: {fileID: 1121666030} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: -180, z: 0} +--- !u!1 &1176133656 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1176133658} + - component: {fileID: 1176133657} + 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 &1176133657 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1176133656} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1176133658 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1176133656} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceMeshScene.unity.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceMeshScene.unity.meta new file mode 100644 index 00000000..88b80926 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/FaceMeshScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e95b28d2a95b34b868e407dc86a3e6d2 +timeCreated: 1505775273 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter.meta new file mode 100644 index 00000000..b4dfba9c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9e6346a0e785540a49eaae82317b2dfd +folderAsset: yes +timeCreated: 1510601314 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials.meta new file mode 100644 index 00000000..f1eebb5b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 82967c9358aa34ec6a0f6e29750c642a +folderAsset: yes +timeCreated: 1511933011 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials/sloth_all_1001_AlbedoTransparency.mat b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials/sloth_all_1001_AlbedoTransparency.mat new file mode 100644 index 00000000..65fa59c9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials/sloth_all_1001_AlbedoTransparency.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: sloth_all_1001_AlbedoTransparency + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _METALLICGLOSSMAP _NORMALMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 2800000, guid: 27a1657365e7440158436bc8e151d931, type: 3} + 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: 2800000, guid: b0a9b07b207264316bf3be95cdcf6a08, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 2800000, guid: 433a9cacc6e034c25a6a14eb6af1b09c, type: 3} + 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: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials/sloth_all_1001_AlbedoTransparency.mat.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials/sloth_all_1001_AlbedoTransparency.mat.meta new file mode 100644 index 00000000..7fd082e9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Materials/sloth_all_1001_AlbedoTransparency.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0eafc0c8e166e4cd2b0f64b71fda0c45 +timeCreated: 1511933011 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures.meta new file mode 100644 index 00000000..e4e76a95 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a488c610893e64a3289258a99af35e31 +folderAsset: yes +timeCreated: 1510204871 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_AlbedoTransparency.png b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_AlbedoTransparency.png new file mode 100644 index 00000000..48c8a492 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_AlbedoTransparency.png differ diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_AlbedoTransparency.png.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_AlbedoTransparency.png.meta new file mode 100644 index 00000000..32ba23a1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_AlbedoTransparency.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: b0a9b07b207264316bf3be95cdcf6a08 +timeCreated: 1510333546 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_MetallicSmoothness.png b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_MetallicSmoothness.png new file mode 100644 index 00000000..e3d13447 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_MetallicSmoothness.png differ diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_MetallicSmoothness.png.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_MetallicSmoothness.png.meta new file mode 100644 index 00000000..b757a69e --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_MetallicSmoothness.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 433a9cacc6e034c25a6a14eb6af1b09c +timeCreated: 1510333569 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_Normal.png b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_Normal.png new file mode 100644 index 00000000..75d0adc9 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_Normal.png differ diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_Normal.png.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_Normal.png.meta new file mode 100644 index 00000000..c01220cf --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/Textures/sloth_all_1001_Normal.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 27a1657365e7440158436bc8e151d931 +timeCreated: 1510333583 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/sloth_head_blendshapes5.fbx b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/sloth_head_blendshapes5.fbx new file mode 100644 index 00000000..d3342e3b Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/sloth_head_blendshapes5.fbx differ diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/sloth_head_blendshapes5.fbx.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/sloth_head_blendshapes5.fbx.meta new file mode 100644 index 00000000..cee834eb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter/sloth_head_blendshapes5.fbx.meta @@ -0,0 +1,86 @@ +fileFormatVersion: 2 +guid: 63ae12abc50414d5c882dbe18f6a820b +timeCreated: 1511933011 +licenseType: Pro +ModelImporter: + serializedVersion: 19 + fileIDToRecycleName: + 100000: blendshapes3 + 100002: Sloth_Head2 + 100004: //RootNode + 400000: blendshapes3 + 400002: Sloth_Head2 + 400004: //RootNode + 4300000: Sloth_Head2 + 9500000: //RootNode + 13700000: Sloth_Head2 + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 10 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + serializedVersion: 2 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + rootMotionBoneName: + rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceAnchorManager.cs b/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceAnchorManager.cs new file mode 100644 index 00000000..7f666819 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceAnchorManager.cs @@ -0,0 +1,71 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class UnityARFaceAnchorManager : MonoBehaviour { + + [SerializeField] + private GameObject anchorPrefab; + + private UnityARSessionNativeInterface m_session; + + // Use this for initialization + void Start () { + m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + + Application.targetFrameRate = 60; + ARKitFaceTrackingConfiguration config = new ARKitFaceTrackingConfiguration(); + config.alignment = UnityARAlignment.UnityARAlignmentGravity; + config.enableLightEstimation = true; + + if (config.IsSupported ) { + + m_session.RunWithConfig (config); + + UnityARSessionNativeInterface.ARFaceAnchorAddedEvent += FaceAdded; + UnityARSessionNativeInterface.ARFaceAnchorUpdatedEvent += FaceUpdated; + UnityARSessionNativeInterface.ARFaceAnchorRemovedEvent += FaceRemoved; + + } + + } + + void FaceAdded (ARFaceAnchor anchorData) + { + anchorPrefab.transform.position = UnityARMatrixOps.GetPosition (anchorData.transform); + anchorPrefab.transform.rotation = UnityARMatrixOps.GetRotation (anchorData.transform); + anchorPrefab.SetActive (true); + } + + void FaceUpdated (ARFaceAnchor anchorData) + { + if (anchorPrefab.activeSelf != anchorData.isTracked) + { + anchorPrefab.SetActive (anchorData.isTracked); + } + + if (anchorData.isTracked) + { + anchorPrefab.transform.position = UnityARMatrixOps.GetPosition (anchorData.transform); + anchorPrefab.transform.rotation = UnityARMatrixOps.GetRotation (anchorData.transform); + } + } + + void FaceRemoved (ARFaceAnchor anchorData) + { + anchorPrefab.SetActive (false); + } + + + + // Update is called once per frame + void Update () { + + } + + void OnDestroy() + { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceAnchorManager.cs.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceAnchorManager.cs.meta new file mode 100644 index 00000000..f6bdf03b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceAnchorManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fbb9909788bbd469bbce3102485cc0d9 +timeCreated: 1505951702 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceMeshManager.cs b/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceMeshManager.cs new file mode 100644 index 00000000..6de01ab7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceMeshManager.cs @@ -0,0 +1,84 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class UnityARFaceMeshManager : MonoBehaviour { + + [SerializeField] + private MeshFilter meshFilter; + + private UnityARSessionNativeInterface m_session; + private Mesh faceMesh; + + // Use this for initialization + void Start () { + m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + + Application.targetFrameRate = 60; + ARKitFaceTrackingConfiguration config = new ARKitFaceTrackingConfiguration(); + config.alignment = UnityARAlignment.UnityARAlignmentGravity; + config.enableLightEstimation = true; + + if (config.IsSupported && meshFilter != null) { + + m_session.RunWithConfig (config); + + UnityARSessionNativeInterface.ARFaceAnchorAddedEvent += FaceAdded; + UnityARSessionNativeInterface.ARFaceAnchorUpdatedEvent += FaceUpdated; + UnityARSessionNativeInterface.ARFaceAnchorRemovedEvent += FaceRemoved; + + } + + + } + + void FaceAdded (ARFaceAnchor anchorData) + { + gameObject.transform.localPosition = UnityARMatrixOps.GetPosition (anchorData.transform); + gameObject.transform.localRotation = UnityARMatrixOps.GetRotation (anchorData.transform); + + + faceMesh = new Mesh (); + faceMesh.vertices = anchorData.faceGeometry.vertices; + faceMesh.uv = anchorData.faceGeometry.textureCoordinates; + faceMesh.triangles = anchorData.faceGeometry.triangleIndices; + + // Assign the mesh object and update it. + faceMesh.RecalculateBounds(); + faceMesh.RecalculateNormals(); + meshFilter.mesh = faceMesh; + } + + void FaceUpdated (ARFaceAnchor anchorData) + { + if (faceMesh != null) { + gameObject.transform.localPosition = UnityARMatrixOps.GetPosition (anchorData.transform); + gameObject.transform.localRotation = UnityARMatrixOps.GetRotation (anchorData.transform); + faceMesh.vertices = anchorData.faceGeometry.vertices; + faceMesh.uv = anchorData.faceGeometry.textureCoordinates; + faceMesh.triangles = anchorData.faceGeometry.triangleIndices; + faceMesh.RecalculateBounds(); + faceMesh.RecalculateNormals(); + } + + } + + void FaceRemoved (ARFaceAnchor anchorData) + { + meshFilter.mesh = null; + faceMesh = null; + } + + + + // Update is called once per frame + void Update () { + + } + + void OnDestroy() + { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceMeshManager.cs.meta b/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceMeshManager.cs.meta new file mode 100644 index 00000000..fba6cd1d --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FaceTracking/UnityARFaceMeshManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: baec72e2006ae48df9dcbf0eb13377f9 +timeCreated: 1505951702 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare.meta new file mode 100644 index 00000000..50f53eb6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: af68919dbd7264d6584857ed14b907e6 +folderAsset: yes +timeCreated: 1504390677 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquare.cs b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquare.cs new file mode 100644 index 00000000..b100a5eb --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquare.cs @@ -0,0 +1,143 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class FocusSquare : MonoBehaviour { + + public enum FocusState { + Initializing, + Finding, + Found + } + + public GameObject findingSquare; + public GameObject foundSquare; + + //for editor version + public float maxRayDistance = 30.0f; + public LayerMask collisionLayerMask; + public float findingSquareDist = 0.5f; + + private FocusState squareState; + public FocusState SquareState { + get { + return squareState; + } + set { + squareState = value; + foundSquare.SetActive (squareState == FocusState.Found); + findingSquare.SetActive (squareState != FocusState.Found); + } + } + + bool trackingInitialized; + + // Use this for initialization + void Start () { + SquareState = FocusState.Initializing; + trackingInitialized = true; + } + + + bool HitTestWithResultType (ARPoint point, ARHitTestResultType resultTypes) + { + List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, resultTypes); + if (hitResults.Count > 0) { + foreach (var hitResult in hitResults) { + foundSquare.transform.position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); + foundSquare.transform.rotation = UnityARMatrixOps.GetRotation (hitResult.worldTransform); + Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", foundSquare.transform.position.x, foundSquare.transform.position.y, foundSquare.transform.position.z)); + return true; + } + } + return false; + } + + // Update is called once per frame + void Update () { + + //use center of screen for focusing + Vector3 center = new Vector3(Screen.width/2, Screen.height/2, findingSquareDist); + + #if UNITY_EDITOR + Ray ray = Camera.main.ScreenPointToRay (center); + RaycastHit hit; + + //we'll try to hit one of the plane collider gameobjects that were generated by the plugin + //effectively similar to calling HitTest with ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent + if (Physics.Raycast (ray, out hit, maxRayDistance, collisionLayerMask)) { + //we're going to get the position from the contact point + foundSquare.transform.position = hit.point; + Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", foundSquare.transform.position.x, foundSquare.transform.position.y, foundSquare.transform.position.z)); + + //and the rotation from the transform of the plane collider + SquareState = FocusState.Found; + foundSquare.transform.rotation = hit.transform.rotation; + return; + } + + + #else + var screenPosition = Camera.main.ScreenToViewportPoint(center); + ARPoint point = new ARPoint { + x = screenPosition.x, + y = screenPosition.y + }; + + // prioritize reults types + ARHitTestResultType[] resultTypes = { + ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent, + // if you want to use infinite planes use this: + //ARHitTestResultType.ARHitTestResultTypeExistingPlane, + //ARHitTestResultType.ARHitTestResultTypeHorizontalPlane, + //ARHitTestResultType.ARHitTestResultTypeFeaturePoint + }; + + foreach (ARHitTestResultType resultType in resultTypes) + { + if (HitTestWithResultType (point, resultType)) + { + SquareState = FocusState.Found; + return; + } + } + + #endif + + //if you got here, we have not found a plane, so if camera is facing below horizon, display the focus "finding" square + if (trackingInitialized) { + SquareState = FocusState.Finding; + + //check camera forward is facing downward + if (Vector3.Dot(Camera.main.transform.forward, Vector3.down) > 0) + { + + //position the focus finding square a distance from camera and facing up + findingSquare.transform.position = Camera.main.ScreenToWorldPoint(center); + + //vector from camera to focussquare + Vector3 vecToCamera = findingSquare.transform.position - Camera.main.transform.position; + + //find vector that is orthogonal to camera vector and up vector + Vector3 vecOrthogonal = Vector3.Cross(vecToCamera, Vector3.up); + + //find vector orthogonal to both above and up vector to find the forward vector in basis function + Vector3 vecForward = Vector3.Cross(vecOrthogonal, Vector3.up); + + + findingSquare.transform.rotation = Quaternion.LookRotation(vecForward,Vector3.up); + + } + else + { + //we will not display finding square if camera is not facing below horizon + findingSquare.SetActive(false); + } + + } + + } + + +} diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquare.cs.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquare.cs.meta new file mode 100644 index 00000000..7c3fc52b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquare.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 534fd29b1b9f645a28cf2f3deeaeda50 +timeCreated: 1504390678 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.controller b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.controller new file mode 100644 index 00000000..946e22a1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.controller @@ -0,0 +1,67 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: FocusSquareFinding + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 1107000555576970242} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &1102417429920230580 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: focuspulse + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 30f10be4bda0f4d1bb27b0f1ef492dcc, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: +--- !u!1107 &1107000555576970242 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 1102417429920230580} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 1102417429920230580} diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.controller.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.controller.meta new file mode 100644 index 00000000..52269058 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.controller.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cca9b37da3e7e458fba02babd2ee71b9 +timeCreated: 1504634087 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.mat b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.mat new file mode 100644 index 00000000..d6bfac2b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: FocusSquareFinding + m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + 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: 2800000, guid: 6f12b022b96934e8496f32281cfe574c, type: 3} + 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: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.mat.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.mat.meta new file mode 100644 index 00000000..5ff396f6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bdec2f90bd7304fd7859a64780a6947e +timeCreated: 1504393627 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.prefab b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.prefab new file mode 100644 index 00000000..9e9de033 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.prefab @@ -0,0 +1,129 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1079225684846008} + m_IsPrefabParent: 1 +--- !u!1 &1079225684846008 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4346840500143702} + - component: {fileID: 95971133279549186} + m_Layer: 0 + m_Name: FocusSquareFinding + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1914885197842632 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4521233104532860} + - component: {fileID: 33626701954220244} + - component: {fileID: 23099057984065350} + m_Layer: 0 + m_Name: 'Quad ' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4346840500143702 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1079225684846008} + 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: 4521233104532860} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4521233104532860 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1914885197842632} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.10000017, z: 1} + m_Children: [] + m_Father: {fileID: 4346840500143702} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!23 &23099057984065350 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1914885197842632} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: bdec2f90bd7304fd7859a64780a6947e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33626701954220244 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1914885197842632} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!95 &95971133279549186 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1079225684846008} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: cca9b37da3e7e458fba02babd2ee71b9, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.prefab.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.prefab.meta new file mode 100644 index 00000000..a72585ed --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFinding.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 455b404c52d7d4188bf02f3682baa204 +timeCreated: 1504390680 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFocused.prefab b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFocused.prefab new file mode 100644 index 00000000..4e221946 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFocused.prefab @@ -0,0 +1,111 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1414772738660142} + m_IsPrefabParent: 1 +--- !u!1 &1414772738660142 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4266624117467130} + m_Layer: 0 + m_Name: FocusSquareFocused + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1737289922828404 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4448547049399504} + - component: {fileID: 33099327791086394} + - component: {fileID: 23454377572920414} + m_Layer: 0 + m_Name: Quad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4266624117467130 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1414772738660142} + m_LocalRotation: {x: 0.00012207031, y: -0.013934742, z: -0, w: -0.9999029} + m_LocalPosition: {x: 0.33594143, y: -0.2882334, z: 0.38393554} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4448547049399504} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4448547049399504 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1737289922828404} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 1} + m_Children: [] + m_Father: {fileID: 4266624117467130} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!23 &23454377572920414 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1737289922828404} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5dc9e0ae01c204ce7b7517c8d59713e6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &33099327791086394 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1737289922828404} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFocused.prefab.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFocused.prefab.meta new file mode 100644 index 00000000..d6391279 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFocused.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ad2f8ea2bac7e4117ad509404bab9f73 +timeCreated: 1504390680 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFound.mat b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFound.mat new file mode 100644 index 00000000..2d2eecdd --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFound.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: FocusSquareFound + m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + 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: 2800000, guid: 4e0e8b7bcde33420a8c2731e0f3fbd57, type: 3} + 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: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFound.mat.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFound.mat.meta new file mode 100644 index 00000000..fce958de --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareFound.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5dc9e0ae01c204ce7b7517c8d59713e6 +timeCreated: 1504393627 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareScene.unity b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareScene.unity new file mode 100644 index 00000000..59ba6ac4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareScene.unity @@ -0,0 +1,1005 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_FalloffTable: + m_Table[0]: 0 + m_Table[1]: 0 + m_Table[2]: 0 + m_Table[3]: 0 + m_Table[4]: 0 + m_Table[5]: 0 + m_Table[6]: 0 + m_Table[7]: 0 + m_Table[8]: 0 + m_Table[9]: 0 + m_Table[10]: 0 + m_Table[11]: 0 + m_Table[12]: 0 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &359685852 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 747402897} + m_Modifications: + - target: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 455b404c52d7d4188bf02f3682baa204, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &747402895 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 747402897} + - component: {fileID: 747402896} + m_Layer: 0 + m_Name: FocusSquare + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &747402896 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 747402895} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 534fd29b1b9f645a28cf2f3deeaeda50, type: 3} + m_Name: + m_EditorClassIdentifier: + findingSquare: {fileID: 1752990997} + foundSquare: {fileID: 2045406692} + maxRayDistance: 30 + collisionLayerMask: + serializedVersion: 2 + m_Bits: 1024 + findingSquareDist: 0.5 +--- !u!4 &747402897 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 747402895} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.17645001, y: 0.17645001, z: 1.17645} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2045406693} + - {fileID: 1752990998} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1055835807 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4661046637869644, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4661046637869644, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4661046637869644, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + propertyPath: m_LocalPosition.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4661046637869644, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4661046637869644, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4661046637869644, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4661046637869644, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4661046637869644, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 8ce7d6271a01a4274a00066492aed04a, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 1 + getPointCloud: 1 + enableLightEstimation: 1 +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1657884802 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 747402897} + m_Modifications: + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_LocalPosition.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: ad2f8ea2bac7e4117ad509404bab9f73, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1752990997 stripped +GameObject: + m_PrefabParentObject: {fileID: 1079225684846008, guid: 455b404c52d7d4188bf02f3682baa204, + type: 2} + m_PrefabInternal: {fileID: 359685852} +--- !u!4 &1752990998 stripped +Transform: + m_PrefabParentObject: {fileID: 4346840500143702, guid: 455b404c52d7d4188bf02f3682baa204, + type: 2} + m_PrefabInternal: {fileID: 359685852} +--- !u!1 &2045406692 stripped +GameObject: + m_PrefabParentObject: {fileID: 1414772738660142, guid: ad2f8ea2bac7e4117ad509404bab9f73, + type: 2} + m_PrefabInternal: {fileID: 1657884802} +--- !u!4 &2045406693 stripped +Transform: + m_PrefabParentObject: {fileID: 4266624117467130, guid: ad2f8ea2bac7e4117ad509404bab9f73, + type: 2} + m_PrefabInternal: {fileID: 1657884802} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareScene.unity.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareScene.unity.meta new file mode 100644 index 00000000..3a2976d9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/FocusSquareScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c9ef824a7b95400bade362484e9b6af +timeCreated: 1504393453 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/focuspulse.anim b/Assets/UnityARKitPlugin/Examples/FocusSquare/focuspulse.anim new file mode 100644 index 00000000..f4afacb2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/focuspulse.anim @@ -0,0 +1,169 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: focuspulse + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: {x: 1, y: 1, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 0.5 + value: {x: 0.5, y: 0.5, z: 0.5} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: {x: 1, y: 1, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 3 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: [] diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/focuspulse.anim.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/focuspulse.anim.meta new file mode 100644 index 00000000..c28182d7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/focuspulse.anim.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 30f10be4bda0f4d1bb27b0f1ef492dcc +timeCreated: 1504634087 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquare.png b/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquare.png new file mode 100644 index 00000000..81d80fb8 Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquare.png differ diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquare.png.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquare.png.meta new file mode 100644 index 00000000..6448295f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquare.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 6f12b022b96934e8496f32281cfe574c +timeCreated: 1504393650 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquarefound.png b/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquarefound.png new file mode 100644 index 00000000..9c33ddcc Binary files /dev/null and b/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquarefound.png differ diff --git a/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquarefound.png.meta b/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquarefound.png.meta new file mode 100644 index 00000000..570790f9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/FocusSquare/focussquarefound.png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: 4e0e8b7bcde33420a8c2731e0f3fbd57 +timeCreated: 1504402917 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz.meta b/Assets/UnityARKitPlugin/Examples/UnityARBallz.meta new file mode 100644 index 00000000..d733f8db --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2082e391775a848b3922eee55f9e6de2 +folderAsset: yes +timeCreated: 1503604404 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMaker.cs b/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMaker.cs new file mode 100644 index 00000000..3cae7463 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMaker.cs @@ -0,0 +1,82 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class BallMaker : MonoBehaviour { + + public GameObject ballPrefab; + public float createHeight; + public float maxRayDistance = 30.0f; + public LayerMask collisionLayer = 1 << 10; //ARKitPlane layer + private MaterialPropertyBlock props; + + // Use this for initialization + void Start () { + props = new MaterialPropertyBlock (); + + } + + void CreateBall(Vector3 atPosition) + { + GameObject ballGO = Instantiate (ballPrefab, atPosition, Quaternion.identity); + + + float r = Random.Range(0.0f, 1.0f); + float g = Random.Range(0.0f, 1.0f); + float b = Random.Range(0.0f, 1.0f); + + props.SetColor("_InstanceColor", new Color(r, g, b)); + + MeshRenderer renderer = ballGO.GetComponent(); + renderer.SetPropertyBlock(props); + + } + + // Update is called once per frame + void Update () { + #if UNITY_EDITOR //we will only use this script on the editor side, though there is nothing that would prevent it from working on device + if (Input.GetMouseButtonDown (0)) + { + Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); + RaycastHit hit; + + //we'll try to hit one of the plane collider gameobjects that were generated by the plugin + //effectively similar to calling HitTest with ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent + if (Physics.Raycast (ray, out hit, maxRayDistance, collisionLayer)) + { + CreateBall (new Vector3 (hit.point.x, hit.point.y + createHeight, hit.point.z)); + + //we're going to get the position from the contact point + Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", hit.point.x, hit.point.y, hit.point.z)); + } + } + #else + if (Input.touchCount > 0 ) + { + var touch = Input.GetTouch(0); + if (touch.phase == TouchPhase.Began) + { + var screenPosition = Camera.main.ScreenToViewportPoint(touch.position); + ARPoint point = new ARPoint { + x = screenPosition.x, + y = screenPosition.y + }; + + List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, + ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent); + if (hitResults.Count > 0) { + foreach (var hitResult in hitResults) { + Vector3 position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); + CreateBall (new Vector3 (position.x, position.y + createHeight, position.z)); + break; + } + } + + } + } + #endif + + } + +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMaker.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMaker.cs.meta new file mode 100644 index 00000000..7d2d9ab7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMaker.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e8d14a82591ec4fcabb481f075ffeb53 +timeCreated: 1496972819 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMover.cs b/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMover.cs new file mode 100644 index 00000000..894b9916 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMover.cs @@ -0,0 +1,99 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class BallMover : MonoBehaviour { + + public GameObject collBallPrefab; + public float maxRayDistance = 30.0f; + public LayerMask collisionLayer = 1 << 10; //ARKitPlane layer + private GameObject collBallGO; + + // Use this for initialization + void Start () { + collBallGO = null; + } + + void CreateMoveBall( Vector3 explodePosition) + { + collBallGO = Instantiate (collBallPrefab, explodePosition, Quaternion.identity); + } + + // Update is called once per frame + void Update () { + #if UNITY_EDITOR //we will only use this script on the editor side, though there is nothing that would prevent it from working on device + if (Input.GetMouseButton (0)) + { + Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); + RaycastHit hit; + + //we'll try to hit one of the plane collider gameobjects that were generated by the plugin + //effectively similar to calling HitTest with ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent + if (Physics.Raycast (ray, out hit, maxRayDistance, collisionLayer)) + { + //we're going to get the position from the contact point + Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", hit.point.x, hit.point.y, hit.point.z)); + + if (collBallGO == null) + { + CreateMoveBall (hit.point); + } + else + { + collBallGO.transform.position = Vector3.MoveTowards (collBallGO.transform.position, hit.point, 0.05f); + } + } + } + else + { + //mouse button no longer down + Destroy(collBallGO); + collBallGO = null; + } + #else + if (Input.touchCount > 0 ) + { + var touch = Input.GetTouch(0); + if (touch.phase == TouchPhase.Began) { + var screenPosition = Camera.main.ScreenToViewportPoint (touch.position); + ARPoint point = new ARPoint { + x = screenPosition.x, + y = screenPosition.y + }; + + List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, + ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent); + if (hitResults.Count > 0) { + foreach (var hitResult in hitResults) { + Vector3 position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); + CreateMoveBall (position); + break; + } + } + + } else if (touch.phase == TouchPhase.Moved && collBallGO != null) { + var screenPosition = Camera.main.ScreenToViewportPoint (touch.position); + ARPoint point = new ARPoint { + x = screenPosition.x, + y = screenPosition.y + }; + + List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, + ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent); + if (hitResults.Count > 0) { + foreach (var hitResult in hitResults) { + Vector3 position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); + collBallGO.transform.position = Vector3.MoveTowards (collBallGO.transform.position, position, 0.05f); + break; + } + } + } else if (touch.phase != TouchPhase.Stationary) { //ended or cancelled + Destroy(collBallGO); + collBallGO = null; + + } + } + #endif + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMover.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMover.cs.meta new file mode 100644 index 00000000..96aed036 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/BallMover.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d7f6cc13442cf445295719af5da92de8 +timeCreated: 1496974880 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/Ballz.cs b/Assets/UnityARKitPlugin/Examples/UnityARBallz/Ballz.cs new file mode 100644 index 00000000..8e4c237b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/Ballz.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Ballz : MonoBehaviour { + + public float yDistanceThreshold; + + private float startingY; + + // Use this for initialization + void Start () { + startingY = transform.position.y; + } + + // Update is called once per frame + void Update () { + + if (Mathf.Abs (startingY - transform.position.y) > yDistanceThreshold) { + Destroy (gameObject); + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/Ballz.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityARBallz/Ballz.cs.meta new file mode 100644 index 00000000..134078c7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/Ballz.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2a2b4127da4fa4302b8db592636b3d55 +timeCreated: 1496967378 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/ModeSwitcher.cs b/Assets/UnityARKitPlugin/Examples/UnityARBallz/ModeSwitcher.cs new file mode 100644 index 00000000..7e0499b0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/ModeSwitcher.cs @@ -0,0 +1,39 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ModeSwitcher : MonoBehaviour { + + public GameObject ballMake; + public GameObject ballMove; + + private int appMode = 0; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + + void EnableBallCreation(bool enable) + { + ballMake.SetActive (enable); + ballMove.SetActive (!enable); + + } + + void OnGUI() + { + string modeString = appMode == 0 ? "MAKE" : "BREAK"; + if (GUI.Button(new Rect(Screen.width -150.0f, 0.0f, 150.0f, 100.0f), modeString)) + { + appMode = (appMode + 1) % 2; + EnableBallCreation (appMode == 0); + } + + } + +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/ModeSwitcher.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityARBallz/ModeSwitcher.cs.meta new file mode 100644 index 00000000..6cefde89 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/ModeSwitcher.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b892a4b0455dd4e378c69c09e1d48df4 +timeCreated: 1496987845 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/UnityARBallz.unity b/Assets/UnityARKitPlugin/Examples/UnityARBallz/UnityARBallz.unity new file mode 100644 index 00000000..646f1281 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/UnityARBallz.unity @@ -0,0 +1,539 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &225607811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 225607813} + - component: {fileID: 225607812} + m_Layer: 0 + m_Name: ModeChooser + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &225607812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 225607811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b892a4b0455dd4e378c69c09e1d48df4, type: 3} + m_Name: + m_EditorClassIdentifier: + ballMake: {fileID: 1845880258} + ballMove: {fileID: 1244397730} +--- !u!4 &225607813 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 225607811} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1244397730 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1244397731} + - component: {fileID: 1244397732} + m_Layer: 0 + m_Name: BallMover + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1244397731 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1244397730} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1244397732 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1244397730} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7f6cc13442cf445295719af5da92de8, type: 3} + m_Name: + m_EditorClassIdentifier: + collBallPrefab: {fileID: 1054048126866664, guid: 772733b9aeeb7481ea21ab0986f34715, + type: 2} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1845880258 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1845880259} + - component: {fileID: 1845880260} + m_Layer: 0 + m_Name: BallMaker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1845880259 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1845880258} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1845880260 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1845880258} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8d14a82591ec4fcabb481f075ffeb53, type: 3} + m_Name: + m_EditorClassIdentifier: + ballPrefab: {fileID: 1154719652421038, guid: e11b49885a57845e3b22a6355928ed72, type: 2} + createHeight: 0.03 diff --git a/Assets/UnityARKitPlugin/Examples/UnityARBallz/UnityARBallz.unity.meta b/Assets/UnityARKitPlugin/Examples/UnityARBallz/UnityARBallz.unity.meta new file mode 100644 index 00000000..76ac0fd5 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARBallz/UnityARBallz.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 75972bcfc855b486593ec2ec68da0b81 +timeCreated: 1496964608 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARKitScene.meta b/Assets/UnityARKitPlugin/Examples/UnityARKitScene.meta new file mode 100644 index 00000000..6633ba58 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARKitScene.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 81c8e3240e6624a1c9c093d35f99d1cf +folderAsset: yes +timeCreated: 1503626045 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARKitScene/UnityARKitScene.unity b/Assets/UnityARKitPlugin/Examples/UnityARKitScene/UnityARKitScene.unity new file mode 100644 index 00000000..a19c57b9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARKitScene/UnityARKitScene.unity @@ -0,0 +1,1046 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!1 &555720247 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 555720248} + - component: {fileID: 555720249} + m_Layer: 0 + m_Name: AR3DOFCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &555720248 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &555720249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0ff614c6973544218b2c1e3036b8de0a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679869} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + m_Layer: 0 + m_Name: HitCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1052679869 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + 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!33 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} + maxRayDistance: 30 + collisionLayer: + serializedVersion: 2 + m_Bits: 1024 +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} + startAlignment: 0 + planeDetection: 3 + getPointCloud: 1 + enableLightEstimation: 1 +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1153389248 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1153389250} + - component: {fileID: 1153389249} + m_Layer: 0 + m_Name: ARKitControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1153389249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4977b930c0f8843c8b8a101ba5bf3c8f, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1153389250 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1052679871} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2101518924 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2101518926} + - component: {fileID: 2101518925} + m_Layer: 0 + m_Name: PointCloudExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &2101518925 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c5ab0fdfbf2334e8dbbcdda6ceada7e3, type: 3} + m_Name: + m_EditorClassIdentifier: + numPointsToShow: 400 + PointCloudPrefab: {fileID: 1845574417345784, guid: 02d2a544d8d594d30b790e76398d0873, + type: 2} +--- !u!4 &2101518926 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.16720128, y: 0.18012214, z: 1.1454113} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/UnityARKitScene/UnityARKitScene.unity.meta b/Assets/UnityARKitPlugin/Examples/UnityARKitScene/UnityARKitScene.unity.meta new file mode 100644 index 00000000..1830f73e --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARKitScene/UnityARKitScene.unity.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c159f2591a9b5c843b0a0442451f78f8 diff --git a/Assets/UnityARKitPlugin/Examples/UnityAROcclusion.meta b/Assets/UnityARKitPlugin/Examples/UnityAROcclusion.meta new file mode 100644 index 00000000..c96a40d0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityAROcclusion.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ec50d8f0023aa44bc8abca2884b2c337 +folderAsset: yes +timeCreated: 1503626045 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityAROcclusion/UnityAROcclusion.unity b/Assets/UnityARKitPlugin/Examples/UnityAROcclusion/UnityAROcclusion.unity new file mode 100644 index 00000000..e1996a74 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityAROcclusion/UnityAROcclusion.unity @@ -0,0 +1,1037 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: 1 + m_CustomResolution: -1 + m_Strength: 0.437 + m_Bias: 0 + m_NormalBias: 0.52 + m_NearPlane: 0.1 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_FalloffTable: + m_Table[0]: 0 + m_Table[1]: 0 + m_Table[2]: 0 + m_Table[3]: 0 + m_Table[4]: 0 + m_Table[5]: 0 + m_Table[6]: 0 + m_Table[7]: 0 + m_Table[8]: 0 + m_Table[9]: 0 + m_Table[10]: 0 + m_Table[11]: 0 + m_Table[12]: 0 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!1 &555720247 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 555720248} + - component: {fileID: 555720249} + m_Layer: 0 + m_Name: AR3DOFCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &555720248 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &555720249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0ff614c6973544218b2c1e3036b8de0a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + m_Layer: 0 + m_Name: HitPlayer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 3ea44298aa419344dbdcf87dd1a50533, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 4300002, guid: f1d84cc28597f5641a3d9cbc4df7e306, type: 3} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1153389248 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1153389250} + - component: {fileID: 1153389249} + m_Layer: 0 + m_Name: ARKitControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1153389249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4977b930c0f8843c8b8a101ba5bf3c8f, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1153389250 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1052679871} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1983520619281468, guid: 9eb96f002ffce4560879b18f2e0502e5, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2101518924 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2101518926} + - component: {fileID: 2101518925} + m_Layer: 0 + m_Name: PointCloudExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &2101518925 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c5ab0fdfbf2334e8dbbcdda6ceada7e3, type: 3} + m_Name: + m_EditorClassIdentifier: + numPointsToShow: 400 + PointCloudPrefab: {fileID: 1845574417345784, guid: 02d2a544d8d594d30b790e76398d0873, + type: 2} +--- !u!4 &2101518926 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.16720128, y: 0.18012214, z: 1.1454113} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/UnityAROcclusion/UnityAROcclusion.unity.meta b/Assets/UnityARKitPlugin/Examples/UnityAROcclusion/UnityAROcclusion.unity.meta new file mode 100644 index 00000000..d21f7127 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityAROcclusion/UnityAROcclusion.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7f026c59fb9d6489ab924c6e0e119760 +timeCreated: 1497467387 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARShadows.meta b/Assets/UnityARKitPlugin/Examples/UnityARShadows.meta new file mode 100644 index 00000000..d64b2a0e --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARShadows.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2c5a49210742e49f6b01cc06377465be +folderAsset: yes +timeCreated: 1503626042 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityARShadows/UnityARShadows.unity b/Assets/UnityARKitPlugin/Examples/UnityARShadows/UnityARShadows.unity new file mode 100644 index 00000000..faab08e3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARShadows/UnityARShadows.unity @@ -0,0 +1,1023 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + - component: {fileID: 14} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce437cef046e841aabd6070890e79d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: 1 + m_CustomResolution: -1 + m_Strength: 0.437 + m_Bias: 0 + m_NormalBias: 0.52 + m_NearPlane: 0.1 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &481742511 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 481742512} + - component: {fileID: 481742513} + m_Layer: 0 + m_Name: PointCloudParticleExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &481742512 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &481742513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 481742511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec20d460fbb7e4f92b4d84a10da98cd9, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudParticlePrefab: {fileID: 198314236125653888, guid: 87db9decf4b3e4cb8bf3eea22ccd37f5, + type: 2} + maxPointsToShow: 10000 + particleSize: 0.01 +--- !u!1 &555720247 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 555720248} + - component: {fileID: 555720249} + m_Layer: 0 + m_Name: AR3DOFCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &555720248 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &555720249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555720247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0ff614c6973544218b2c1e3036b8de0a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!23 &732268494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 66fbc43c67b564bb4a4c2c2dcd6c1970, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &732268495 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + 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!33 &732268496 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &732268497 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 922811256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 0.3058, y: 0.3058, z: 0.3058} + m_Children: + - {fileID: 1563586580} + - {fileID: 985089624} + - {fileID: 2134794027} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &922811256 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 732268497} + - component: {fileID: 732268496} + - component: {fileID: 732268495} + - component: {fileID: 732268494} + m_Layer: 0 + m_Name: RandomCube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &985089623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 985089624} + - component: {fileID: 985089627} + - component: {fileID: 985089626} + - component: {fileID: 985089625} + m_Layer: 0 + m_Name: XAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &985089624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_LocalRotation: {x: -0.0000037178397, y: 0.0000024586916, z: -0.7071033, w: -0.7071102} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.03270111} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 10.865001, y: 2.6820002, z: 90} +--- !u!23 &985089625 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: aaae8be92ba59487a9946818d7a2017f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &985089626 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + 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!33 &985089627 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 985089623} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1052679867 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1052679871} + - component: {fileID: 1052679870} + - component: {fileID: 1052679868} + - component: {fileID: 1052679872} + m_Layer: 0 + m_Name: HitPlayer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1052679868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 3ea44298aa419344dbdcf87dd1a50533, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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 &1052679870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Mesh: {fileID: 4300002, guid: f1d84cc28597f5641a3d9cbc4df7e306, type: 3} +--- !u!4 &1052679871 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1286139108} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!114 &1052679872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1052679867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6941ec02ead994c9b848d640887441f1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HitTransform: {fileID: 1286139108} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1153389248 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1153389250} + - component: {fileID: 1153389249} + m_Layer: 0 + m_Name: ARKitControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1153389249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4977b930c0f8843c8b8a101ba5bf3c8f, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1153389250 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153389248} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1286139107 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286139108} + m_Layer: 0 + m_Name: HitCubeParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1286139108 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1286139107} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0, z: -2.98} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: + - {fileID: 1052679871} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1308259102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1308259104} + - component: {fileID: 1308259103} + m_Layer: 0 + m_Name: GeneratePlanes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1308259103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} + m_Name: + m_EditorClassIdentifier: + planePrefab: {fileID: 1983520619281468, guid: 696855730620a483c9ae4c242e312b28, + type: 2} +--- !u!4 &1308259104 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1308259102} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1563586579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1563586580} + - component: {fileID: 1563586583} + - component: {fileID: 1563586582} + - component: {fileID: 1563586581} + m_Layer: 0 + m_Name: YAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1563586580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.03270111, y: 1.3080444, z: 0.032701116} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1563586581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8fa2e9e7c08844dd4a8d581610839228, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &1563586582 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + 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!33 &1563586583 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1563586579} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2101518924 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2101518926} + - component: {fileID: 2101518925} + m_Layer: 0 + m_Name: PointCloudExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &2101518925 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c5ab0fdfbf2334e8dbbcdda6ceada7e3, type: 3} + m_Name: + m_EditorClassIdentifier: + numPointsToShow: 400 + PointCloudPrefab: {fileID: 1845574417345784, guid: 02d2a544d8d594d30b790e76398d0873, + type: 2} +--- !u!4 &2101518926 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2101518924} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.16720128, y: 0.18012214, z: 1.1454113} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2134794026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2134794027} + - component: {fileID: 2134794030} + - component: {fileID: 2134794029} + - component: {fileID: 2134794028} + m_Layer: 0 + m_Name: ZAxis + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2134794027 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_LocalRotation: {x: 0.49999562, y: 0.5000044, z: 0.49999562, w: 0.5000044} + m_LocalPosition: {x: -0.05, y: 0, z: 1} + m_LocalScale: {x: 0.03270111, y: 1.3080443, z: 0.032701112} + m_Children: [] + m_Father: {fileID: 732268497} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 89.999} +--- !u!23 &2134794028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d55ccb0db00e54a1696c1e96094d706d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &2134794029 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + 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!33 &2134794030 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2134794026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UnityARKitPlugin/Examples/UnityARShadows/UnityARShadows.unity.meta b/Assets/UnityARKitPlugin/Examples/UnityARShadows/UnityARShadows.unity.meta new file mode 100644 index 00000000..20facb93 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityARShadows/UnityARShadows.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 14d17ec7304f440b48e6b953ba7a5895 +timeCreated: 1497467387 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter.meta new file mode 100644 index 00000000..9b7ce011 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e746d1dc46f384723a49592cf820da3a +folderAsset: yes +timeCreated: 1503626042 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker.meta new file mode 100644 index 00000000..b5a60c8c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 42ca15f1893ea4df79823e4a752e0032 +folderAsset: yes +timeCreated: 1494022978 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor.meta new file mode 100755 index 00000000..5eaa116a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2a9e9df3c14e9034eb587348635c8f09 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor/BoxSliderEditor.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor/BoxSliderEditor.cs new file mode 100755 index 00000000..8e7cf450 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor/BoxSliderEditor.cs @@ -0,0 +1,65 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace UnityEditor.UI +{ + [CustomEditor(typeof(BoxSlider), true)] + [CanEditMultipleObjects] + public class BoxSliderEditor : SelectableEditor + { + + SerializedProperty m_HandleRect; + SerializedProperty m_MinValue; + SerializedProperty m_MaxValue; + SerializedProperty m_WholeNumbers; + SerializedProperty m_Value; + SerializedProperty m_ValueY; + SerializedProperty m_OnValueChanged; + + protected override void OnEnable() + { + base.OnEnable(); + m_HandleRect = serializedObject.FindProperty("m_HandleRect"); + + m_MinValue = serializedObject.FindProperty("m_MinValue"); + m_MaxValue = serializedObject.FindProperty("m_MaxValue"); + m_WholeNumbers = serializedObject.FindProperty("m_WholeNumbers"); + m_Value = serializedObject.FindProperty("m_Value"); + m_ValueY = serializedObject.FindProperty("m_ValueY"); + m_OnValueChanged = serializedObject.FindProperty("m_OnValueChanged"); + } + + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + EditorGUILayout.Space(); + + serializedObject.Update(); + + EditorGUILayout.PropertyField(m_HandleRect); + + if (m_HandleRect.objectReferenceValue != null) + { + EditorGUI.BeginChangeCheck(); + + + EditorGUILayout.PropertyField(m_MinValue); + EditorGUILayout.PropertyField(m_MaxValue); + EditorGUILayout.PropertyField(m_WholeNumbers); + EditorGUILayout.Slider(m_Value, m_MinValue.floatValue, m_MaxValue.floatValue); + EditorGUILayout.Slider(m_ValueY, m_MinValue.floatValue, m_MaxValue.floatValue); + + // Draw the event notification options + EditorGUILayout.Space(); + EditorGUILayout.PropertyField(m_OnValueChanged); + } + else + { + EditorGUILayout.HelpBox("Specify a RectTransform for the slider fill or the slider handle or both. Each must have a parent RectTransform that it can slide within.", MessageType.Info); + } + + serializedObject.ApplyModifiedProperties(); + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor/BoxSliderEditor.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor/BoxSliderEditor.cs.meta new file mode 100755 index 00000000..a2c5e766 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Editor/BoxSliderEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8701e045b26e51f4eb345f2ccb3c13f5 +timeCreated: 1426804458 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums.meta new file mode 100755 index 00000000..82e713f8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5d3904d3d18ddd544820bd8518990fee +folderAsset: yes +timeCreated: 1442586617 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums/ColorValues.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums/ColorValues.cs new file mode 100755 index 00000000..e6d6d6b3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums/ColorValues.cs @@ -0,0 +1,13 @@ +using UnityEngine; + +public enum ColorValues +{ + R, + G, + B, + A, + + Hue, + Saturation, + Value +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums/ColorValues.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums/ColorValues.cs.meta new file mode 100755 index 00000000..14a9745a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Enums/ColorValues.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 859a1720e083e504cb68917f781e87c7 +timeCreated: 1442586608 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events.meta new file mode 100755 index 00000000..cd2c8e5f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6bb0d49c64210014e9a24ed9345928c2 +folderAsset: yes +timeCreated: 1442747310 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/ColorChangedEvent.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/ColorChangedEvent.cs new file mode 100755 index 00000000..93637814 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/ColorChangedEvent.cs @@ -0,0 +1,9 @@ +using UnityEngine; +using System; +using UnityEngine.Events; + +[Serializable] +public class ColorChangedEvent : UnityEvent +{ + +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/ColorChangedEvent.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/ColorChangedEvent.cs.meta new file mode 100755 index 00000000..1bfe4df7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/ColorChangedEvent.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ff46fbecea7739f4690e4285c88f53c5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/HSVChangedEvent.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/HSVChangedEvent.cs new file mode 100755 index 00000000..11c5fa36 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/HSVChangedEvent.cs @@ -0,0 +1,7 @@ +using UnityEngine; +using UnityEngine.Events; + +public class HSVChangedEvent : UnityEvent +{ + +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/HSVChangedEvent.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/HSVChangedEvent.cs.meta new file mode 100755 index 00000000..4387ddae --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Events/HSVChangedEvent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3d95ce8fba3dbbf4eb14411412169b88 +timeCreated: 1442747317 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other.meta new file mode 100755 index 00000000..4a3612d3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 304681ea793fc054aa8ed2beab28d0b1 +folderAsset: yes +timeCreated: 1442751317 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/ColorPickerTester.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/ColorPickerTester.cs new file mode 100755 index 00000000..27fbdaf7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/ColorPickerTester.cs @@ -0,0 +1,24 @@ +using UnityEngine; +using System.Collections; + +public class ColorPickerTester : MonoBehaviour +{ + + public new Renderer renderer; + public ColorPicker picker; + + // Use this for initialization + void Start () + { + picker.onValueChanged.AddListener(color => + { + renderer.material.color = color; + }); + renderer.material.color = picker.CurrentColor; + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/ColorPickerTester.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/ColorPickerTester.cs.meta new file mode 100755 index 00000000..9c93c12c --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/ColorPickerTester.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 06851a815227e5044b0e3c1bf9b3a282 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/TiltWindow.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/TiltWindow.cs new file mode 100755 index 00000000..8325504f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/TiltWindow.cs @@ -0,0 +1,29 @@ +using UnityEngine; + +public class TiltWindow : MonoBehaviour +{ + public Vector2 range = new Vector2(5f, 3f); + + Transform mTrans; + Quaternion mStart; + Vector2 mRot = Vector2.zero; + + void Start () + { + mTrans = transform; + mStart = mTrans.localRotation; + } + + void Update () + { + Vector3 pos = Input.mousePosition; + + float halfWidth = Screen.width * 0.5f; + float halfHeight = Screen.height * 0.5f; + float x = Mathf.Clamp((pos.x - halfWidth) / halfWidth, -1f, 1f); + float y = Mathf.Clamp((pos.y - halfHeight) / halfHeight, -1f, 1f); + mRot = Vector2.Lerp(mRot, new Vector2(x, y), Time.deltaTime * 5f); + + mTrans.localRotation = mStart * Quaternion.Euler(-mRot.y * range.y, mRot.x * range.x, 0f); + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/TiltWindow.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/TiltWindow.cs.meta new file mode 100755 index 00000000..2d4c0750 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Other/TiltWindow.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f2aa04a3e088320429a06194a3483daa +timeCreated: 1426051352 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Picker 2.0.prefab b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Picker 2.0.prefab new file mode 100644 index 00000000..915b9187 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Picker 2.0.prefab @@ -0,0 +1,7144 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &102730 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22464350} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &103988 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22419704} + - component: {fileID: 22202916} + - component: {fileID: 11461748} + - component: {fileID: 11434628} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &108322 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22463192} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109170 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22483054} + - component: {fileID: 22289050} + - component: {fileID: 11460492} + - component: {fileID: 11448474} + - component: {fileID: 11400974} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109276 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22497436} + - component: {fileID: 11475674} + m_Layer: 5 + m_Name: ColorBox + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109518 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22473052} + - component: {fileID: 11455040} + m_Layer: 5 + m_Name: A + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109650 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22471500} + - component: {fileID: 11413242} + - component: {fileID: 11459034} + - component: {fileID: 11481106} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109862 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22463646} + - component: {fileID: 22208894} + - component: {fileID: 11419324} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109976 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22499384} + - component: {fileID: 22236658} + - component: {fileID: 11484674} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &110962 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22407396} + - component: {fileID: 22269076} + - component: {fileID: 11443566} + - component: {fileID: 11469678} + - component: {fileID: 11453686} + m_Layer: 5 + m_Name: Preset (8) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &113042 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22498948} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &113862 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22449618} + - component: {fileID: 11452006} + m_Layer: 5 + m_Name: R + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &114640 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22462156} + - component: {fileID: 11499806} + - component: {fileID: 11469788} + m_Layer: 5 + m_Name: Hue + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &117174 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22446600} + - component: {fileID: 22261740} + - component: {fileID: 11457280} + - component: {fileID: 11463028} + - component: {fileID: 11483982} + m_Layer: 5 + m_Name: InputField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &118516 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22404596} + - component: {fileID: 22258132} + - component: {fileID: 11435316} + - component: {fileID: 11482782} + - component: {fileID: 11479482} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &118568 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22462880} + - component: {fileID: 11424766} + - component: {fileID: 22222454} + - component: {fileID: 11436574} + - component: {fileID: 11463516} + m_Layer: 5 + m_Name: BoxSlider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &118848 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22422480} + - component: {fileID: 11451352} + m_Layer: 5 + m_Name: Seperator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &119204 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22486906} + m_Layer: 5 + m_Name: ColorBox Container + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &119286 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22467618} + - component: {fileID: 22215766} + - component: {fileID: 11475176} + - component: {fileID: 11433944} + - component: {fileID: 11411592} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &120788 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22479018} + - component: {fileID: 22267742} + - component: {fileID: 11449214} + - component: {fileID: 11431864} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &123062 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22409896} + - component: {fileID: 22213064} + - component: {fileID: 11499970} + - component: {fileID: 11480596} + - component: {fileID: 11417916} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &124486 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22488338} + - component: {fileID: 22252030} + - component: {fileID: 11417700} + - component: {fileID: 11496660} + - component: {fileID: 11491764} + m_Layer: 5 + m_Name: Preset (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &127516 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22475824} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &134460 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22448238} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &134618 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22446644} + - component: {fileID: 22206792} + - component: {fileID: 11428072} + - component: {fileID: 11453048} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &135120 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22469358} + - component: {fileID: 22294074} + - component: {fileID: 11498926} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &137072 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22432592} + - component: {fileID: 22241672} + - component: {fileID: 11429028} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &138390 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22477690} + - component: {fileID: 22214548} + - component: {fileID: 11443082} + - component: {fileID: 11412718} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &141026 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22429276} + - component: {fileID: 22296874} + - component: {fileID: 11478032} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &142866 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22465820} + - component: {fileID: 22217064} + - component: {fileID: 11487346} + - component: {fileID: 11468552} + - component: {fileID: 11477610} + m_Layer: 5 + m_Name: Preset (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &144296 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22475684} + - component: {fileID: 11493476} + m_Layer: 5 + m_Name: H + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &145996 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22402782} + - component: {fileID: 22281664} + - component: {fileID: 11477674} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &147170 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22410840} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &150014 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22431826} + - component: {fileID: 22214676} + - component: {fileID: 11426072} + - component: {fileID: 11487120} + - component: {fileID: 11424714} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &150098 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22478158} + - component: {fileID: 11496146} + m_Layer: 5 + m_Name: S + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &150874 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22498864} + - component: {fileID: 22223566} + - component: {fileID: 11469324} + - component: {fileID: 11410684} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &152064 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22466750} + - component: {fileID: 22224878} + - component: {fileID: 11487462} + - component: {fileID: 11431838} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &154358 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22489920} + - component: {fileID: 11469644} + - component: {fileID: 11495366} + - component: {fileID: 11422346} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &155710 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22485188} + - component: {fileID: 11437434} + - component: {fileID: 11400472} + - component: {fileID: 22284168} + - component: {fileID: 11401494} + m_Layer: 5 + m_Name: Presets + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &157080 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22465756} + - component: {fileID: 22222340} + - component: {fileID: 11457780} + - component: {fileID: 11404692} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &157272 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22448498} + - component: {fileID: 22269110} + - component: {fileID: 11426166} + - component: {fileID: 11423364} + m_Layer: 5 + m_Name: Picker 2.0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &157484 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22447314} + - component: {fileID: 22257106} + - component: {fileID: 11437926} + - component: {fileID: 11482438} + - component: {fileID: 11443026} + m_Layer: 5 + m_Name: Preset (0) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &158070 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22441130} + - component: {fileID: 22216992} + - component: {fileID: 11464698} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &160884 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22437272} + - component: {fileID: 22226060} + - component: {fileID: 11432620} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &161688 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22416876} + - component: {fileID: 11456442} + - component: {fileID: 11415364} + - component: {fileID: 11472300} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &163020 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22413650} + - component: {fileID: 22221616} + - component: {fileID: 11407460} + - component: {fileID: 11482098} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &165534 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22445236} + - component: {fileID: 22243436} + - component: {fileID: 11415580} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &165936 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22412396} + - component: {fileID: 11452336} + m_Layer: 5 + m_Name: V + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &165956 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22468756} + m_Layer: 5 + m_Name: HSVField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &167088 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22490310} + - component: {fileID: 22296602} + - component: {fileID: 11419450} + - component: {fileID: 11428986} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &167200 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22431028} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &167636 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22453238} + - component: {fileID: 22224940} + - component: {fileID: 11425880} + - component: {fileID: 11455240} + - component: {fileID: 11495652} + m_Layer: 5 + m_Name: Preset (9) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &167830 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22487740} + - component: {fileID: 22228438} + - component: {fileID: 11489756} + - component: {fileID: 11401102} + - component: {fileID: 11482746} + m_Layer: 5 + m_Name: Create Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &168798 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22463286} + - component: {fileID: 11459258} + m_Layer: 5 + m_Name: B + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &168892 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22490412} + - component: {fileID: 22218658} + - component: {fileID: 11448266} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &169152 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22422416} + - component: {fileID: 22287232} + - component: {fileID: 11430666} + - component: {fileID: 11421370} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &169390 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22415604} + - component: {fileID: 11463640} + m_Layer: 5 + m_Name: Sliders + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &169426 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22464540} + - component: {fileID: 11444998} + - component: {fileID: 11427848} + - component: {fileID: 11446360} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &173810 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22445984} + - component: {fileID: 22216614} + - component: {fileID: 11426590} + - component: {fileID: 11487238} + - component: {fileID: 11408032} + m_Layer: 5 + m_Name: Preset (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &174742 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22460006} + - component: {fileID: 22260376} + - component: {fileID: 11494638} + - component: {fileID: 11485084} + - component: {fileID: 11469158} + m_Layer: 5 + m_Name: Preset (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &176944 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22446496} + - component: {fileID: 22208798} + - component: {fileID: 11459056} + - component: {fileID: 11488000} + m_Layer: 5 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &184328 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22455926} + - component: {fileID: 22240504} + - component: {fileID: 11425336} + - component: {fileID: 11485672} + - component: {fileID: 11482218} + m_Layer: 5 + m_Name: Preset (7) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &185536 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22423050} + - component: {fileID: 22282672} + - component: {fileID: 11489330} + - component: {fileID: 11403544} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &185578 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22439774} + - component: {fileID: 22263392} + - component: {fileID: 11429486} + - component: {fileID: 11481940} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &186436 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22468616} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &187878 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22484834} + - component: {fileID: 22278160} + - component: {fileID: 11441004} + - component: {fileID: 11452934} + - component: {fileID: 11439404} + m_Layer: 5 + m_Name: Preset (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &188196 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22493148} + - component: {fileID: 22254392} + - component: {fileID: 11421558} + - component: {fileID: 11418062} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &188290 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22460246} + - component: {fileID: 11435842} + m_Layer: 5 + m_Name: Seperator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &189222 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22474838} + - component: {fileID: 11460148} + - component: {fileID: 11477176} + - component: {fileID: 11411114} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &190312 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22462776} + - component: {fileID: 22230530} + - component: {fileID: 11430478} + - component: {fileID: 11436886} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &190688 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22410532} + - component: {fileID: 22222836} + - component: {fileID: 11410848} + - component: {fileID: 11435758} + - component: {fileID: 11414424} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &191318 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22476772} + - component: {fileID: 11423356} + - component: {fileID: 11488972} + - component: {fileID: 11457668} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &192330 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22413792} + - component: {fileID: 22255370} + - component: {fileID: 11461114} + m_Layer: 5 + m_Name: Color + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &192924 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22471252} + - component: {fileID: 22247702} + - component: {fileID: 11454424} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &194224 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22489814} + - component: {fileID: 11476502} + m_Layer: 5 + m_Name: ColorField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &194704 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22415658} + - component: {fileID: 22220132} + - component: {fileID: 11418286} + - component: {fileID: 11470716} + - component: {fileID: 11415596} + m_Layer: 5 + m_Name: Preset (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &194772 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22407456} + - component: {fileID: 22254790} + - component: {fileID: 11476698} + - component: {fileID: 11493426} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &196384 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22449292} + - component: {fileID: 11417476} + - component: {fileID: 11468650} + - component: {fileID: 11424932} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &196948 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22421016} + - component: {fileID: 11407234} + m_Layer: 5 + m_Name: G + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &197314 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22400824} + - component: {fileID: 22221412} + - component: {fileID: 11407662} + - component: {fileID: 11413310} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &197864 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22405742} + - component: {fileID: 22217712} + - component: {fileID: 11415718} + - component: {fileID: 11429994} + - component: {fileID: 11445998} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &198926 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22419058} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11400472 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155710} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 1 + m_Right: 1 + m_Top: 1 + m_Bottom: 1 + m_ChildAlignment: 0 + m_Spacing: 1 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11400974 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109170} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11401102 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167830} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11489756} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: CreatePresetButton + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11401494 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155710} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.1544118, g: 0.1544118, b: 0.1544118, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 2 + m_PreserveAspect: 0 + m_FillCenter: 0 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11403544 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185536} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 2 + direction: 0 +--- !u!114 &11404692 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157080} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 1 + direction: 0 +--- !u!114 &11407234 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 196948} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11407460 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 163020} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!114 &11407662 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197314} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!114 &11408032 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173810} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11410684 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150874} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 6 + direction: 0 +--- !u!114 &11410848 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 255 +--- !u!114 &11411114 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + type: 2 +--- !u!114 &11411592 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 119286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11412718 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 138390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11413242 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109650} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11415580} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 22445236} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11413310 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197314} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 0 + direction: 0 +--- !u!114 &11414424 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11415364 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11415580 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165534} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11415596 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194704} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11415718 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11417476 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 196384} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11478032} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 22429276} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11417700 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 124486} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7205882, g: 0.5700394, b: 0.1748486, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11417916 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 123062} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11418062 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 188196} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11418286 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194704} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11419324 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109862} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter text... +--- !u!114 &11419450 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167088} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: + +--- !u!114 &11421370 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169152} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11421558 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 188196} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: A +--- !u!114 &11422346 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 154358} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + type: 5 +--- !u!114 &11423356 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 191318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11432620} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 22437272} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11423364 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157272} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8262e4a8322117f4da079921eaa72834, type: 3} + m_Name: + m_EditorClassIdentifier: + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: ColorChangedEvent, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, + PublicKeyToken=null +--- !u!114 &11424714 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150014} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11424766 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118568} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 37c44bc94a9a7f241b5b552f3ff89458, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: 4e6f726d616c + m_HighlightedTrigger: 486967686c696768746564 + m_PressedTrigger: 50726573736564 + m_DisabledTrigger: 44697361626c6564 + m_Interactable: 1 + m_TargetGraphic: {fileID: 11436574} + m_HandleRect: {fileID: 22499384} + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 1 + m_ValueY: 1 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.BoxSlider+BoxSliderEvent, Assembly-CSharp, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11424932 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 196384} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + type: 6 +--- !u!114 &11425336 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 184328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11425880 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11426072 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150014} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11426166 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157272} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11426590 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173810} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11427848 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169426} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11428072 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134618} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: G +--- !u!114 &11428986 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167088} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &11429028 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137072} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11429486 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185578} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 2 + height: 1 +--- !u!114 &11429994 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 5 + prefix: + minValue: 0 + maxValue: 255 + precision: 0 +--- !u!114 &11430478 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190312} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: R +--- !u!114 &11430666 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169152} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: S +--- !u!114 &11431838 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152064} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11431864 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 120788} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 4 + direction: 0 +--- !u!114 &11432620 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 160884} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11433944 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 119286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 1 + prefix: + minValue: 0 + maxValue: 255 + precision: 0 +--- !u!114 &11434628 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 103988} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 5 + direction: 0 +--- !u!114 &11435316 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118516} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11435758 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 3 + prefix: + minValue: 0 + maxValue: 255 + precision: 0 +--- !u!114 &11435842 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 188290} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 1 + m_FlexibleHeight: 1 + m_LayoutPriority: 1 +--- !u!114 &11436574 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118568} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!114 &11436886 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190312} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11437434 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155710} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0923373e76e77402c9c53a2f1250ad3e, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + presets: + - {fileID: 157484} + - {fileID: 187878} + - {fileID: 124486} + - {fileID: 174742} + - {fileID: 194704} + - {fileID: 173810} + - {fileID: 142866} + - {fileID: 184328} + - {fileID: 110962} + - {fileID: 167636} + createPresetImage: {fileID: 11489756} +--- !u!114 &11437926 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157484} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7647059, g: 0.19117647, b: 0.19117647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11439404 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 187878} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11441004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 187878} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.21366784, g: 0.7647059, b: 0.30867442, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11443026 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157484} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 18 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11443082 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 138390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: V +--- !u!114 &11443566 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110962} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11444998 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169426} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11498926} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 22469358} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11445998 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11446360 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169426} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + type: 1 +--- !u!114 &11448266 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168892} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!114 &11448474 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109170} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 4 + prefix: + minValue: 0 + maxValue: 255 + precision: 0 +--- !u!114 &11449214 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 120788} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!114 &11451352 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118848} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 1 + m_FlexibleHeight: 1 + m_LayoutPriority: 1 +--- !u!114 &11452006 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113862} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11452336 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165936} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11452934 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 187878} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11441004} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11441004} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11453048 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134618} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11453686 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110962} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11454424 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11455040 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11455240 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11425880} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11425880} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11456442 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11477674} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 22402782} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11457280 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 117174} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11457668 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 191318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + type: 4 +--- !u!114 &11457780 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157080} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!114 &11459034 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109650} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11459056 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176944} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11459258 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168798} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11460148 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11429028} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 22432592} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11460492 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109170} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11461114 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192330} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.39215687} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 0 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11461748 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 103988} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!114 &11463028 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 117174} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11457280} + m_TextComponent: {fileID: 11448266} + m_Placeholder: {fileID: 11419324} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &11463516 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118568} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e4240873631f724496efec97d7151b3, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} +--- !u!114 &11463640 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11464698 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 158070} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11468552 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142866} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11487346} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11487346} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11468650 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 196384} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11469158 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11469324 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150874} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!114 &11469644 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 154358} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11454424} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 22471252} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11469678 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110962} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11443566} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11443566} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11469788 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114640} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + type: 4 +--- !u!114 &11470716 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194704} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11418286} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11418286} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11472300 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + type: 0 +--- !u!114 &11475176 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 119286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11475674 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1254083943, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AspectMode: 3 + m_AspectRatio: 1 +--- !u!114 &11476502 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194224} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 0 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11476698 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194772} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: B +--- !u!114 &11477176 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11477610 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142866} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11477674 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11478032 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 141026} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11479482 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118516} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11480596 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 123062} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 0 + prefix: + minValue: 0 + maxValue: 255 + precision: 0 +--- !u!114 &11481106 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109650} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + type: 3 +--- !u!114 &11481940 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185578} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 4 + direction: 2 +--- !u!114 &11482098 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 163020} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 3 + direction: 0 +--- !u!114 &11482218 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 184328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11482438 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157484} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11437926} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11437926} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11482746 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167830} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11482782 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118516} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 2 + prefix: + minValue: 0 + maxValue: 255 + precision: 0 +--- !u!114 &11483982 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 117174} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d85c534b3c1560544b09d0996dfeba84, type: 3} + m_Name: + m_EditorClassIdentifier: + hsvpicker: {fileID: 11423364} + displayAlpha: 0 +--- !u!114 &11484674 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109976} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11485084 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11494638} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11494638} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11485672 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 184328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11425336} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11425336} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11487120 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150014} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} + type: 6 + prefix: + minValue: 0 + maxValue: 255 + precision: 0 +--- !u!114 &11487238 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173810} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11426590} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11426590} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11487346 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142866} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11487462 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152064} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: H +--- !u!114 &11488000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176944} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bca58eb07ad66b498a2f158bcb13225, type: 3} + m_Name: + m_EditorClassIdentifier: + picker: {fileID: 11423364} +--- !u!114 &11488972 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 191318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11489330 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185536} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!114 &11489756 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167830} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11491764 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 124486} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11493426 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194772} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11493476 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 144296} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11494638 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11495366 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 154358} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11495652 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &11496146 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150098} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &11496660 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 124486} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11417700} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11437434} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 11417700} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11498926 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135120} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11499806 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114640} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11464698} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 22441130} + m_Direction: 2 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11499970 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 123062} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &22202916 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 103988} +--- !u!222 &22206792 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134618} +--- !u!222 &22208798 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176944} +--- !u!222 &22208894 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109862} +--- !u!222 &22213064 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 123062} +--- !u!222 &22214548 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 138390} +--- !u!222 &22214676 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150014} +--- !u!222 &22215766 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 119286} +--- !u!222 &22216614 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173810} +--- !u!222 &22216992 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 158070} +--- !u!222 &22217064 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142866} +--- !u!222 &22217712 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197864} +--- !u!222 &22218658 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168892} +--- !u!222 &22220132 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194704} +--- !u!222 &22221412 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197314} +--- !u!222 &22221616 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 163020} +--- !u!222 &22222340 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157080} +--- !u!222 &22222454 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118568} +--- !u!222 &22222836 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190688} +--- !u!222 &22223566 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150874} +--- !u!222 &22224878 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152064} +--- !u!222 &22224940 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167636} +--- !u!222 &22226060 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 160884} +--- !u!222 &22228438 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167830} +--- !u!222 &22230530 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190312} +--- !u!222 &22236658 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109976} +--- !u!222 &22240504 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 184328} +--- !u!222 &22241672 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137072} +--- !u!222 &22243436 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165534} +--- !u!222 &22247702 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192924} +--- !u!222 &22252030 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 124486} +--- !u!222 &22254392 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 188196} +--- !u!222 &22254790 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194772} +--- !u!222 &22255370 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192330} +--- !u!222 &22257106 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157484} +--- !u!222 &22258132 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118516} +--- !u!222 &22260376 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174742} +--- !u!222 &22261740 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 117174} +--- !u!222 &22263392 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185578} +--- !u!222 &22267742 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 120788} +--- !u!222 &22269076 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110962} +--- !u!222 &22269110 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157272} +--- !u!222 &22278160 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 187878} +--- !u!222 &22281664 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145996} +--- !u!222 &22282672 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185536} +--- !u!222 &22284168 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155710} +--- !u!222 &22287232 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169152} +--- !u!222 &22289050 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109170} +--- !u!222 &22294074 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135120} +--- !u!222 &22296602 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167088} +--- !u!222 &22296874 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 141026} +--- !u!224 &22400824 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197314} + 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: [] + m_Father: {fileID: 22416876} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22402782 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145996} + 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: [] + m_Father: {fileID: 22498948} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22404596 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118516} + 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: [] + m_Father: {fileID: 22463286} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22405742 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197864} + 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: [] + m_Father: {fileID: 22478158} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22407396 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110962} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 185.45453, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22407456 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194772} + 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: [] + m_Father: {fileID: 22463286} + 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.5, y: 0.5} +--- !u!224 &22409896 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 123062} + 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: [] + m_Father: {fileID: 22449618} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22410532 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190688} + 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: [] + m_Father: {fileID: 22473052} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22410840 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 147170} + 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: 22469358} + m_Father: {fileID: 22464540} + m_RootOrder: 1 + 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!224 &22412396 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165936} + 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: 22477690} + - {fileID: 22449292} + - {fileID: 22431826} + m_Father: {fileID: 22415604} + m_RootOrder: 6 + 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.5, y: 0.5} +--- !u!224 &22413650 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 163020} + 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: [] + m_Father: {fileID: 22471500} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22413792 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192330} + 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: 22446496} + m_Father: {fileID: 22489814} + 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.5, y: 0.5} +--- !u!224 &22415604 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169390} + 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: 22449618} + - {fileID: 22421016} + - {fileID: 22463286} + - {fileID: 22460246} + - {fileID: 22475684} + - {fileID: 22478158} + - {fileID: 22412396} + - {fileID: 22422480} + - {fileID: 22473052} + m_Father: {fileID: 22448498} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 170} + m_SizeDelta: {x: 0, y: 145} + m_Pivot: {x: 0.5, y: 1} +--- !u!224 &22415658 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194704} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 98.181816, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22416876 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161688} + 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: 22400824} + - {fileID: 22498948} + m_Father: {fileID: 22449618} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22419058 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 198926} + 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: 22471252} + m_Father: {fileID: 22489920} + m_RootOrder: 1 + 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!224 &22419704 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 103988} + 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: [] + m_Father: {fileID: 22489920} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22421016 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 196948} + 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: 22446644} + - {fileID: 22464540} + - {fileID: 22467618} + m_Father: {fileID: 22415604} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22422416 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169152} + 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: [] + m_Father: {fileID: 22478158} + 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.5, y: 0.5} +--- !u!224 &22422480 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118848} + 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: [] + m_Father: {fileID: 22415604} + m_RootOrder: 7 + 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.5, y: 0.5} +--- !u!224 &22423050 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185536} + 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: [] + m_Father: {fileID: 22474838} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22429276 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 141026} + 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: [] + m_Father: {fileID: 22431028} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22431028 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167200} + 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: 22429276} + m_Father: {fileID: 22449292} + m_RootOrder: 1 + 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!224 &22431826 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150014} + 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: [] + m_Father: {fileID: 22412396} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22432592 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137072} + 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: [] + m_Father: {fileID: 22463192} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22437272 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 160884} + 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: [] + m_Father: {fileID: 22475824} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22439774 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185578} + 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: [] + m_Father: {fileID: 22462156} + 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!224 &22441130 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 158070} + 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: [] + m_Father: {fileID: 22468616} + 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: 8} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22445236 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165534} + 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: [] + m_Father: {fileID: 22464350} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22445984 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173810} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 120, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22446496 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176944} + 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: [] + m_Father: {fileID: 22413792} + 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!224 &22446600 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 117174} + 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: 22463646} + - {fileID: 22490412} + m_Father: {fileID: 22489814} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22446644 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134618} + 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: [] + m_Father: {fileID: 22421016} + 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.5, y: 0.5} +--- !u!224 &22447314 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157484} + 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: [] + m_Father: {fileID: 22485188} + 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.5, y: 0.5} +--- !u!224 &22448238 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134460} + 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: 22499384} + m_Father: {fileID: 22462880} + 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: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22448498 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157272} + 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: 22489814} + - {fileID: 22468756} + - {fileID: 22415604} + - {fileID: 22485188} + m_Father: {fileID: 0} + 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: 0, y: 0} + m_SizeDelta: {x: 800, y: 800} + m_Pivot: {x: 0, y: 1} +--- !u!224 &22449292 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 196384} + 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: 22498864} + - {fileID: 22431028} + m_Father: {fileID: 22412396} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22449618 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113862} + 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: 22462776} + - {fileID: 22416876} + - {fileID: 22409896} + m_Father: {fileID: 22415604} + 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.5, y: 0.5} +--- !u!224 &22453238 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167636} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 207.2727, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22455926 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 184328} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 163.63635, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22460006 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174742} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 76.36363, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22460246 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 188290} + 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: [] + m_Father: {fileID: 22415604} + m_RootOrder: 3 + 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.5, y: 0.5} +--- !u!224 &22462156 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114640} + 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: 22439774} + - {fileID: 22468616} + m_Father: {fileID: 22468756} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -25, y: -5} + m_SizeDelta: {x: 20, y: -10} + m_Pivot: {x: 0, y: 1} +--- !u!224 &22462776 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 190312} + 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: [] + m_Father: {fileID: 22449618} + 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.5, y: 0.5} +--- !u!224 &22462880 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118568} + 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: 22448238} + m_Father: {fileID: 22497436} + 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!224 &22463192 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 108322} + 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: 22432592} + m_Father: {fileID: 22474838} + m_RootOrder: 1 + 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!224 &22463286 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168798} + 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: 22407456} + - {fileID: 22474838} + - {fileID: 22404596} + m_Father: {fileID: 22415604} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22463646 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109862} + 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: [] + m_Father: {fileID: 22446600} + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22464350 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102730} + 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: 22445236} + m_Father: {fileID: 22471500} + m_RootOrder: 1 + 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!224 &22464540 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169426} + 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: 22465756} + - {fileID: 22410840} + m_Father: {fileID: 22421016} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22465756 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157080} + 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: [] + m_Father: {fileID: 22464540} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22465820 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142866} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 141.81818, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22466750 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152064} + 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: [] + m_Father: {fileID: 22475684} + 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.5, y: 0.5} +--- !u!224 &22467618 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 119286} + 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: [] + m_Father: {fileID: 22421016} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22468616 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 186436} + 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: 22441130} + m_Father: {fileID: 22462156} + m_RootOrder: 1 + 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!224 &22468756 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165956} + 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: 22486906} + - {fileID: 22462156} + m_Father: {fileID: 22448498} + m_RootOrder: 1 + 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: 60} + m_SizeDelta: {x: 0, y: -220} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22469358 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135120} + 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: [] + m_Father: {fileID: 22410840} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22471252 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192924} + 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: [] + m_Father: {fileID: 22419058} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22471500 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109650} + 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: 22413650} + - {fileID: 22464350} + m_Father: {fileID: 22473052} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22473052 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109518} + 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: 22493148} + - {fileID: 22471500} + - {fileID: 22410532} + m_Father: {fileID: 22415604} + m_RootOrder: 8 + 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.5, y: 0.5} +--- !u!224 &22474838 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189222} + 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: 22423050} + - {fileID: 22463192} + m_Father: {fileID: 22463286} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22475684 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 144296} + 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: 22466750} + - {fileID: 22476772} + - {fileID: 22483054} + m_Father: {fileID: 22415604} + m_RootOrder: 4 + 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.5, y: 0.5} +--- !u!224 &22475824 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 127516} + 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: 22437272} + m_Father: {fileID: 22476772} + m_RootOrder: 1 + 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!224 &22476772 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 191318} + 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: 22479018} + - {fileID: 22475824} + m_Father: {fileID: 22475684} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22477690 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 138390} + 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: [] + m_Father: {fileID: 22412396} + 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.5, y: 0.5} +--- !u!224 &22478158 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150098} + 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: 22422416} + - {fileID: 22489920} + - {fileID: 22405742} + m_Father: {fileID: 22415604} + m_RootOrder: 5 + 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.5, y: 0.5} +--- !u!224 &22479018 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 120788} + 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: [] + m_Father: {fileID: 22476772} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22483054 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109170} + 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: [] + m_Father: {fileID: 22475684} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22484834 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 187878} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22485188 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155710} + 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: 22447314} + - {fileID: 22484834} + - {fileID: 22488338} + - {fileID: 22460006} + - {fileID: 22415658} + - {fileID: 22445984} + - {fileID: 22465820} + - {fileID: 22455926} + - {fileID: 22407396} + - {fileID: 22453238} + - {fileID: 22487740} + m_Father: {fileID: 22448498} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 13} + m_SizeDelta: {x: -6, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22486906 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 119204} + 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: 22497436} + m_Father: {fileID: 22468756} + 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: -12.5, y: 0} + m_SizeDelta: {x: -35, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22487740 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167830} + 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: 22490310} + m_Father: {fileID: 22485188} + m_RootOrder: 10 + 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.5, y: 0.5} +--- !u!224 &22488338 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 124486} + 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: [] + m_Father: {fileID: 22485188} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!224 &22489814 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194224} + 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: 22413792} + - {fileID: 22446600} + m_Father: {fileID: 22448498} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0.5, y: 1} +--- !u!224 &22489920 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 154358} + 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: 22419704} + - {fileID: 22419058} + m_Father: {fileID: 22478158} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!224 &22490310 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167088} + 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: [] + m_Father: {fileID: 22487740} + 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!224 &22490412 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168892} + 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: [] + m_Father: {fileID: 22446600} + m_RootOrder: 1 + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22493148 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 188196} + 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: [] + m_Father: {fileID: 22473052} + 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.5, y: 0.5} +--- !u!224 &22497436 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109276} + 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: 22462880} + m_Father: {fileID: 22486906} + 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.5, y: 0.5} +--- !u!224 &22498864 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 150874} + 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: [] + m_Father: {fileID: 22449292} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22498948 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113042} + 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: 22402782} + m_Father: {fileID: 22416876} + m_RootOrder: 1 + 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!224 &22499384 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109976} + 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: [] + m_Father: {fileID: 22448238} + 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: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 157272} + m_IsPrefabParent: 1 diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Picker 2.0.prefab.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Picker 2.0.prefab.meta new file mode 100755 index 00000000..55845f46 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/Picker 2.0.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 916ee089a0d7b63419075f91e1c657ec +timeCreated: 1442747914 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/PickerTest.unity b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/PickerTest.unity new file mode 100644 index 00000000..f8182229 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/PickerTest.unity @@ -0,0 +1,16529 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 0 +--- !u!196 &5 +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.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &2240598 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 167636, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 2240599} + - component: {fileID: 2240603} + - component: {fileID: 2240602} + - component: {fileID: 2240601} + - component: {fileID: 2240600} + m_Layer: 5 + m_Name: Preset (9) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &2240599 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22453238, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2240598} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 207.2727, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2240600 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11495652, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2240598} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &2240601 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11455240, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2240598} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2240602} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2240602} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &2240602 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11425880, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2240598} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2240603 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22224940, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2240598} +--- !u!1 &20473274 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 196384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 20473275} + - component: {fileID: 20473278} + - component: {fileID: 20473277} + - component: {fileID: 20473276} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &20473275 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 20473274} + 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: 529874091} + - {fileID: 1331100897} + m_Father: {fileID: 1324958792} + 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: 115, y: -8} + m_SizeDelta: {x: 180, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &20473276 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11424932, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 20473274} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &20473277 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11468650, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 20473274} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &20473278 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11417476, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 20473274} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 408284503} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 408284502} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &36804163 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168892, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 36804164} + - component: {fileID: 36804166} + - component: {fileID: 36804165} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &36804164 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22490412, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 36804163} + 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: [] + m_Father: {fileID: 997851834} + m_RootOrder: 1 + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &36804165 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11448266, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 36804163} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &36804166 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22218658, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 36804163} +--- !u!1 &57913837 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188290, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 57913838} + - component: {fileID: 57913839} + m_Layer: 5 + m_Name: Seperator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &57913838 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 57913837} + 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: [] + m_Father: {fileID: 1869602467} + m_RootOrder: 3 + 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.5, y: 0.5} +--- !u!114 &57913839 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11435842, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 57913837} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 1 + m_FlexibleHeight: 1 + m_LayoutPriority: 1 +--- !u!1 &104575432 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188196, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 104575433} + - component: {fileID: 104575436} + - component: {fileID: 104575435} + - component: {fileID: 104575434} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &104575433 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 104575432} + 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: [] + m_Father: {fileID: 1260621562} + 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: 12.5, y: -8} + m_SizeDelta: {x: 15, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &104575434 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11418062, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 104575432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &104575435 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11421558, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 104575432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: A +--- !u!222 &104575436 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22254392, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 104575432} +--- !u!1 &109164929 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194224, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 109164930} + - component: {fileID: 109164931} + m_Layer: 5 + m_Name: ColorField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &109164930 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22489814, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 109164929} + 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: 1790845646} + - {fileID: 997851834} + m_Father: {fileID: 710150150} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &109164931 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11476502, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 109164929} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 0 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &124845412 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 113862, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 124845413} + - component: {fileID: 124845414} + m_Layer: 5 + m_Name: R + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &124845413 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 124845412} + 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: 294614440} + - {fileID: 1177867577} + - {fileID: 471830859} + m_Father: {fileID: 766560829} + 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.5, y: 0.5} +--- !u!114 &124845414 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11452006, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 124845412} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &137937714 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 167636, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 137937715} + - component: {fileID: 137937719} + - component: {fileID: 137937718} + - component: {fileID: 137937717} + - component: {fileID: 137937716} + m_Layer: 5 + m_Name: Preset (9) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &137937715 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22453238, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 137937714} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 207.2727, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &137937716 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11495652, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 137937714} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &137937717 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11455240, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 137937714} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 137937718} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 137937718} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &137937718 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11425880, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 137937714} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &137937719 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22224940, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 137937714} +--- !u!1 &145101537 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 160884, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 145101538} + - component: {fileID: 145101540} + - component: {fileID: 145101539} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &145101538 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22437272, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 145101537} + 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: [] + m_Father: {fileID: 1659989094} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &145101539 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11432620, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 145101537} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &145101540 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22226060, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 145101537} +--- !u!1 &146467717 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 141026, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 146467718} + - component: {fileID: 146467720} + - component: {fileID: 146467719} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &146467718 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22429276, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 146467717} + 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: [] + m_Father: {fileID: 1396656502} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &146467719 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11478032, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 146467717} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &146467720 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22296874, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 146467717} +--- !u!1 &147682392 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 103988, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 147682393} + - component: {fileID: 147682396} + - component: {fileID: 147682395} + - component: {fileID: 147682394} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &147682393 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22419704, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 147682392} + 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: [] + m_Father: {fileID: 175796671} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &147682394 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11434628, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 147682392} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &147682395 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11461748, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 147682392} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &147682396 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22202916, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 147682392} +--- !u!1 &148584818 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 185536, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 148584819} + - component: {fileID: 148584822} + - component: {fileID: 148584821} + - component: {fileID: 148584820} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &148584819 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22423050, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 148584818} + 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: [] + m_Father: {fileID: 2093402360} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &148584820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11403544, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 148584818} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &148584821 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11489330, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 148584818} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &148584822 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22282672, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 148584818} +--- !u!1 &173212153 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157484, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 173212154} + - component: {fileID: 173212158} + - component: {fileID: 173212157} + - component: {fileID: 173212156} + - component: {fileID: 173212155} + m_Layer: 5 + m_Name: Preset (0) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &173212154 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 173212153} + 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: [] + m_Father: {fileID: 274021472} + 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.5, y: 0.5} +--- !u!114 &173212155 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11443026, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 173212153} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 18 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &173212156 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482438, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 173212153} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 173212157} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 173212157} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &173212157 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11437926, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 173212153} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7647059, g: 0.19117647, b: 0.19117647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &173212158 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22257106, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 173212153} +--- !u!1 &175796670 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 154358, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 175796671} + - component: {fileID: 175796674} + - component: {fileID: 175796673} + - component: {fileID: 175796672} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &175796671 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 175796670} + 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: 147682393} + - {fileID: 210948850} + m_Father: {fileID: 1828906402} + 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: 115, y: -8} + m_SizeDelta: {x: 180, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &175796672 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11422346, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 175796670} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &175796673 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11495366, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 175796670} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &175796674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469644, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 175796670} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 988343896} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 988343895} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &180234992 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 186436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 180234993} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &180234993 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22468616, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 180234992} + 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: 1180372218} + m_Father: {fileID: 1368962646} + m_RootOrder: 1 + 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!1 &191159562 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 167830, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 191159563} + - component: {fileID: 191159567} + - component: {fileID: 191159566} + - component: {fileID: 191159565} + - component: {fileID: 191159564} + m_Layer: 5 + m_Name: Create Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &191159563 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 191159562} + 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: 282537368} + m_Father: {fileID: 274021472} + m_RootOrder: 10 + 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.5, y: 0.5} +--- !u!114 &191159564 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482746, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 191159562} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &191159565 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11401102, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 191159562} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 191159566} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: CreatePresetButton + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &191159566 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11489756, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 191159562} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &191159567 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22228438, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 191159562} +--- !u!1 &204528838 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 147170, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 204528839} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &204528839 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22410840, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 204528838} + 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: 1008031676} + m_Father: {fileID: 1255765976} + m_RootOrder: 1 + 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!1 &206875736 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114640, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 206875737} + - component: {fileID: 206875739} + - component: {fileID: 206875738} + m_Layer: 5 + m_Name: Hue + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &206875737 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22462156, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 206875736} + 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: 656307118} + - {fileID: 654651893} + m_Father: {fileID: 1981096033} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -25, y: -5} + m_SizeDelta: {x: 20, y: -10} + m_Pivot: {x: 0, y: 1} +--- !u!114 &206875738 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469788, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 206875736} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &206875739 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11499806, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 206875736} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1305298857} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 1305298856} + m_Direction: 2 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &210948849 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 198926, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 210948850} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &210948850 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22419058, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 210948849} + 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: 988343895} + m_Father: {fileID: 175796671} + m_RootOrder: 1 + 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!1 &212132362 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168798, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 212132363} + - component: {fileID: 212132364} + m_Layer: 5 + m_Name: B + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &212132363 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 212132362} + 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: 1105082743} + - {fileID: 1301804701} + - {fileID: 1776062162} + m_Father: {fileID: 1869602467} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &212132364 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11459258, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 212132362} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &237396850 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 102730, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 237396851} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &237396851 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22464350, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 237396850} + 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: 476636624} + m_Father: {fileID: 741290795} + m_RootOrder: 1 + 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!1 &242528464 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 145996, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 242528465} + - component: {fileID: 242528467} + - component: {fileID: 242528466} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &242528465 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22402782, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 242528464} + 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: [] + m_Father: {fileID: 1756926528} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &242528466 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477674, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 242528464} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &242528467 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22281664, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 242528464} +--- !u!1 &244200429 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109170, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 244200430} + - component: {fileID: 244200434} + - component: {fileID: 244200433} + - component: {fileID: 244200432} + - component: {fileID: 244200431} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &244200430 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 244200429} + 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: [] + m_Father: {fileID: 1424261726} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 222.5, y: -8} + m_SizeDelta: {x: 25, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &244200431 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400974, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 244200429} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &244200432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11448474, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 244200429} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &244200433 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11460492, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 244200429} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &244200434 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22289050, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 244200429} +--- !u!1 &253637415 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 167088, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 253637416} + - component: {fileID: 253637419} + - component: {fileID: 253637418} + - component: {fileID: 253637417} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &253637416 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22490310, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 253637415} + 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: [] + m_Father: {fileID: 648756982} + 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!114 &253637417 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11428986, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 253637415} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &253637418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11419450, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 253637415} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: + +--- !u!222 &253637419 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22296602, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 253637415} +--- !u!1 &253671663 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194704, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 253671664} + - component: {fileID: 253671668} + - component: {fileID: 253671667} + - component: {fileID: 253671666} + - component: {fileID: 253671665} + m_Layer: 5 + m_Name: Preset (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &253671664 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22415658, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 253671663} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 98.181816, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &253671665 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415596, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 253671663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &253671666 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11470716, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 253671663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 253671667} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 253671667} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &253671667 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11418286, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 253671663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &253671668 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22220132, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 253671663} +--- !u!1 &261232954 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 123062, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 261232955} + - component: {fileID: 261232959} + - component: {fileID: 261232958} + - component: {fileID: 261232957} + - component: {fileID: 261232956} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &261232955 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 261232954} + 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: [] + m_Father: {fileID: 2111239723} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &261232956 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11417916, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 261232954} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &261232957 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11480596, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 261232954} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &261232958 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11499970, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 261232954} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &261232959 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22213064, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 261232954} +--- !u!1 &274021471 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 155710, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 274021472} + - component: {fileID: 274021473} + - component: {fileID: 274021476} + - component: {fileID: 274021475} + - component: {fileID: 274021474} + m_Layer: 5 + m_Name: Presets + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &274021472 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22485188, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 274021471} + 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: 173212154} + - {fileID: 1886394073} + - {fileID: 712688047} + - {fileID: 1746817117} + - {fileID: 253671664} + - {fileID: 1350650412} + - {fileID: 1102078668} + - {fileID: 1821474527} + - {fileID: 1157843069} + - {fileID: 2240599} + - {fileID: 191159563} + m_Father: {fileID: 367771814} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 13} + m_SizeDelta: {x: -6, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &274021473 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11437434, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 274021471} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0923373e76e77402c9c53a2f1250ad3e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &274021474 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11401494, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 274021471} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.1544118, g: 0.1544118, b: 0.1544118, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 2 + m_PreserveAspect: 0 + m_FillCenter: 0 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &274021475 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22284168, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 274021471} +--- !u!114 &274021476 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400472, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 274021471} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 1 + m_Right: 1 + m_Top: 1 + m_Bottom: 1 + m_ChildAlignment: 0 + m_Spacing: 1 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &282537367 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 167088, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 282537368} + - component: {fileID: 282537371} + - component: {fileID: 282537370} + - component: {fileID: 282537369} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &282537368 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22490310, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 282537367} + 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: [] + m_Father: {fileID: 191159563} + 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!114 &282537369 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11428986, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 282537367} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &282537370 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11419450, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 282537367} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: + +--- !u!222 &282537371 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22296602, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 282537367} +--- !u!1 &294614439 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 190312, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 294614440} + - component: {fileID: 294614443} + - component: {fileID: 294614442} + - component: {fileID: 294614441} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &294614440 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 294614439} + 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: [] + m_Father: {fileID: 124845413} + 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: 12.5, y: -8} + m_SizeDelta: {x: 15, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &294614441 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11436886, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 294614439} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &294614442 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430478, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 294614439} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: R +--- !u!222 &294614443 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22230530, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 294614439} +--- !u!1 &295115041 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 187878, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 295115042} + - component: {fileID: 295115046} + - component: {fileID: 295115045} + - component: {fileID: 295115044} + - component: {fileID: 295115043} + m_Layer: 5 + m_Name: Preset (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &295115042 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 295115041} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &295115043 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11439404, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 295115041} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &295115044 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11452934, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 295115041} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 295115045} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 295115045} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &295115045 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11441004, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 295115041} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.21366784, g: 0.7647059, b: 0.30867442, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &295115046 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22278160, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 295115041} +--- !u!1 &361808358 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 150098, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 361808359} + - component: {fileID: 361808360} + m_Layer: 5 + m_Name: S + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &361808359 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 361808358} + 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: 883675859} + - {fileID: 740175640} + - {fileID: 679403834} + m_Father: {fileID: 1869602467} + m_RootOrder: 5 + 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.5, y: 0.5} +--- !u!114 &361808360 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11496146, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 361808358} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!224 &367771814 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1837440034} + 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: 2062443902} + - {fileID: 371570537} + - {fileID: 1869602467} + - {fileID: 274021472} + m_Father: {fileID: 2090454929} + 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: 0, y: 0} + m_SizeDelta: {x: 240, y: 400} + m_Pivot: {x: 0, y: 1} +--- !u!114 &367771815 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11423364, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1837440034} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8262e4a8322117f4da079921eaa72834, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &368395698 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 163020, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 368395699} + - component: {fileID: 368395702} + - component: {fileID: 368395701} + - component: {fileID: 368395700} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &368395699 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22413650, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 368395698} + 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: [] + m_Father: {fileID: 832625941} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &368395700 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482098, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 368395698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &368395701 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11407460, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 368395698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &368395702 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22221616, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 368395698} +--- !u!1 &369634461 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 145996, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 369634462} + - component: {fileID: 369634464} + - component: {fileID: 369634463} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &369634462 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22402782, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 369634461} + 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: [] + m_Father: {fileID: 431094530} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &369634463 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477674, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 369634461} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &369634464 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22281664, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 369634461} +--- !u!1 &371570536 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 165956, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 371570537} + m_Layer: 5 + m_Name: HSVField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &371570537 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22468756, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 371570536} + 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: 1645107938} + - {fileID: 1368962646} + m_Father: {fileID: 367771814} + m_RootOrder: 1 + 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: 60} + m_SizeDelta: {x: 0, y: -220} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &376809585 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 173810, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 376809586} + - component: {fileID: 376809590} + - component: {fileID: 376809589} + - component: {fileID: 376809588} + - component: {fileID: 376809587} + m_Layer: 5 + m_Name: Preset (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &376809586 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22445984, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 376809585} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 120, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &376809587 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11408032, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 376809585} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &376809588 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487238, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 376809585} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 376809589} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 376809589} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &376809589 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11426590, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 376809585} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &376809590 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22216614, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 376809585} +--- !u!1 &408284501 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 141026, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 408284502} + - component: {fileID: 408284504} + - component: {fileID: 408284503} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &408284502 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22429276, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 408284501} + 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: [] + m_Father: {fileID: 1331100897} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &408284503 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11478032, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 408284501} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &408284504 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22296874, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 408284501} +--- !u!1 &411092137 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 196384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 411092138} + - component: {fileID: 411092141} + - component: {fileID: 411092140} + - component: {fileID: 411092139} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &411092138 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 411092137} + 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: 1302429623} + - {fileID: 1396656502} + m_Father: {fileID: 1852080013} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &411092139 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11424932, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 411092137} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &411092140 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11468650, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 411092137} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &411092141 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11417476, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 411092137} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 146467719} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 146467718} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &431094529 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 113042, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 431094530} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &431094530 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22498948, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 431094529} + 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: 369634462} + m_Father: {fileID: 1177867577} + m_RootOrder: 1 + 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!1 &451330291 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 144296, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 451330292} + - component: {fileID: 451330293} + m_Layer: 5 + m_Name: H + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &451330292 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 451330291} + 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: 1939675298} + - {fileID: 1268005417} + - {fileID: 1428027843} + m_Father: {fileID: 1869602467} + m_RootOrder: 4 + 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.5, y: 0.5} +--- !u!114 &451330293 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11493476, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 451330291} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &471830858 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 123062, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 471830859} + - component: {fileID: 471830863} + - component: {fileID: 471830862} + - component: {fileID: 471830861} + - component: {fileID: 471830860} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &471830859 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 471830858} + 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: [] + m_Father: {fileID: 124845413} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 222.5, y: -8} + m_SizeDelta: {x: 25, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &471830860 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11417916, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 471830858} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &471830861 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11480596, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 471830858} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &471830862 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11499970, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 471830858} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &471830863 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22213064, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 471830858} +--- !u!1 &476636623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 165534, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 476636624} + - component: {fileID: 476636626} + - component: {fileID: 476636625} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &476636624 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22445236, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 476636623} + 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: [] + m_Father: {fileID: 237396851} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &476636625 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415580, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 476636623} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &476636626 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22243436, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 476636623} +--- !u!1 &487821597 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 487821602} + - component: {fileID: 487821601} + - component: {fileID: 487821600} + - component: {fileID: 487821599} + - component: {fileID: 487821598} + m_Layer: 0 + m_Name: Cube worldSpace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &487821598 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 487821597} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 06851a815227e5044b0e3c1bf9b3a282, type: 3} + m_Name: + m_EditorClassIdentifier: + renderer: {fileID: 487821599} + picker: {fileID: 710150151} +--- !u!23 &487821599 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 487821597} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10302, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &487821600 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 487821597} + 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!33 &487821601 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 487821597} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &487821602 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 487821597} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.05, y: -1.89, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &493804170 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 152064, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 493804171} + - component: {fileID: 493804174} + - component: {fileID: 493804173} + - component: {fileID: 493804172} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &493804171 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 493804170} + 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: [] + m_Father: {fileID: 1424261726} + 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: 12.5, y: -8} + m_SizeDelta: {x: 15, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &493804172 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11431838, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 493804170} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &493804173 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487462, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 493804170} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: H +--- !u!222 &493804174 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22224878, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 493804170} +--- !u!1 &507677671 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 169426, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 507677672} + - component: {fileID: 507677675} + - component: {fileID: 507677674} + - component: {fileID: 507677673} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &507677672 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 507677671} + 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: 1175511622} + - {fileID: 1118411272} + m_Father: {fileID: 1566327407} + 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: 115, y: -8} + m_SizeDelta: {x: 180, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &507677673 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11446360, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 507677671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &507677674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11427848, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 507677671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &507677675 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11444998, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 507677671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 593354544} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 593354543} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &529874090 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 150874, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 529874091} + - component: {fileID: 529874094} + - component: {fileID: 529874093} + - component: {fileID: 529874092} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &529874091 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22498864, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 529874090} + 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: [] + m_Father: {fileID: 20473275} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &529874092 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11410684, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 529874090} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &529874093 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469324, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 529874090} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &529874094 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22223566, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 529874090} +--- !u!1 &570113572 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 570113577} + - component: {fileID: 570113576} + - component: {fileID: 570113575} + - component: {fileID: 570113574} + - component: {fileID: 570113573} + 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 &570113573 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 570113572} + m_Enabled: 1 +--- !u!124 &570113574 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 570113572} + m_Enabled: 1 +--- !u!92 &570113575 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 570113572} + m_Enabled: 1 +--- !u!20 &570113576 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 570113572} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_BackgroundMaterial: {fileID: 0} + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &570113577 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 570113572} + 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: + - {fileID: 1895047780} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &593354542 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 135120, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 593354543} + - component: {fileID: 593354545} + - component: {fileID: 593354544} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &593354543 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22469358, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 593354542} + 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: [] + m_Father: {fileID: 1118411272} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &593354544 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11498926, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 593354542} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &593354545 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294074, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 593354542} +--- !u!1 &604423529 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 174742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 604423530} + - component: {fileID: 604423534} + - component: {fileID: 604423533} + - component: {fileID: 604423532} + - component: {fileID: 604423531} + m_Layer: 5 + m_Name: Preset (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &604423530 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22460006, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 604423529} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 76.36363, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &604423531 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469158, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 604423529} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &604423532 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11485084, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 604423529} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 604423533} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 604423533} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &604423533 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494638, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 604423529} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &604423534 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22260376, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 604423529} +--- !u!1 &629615631 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 134460, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 629615632} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &629615632 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22448238, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 629615631} + 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: 721625611} + m_Father: {fileID: 1901109258} + 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: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &637085006 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109862, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 637085007} + - component: {fileID: 637085009} + - component: {fileID: 637085008} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &637085007 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22463646, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 637085006} + 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: [] + m_Father: {fileID: 997851834} + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &637085008 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11419324, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 637085006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter text... +--- !u!222 &637085009 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22208894, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 637085006} +--- !u!1 &648756981 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 167830, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 648756982} + - component: {fileID: 648756986} + - component: {fileID: 648756985} + - component: {fileID: 648756984} + - component: {fileID: 648756983} + m_Layer: 5 + m_Name: Create Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &648756982 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 648756981} + 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: 253637416} + m_Father: {fileID: 694136810} + m_RootOrder: 10 + 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.5, y: 0.5} +--- !u!114 &648756983 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482746, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 648756981} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &648756984 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11401102, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 648756981} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 648756985} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: CreatePresetButton + 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 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &648756985 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11489756, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 648756981} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &648756986 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22228438, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 648756981} +--- !u!1 &650216811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 197314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 650216812} + - component: {fileID: 650216815} + - component: {fileID: 650216814} + - component: {fileID: 650216813} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &650216812 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22400824, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 650216811} + 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: [] + m_Father: {fileID: 1177867577} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &650216813 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11413310, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 650216811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &650216814 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11407662, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 650216811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &650216815 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22221412, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 650216811} +--- !u!1 &654651892 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 186436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 654651893} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &654651893 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22468616, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 654651892} + 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: 1305298856} + m_Father: {fileID: 206875737} + m_RootOrder: 1 + 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!1 &656307117 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 185578, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 656307118} + - component: {fileID: 656307121} + - component: {fileID: 656307120} + - component: {fileID: 656307119} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &656307118 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22439774, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 656307117} + 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: [] + m_Father: {fileID: 206875737} + 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!114 &656307119 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11481940, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 656307117} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &656307120 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11429486, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 656307117} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 2 + height: 1 +--- !u!222 &656307121 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22263392, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 656307117} +--- !u!1 &657443832 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157080, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 657443833} + - component: {fileID: 657443836} + - component: {fileID: 657443835} + - component: {fileID: 657443834} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &657443833 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22465756, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 657443832} + 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: [] + m_Father: {fileID: 1255765976} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &657443834 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11404692, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 657443832} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &657443835 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11457780, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 657443832} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &657443836 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22222340, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 657443832} +--- !u!1 &666443671 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 184328, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 666443672} + - component: {fileID: 666443676} + - component: {fileID: 666443675} + - component: {fileID: 666443674} + - component: {fileID: 666443673} + m_Layer: 5 + m_Name: Preset (7) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &666443672 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22455926, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 666443671} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 163.63635, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &666443673 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482218, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 666443671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &666443674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11485672, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 666443671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 666443675} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 666443675} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &666443675 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11425336, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 666443671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &666443676 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22240504, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 666443671} +--- !u!1 &679403833 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 197864, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 679403834} + - component: {fileID: 679403838} + - component: {fileID: 679403837} + - component: {fileID: 679403836} + - component: {fileID: 679403835} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &679403834 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 679403833} + 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: [] + m_Father: {fileID: 361808359} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &679403835 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11445998, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 679403833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &679403836 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11429994, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 679403833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &679403837 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415718, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 679403833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &679403838 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22217712, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 679403833} +--- !u!1 &694136809 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 155710, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 694136810} + - component: {fileID: 694136811} + - component: {fileID: 694136814} + - component: {fileID: 694136813} + - component: {fileID: 694136812} + m_Layer: 5 + m_Name: Presets + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &694136810 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22485188, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 694136809} + 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: 996149346} + - {fileID: 295115042} + - {fileID: 714742308} + - {fileID: 604423530} + - {fileID: 1269579309} + - {fileID: 376809586} + - {fileID: 1486541060} + - {fileID: 666443672} + - {fileID: 1497405588} + - {fileID: 137937715} + - {fileID: 648756982} + m_Father: {fileID: 710150150} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 13} + m_SizeDelta: {x: -6, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &694136811 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11437434, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 694136809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0923373e76e77402c9c53a2f1250ad3e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &694136812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11401494, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 694136809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.1544118, g: 0.1544118, b: 0.1544118, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 2 + m_PreserveAspect: 0 + m_FillCenter: 0 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &694136813 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22284168, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 694136809} +--- !u!114 &694136814 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400472, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 694136809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 1 + m_Right: 1 + m_Top: 1 + m_Bottom: 1 + m_ChildAlignment: 0 + m_Spacing: 1 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!224 &710150150 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1878514645} + 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: 109164930} + - {fileID: 1981096033} + - {fileID: 766560829} + - {fileID: 694136810} + m_Father: {fileID: 1895047780} + 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: 903.3, y: -441.9} + m_SizeDelta: {x: 240, y: 400} + m_Pivot: {x: 0, y: 1} +--- !u!114 &710150151 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11423364, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1878514645} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8262e4a8322117f4da079921eaa72834, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &712688046 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 124486, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 712688047} + - component: {fileID: 712688051} + - component: {fileID: 712688050} + - component: {fileID: 712688049} + - component: {fileID: 712688048} + m_Layer: 5 + m_Name: Preset (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &712688047 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 712688046} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &712688048 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11491764, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 712688046} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &712688049 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11496660, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 712688046} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 712688050} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 712688050} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &712688050 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11417700, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 712688046} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7205882, g: 0.5700394, b: 0.1748486, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &712688051 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22252030, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 712688046} +--- !u!1 &714742307 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 124486, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 714742308} + - component: {fileID: 714742312} + - component: {fileID: 714742311} + - component: {fileID: 714742310} + - component: {fileID: 714742309} + m_Layer: 5 + m_Name: Preset (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &714742308 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 714742307} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &714742309 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11491764, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 714742307} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &714742310 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11496660, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 714742307} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 714742311} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 714742311} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &714742311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11417700, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 714742307} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7205882, g: 0.5700394, b: 0.1748486, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &714742312 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22252030, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 714742307} +--- !u!1 &721625610 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109976, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 721625611} + - component: {fileID: 721625613} + - component: {fileID: 721625612} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &721625611 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 721625610} + 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: [] + m_Father: {fileID: 629615632} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &721625612 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11484674, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 721625610} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &721625613 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22236658, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 721625610} +--- !u!1 &740175639 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 154358, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 740175640} + - component: {fileID: 740175643} + - component: {fileID: 740175642} + - component: {fileID: 740175641} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &740175640 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 740175639} + 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: 1941335922} + - {fileID: 1046740783} + m_Father: {fileID: 361808359} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &740175641 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11422346, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 740175639} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &740175642 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11495366, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 740175639} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &740175643 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469644, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 740175639} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 918932757} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 918932756} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &741290794 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109650, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 741290795} + - component: {fileID: 741290798} + - component: {fileID: 741290797} + - component: {fileID: 741290796} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &741290795 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 741290794} + 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: 925368622} + - {fileID: 237396851} + m_Father: {fileID: 1244806539} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &741290796 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11481106, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 741290794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &741290797 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11459034, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 741290794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &741290798 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11413242, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 741290794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 476636625} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 476636624} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &766560828 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 169390, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 766560829} + - component: {fileID: 766560830} + m_Layer: 5 + m_Name: Sliders + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &766560829 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22415604, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 766560828} + 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: 124845413} + - {fileID: 1566327407} + - {fileID: 953654619} + - {fileID: 1227911805} + - {fileID: 1424261726} + - {fileID: 1828906402} + - {fileID: 1324958792} + - {fileID: 1959037691} + - {fileID: 1260621562} + m_Father: {fileID: 710150150} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 170} + m_SizeDelta: {x: 0, y: 145} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &766560830 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11463640, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 766560828} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &832625940 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109650, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 832625941} + - component: {fileID: 832625944} + - component: {fileID: 832625943} + - component: {fileID: 832625942} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &832625941 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 832625940} + 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: 368395699} + - {fileID: 1090620061} + m_Father: {fileID: 1260621562} + 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: 115, y: -8} + m_SizeDelta: {x: 180, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &832625942 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11481106, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 832625940} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &832625943 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11459034, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 832625940} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &832625944 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11413242, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 832625940} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2048501440} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 2048501439} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &836404685 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 192330, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 836404686} + - component: {fileID: 836404688} + - component: {fileID: 836404687} + m_Layer: 5 + m_Name: Color + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &836404686 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 836404685} + 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: 1490811192} + m_Father: {fileID: 2062443902} + 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.5, y: 0.5} +--- !u!114 &836404687 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11461114, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 836404685} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.39215687} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 0 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &836404688 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22255370, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 836404685} +--- !u!1 &841830425 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 841830430} + - component: {fileID: 841830429} + - component: {fileID: 841830428} + - component: {fileID: 841830427} + - component: {fileID: 841830426} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &841830426 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 841830425} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 06851a815227e5044b0e3c1bf9b3a282, type: 3} + m_Name: + m_EditorClassIdentifier: + renderer: {fileID: 841830427} + picker: {fileID: 367771815} +--- !u!23 &841830427 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 841830425} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10302, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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!65 &841830428 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 841830425} + 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!33 &841830429 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 841830425} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &841830430 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 841830425} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.08, y: 4.08, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &842308283 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 137072, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 842308284} + - component: {fileID: 842308286} + - component: {fileID: 842308285} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &842308284 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22432592, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 842308283} + 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: [] + m_Father: {fileID: 1118961867} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &842308285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11429028, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 842308283} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &842308286 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22241672, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 842308283} +--- !u!1 &859183414 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 859183418} + - component: {fileID: 859183417} + - component: {fileID: 859183416} + - component: {fileID: 859183415} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &859183415 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 859183414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ForceModuleActive: 0 +--- !u!114 &859183416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 859183414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &859183417 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 859183414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &859183418 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 859183414} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &875044582 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 134460, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 875044583} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &875044583 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22448238, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 875044582} + 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: 1329222748} + m_Father: {fileID: 1798666491} + 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: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &883675858 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 169152, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 883675859} + - component: {fileID: 883675862} + - component: {fileID: 883675861} + - component: {fileID: 883675860} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &883675859 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 883675858} + 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: [] + m_Father: {fileID: 361808359} + 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.5, y: 0.5} +--- !u!114 &883675860 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11421370, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 883675858} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &883675861 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430666, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 883675858} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: S +--- !u!222 &883675862 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22287232, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 883675858} +--- !u!1 &917512077 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 138390, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 917512078} + - component: {fileID: 917512081} + - component: {fileID: 917512080} + - component: {fileID: 917512079} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &917512078 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 917512077} + 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: [] + m_Father: {fileID: 1324958792} + 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: 12.5, y: -8} + m_SizeDelta: {x: 15, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &917512079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11412718, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 917512077} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &917512080 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11443082, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 917512077} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: V +--- !u!222 &917512081 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22214548, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 917512077} +--- !u!1 &918932755 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 192924, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 918932756} + - component: {fileID: 918932758} + - component: {fileID: 918932757} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &918932756 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22471252, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 918932755} + 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: [] + m_Father: {fileID: 1046740783} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &918932757 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11454424, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 918932755} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &918932758 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22247702, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 918932755} +--- !u!1 &925368621 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 163020, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 925368622} + - component: {fileID: 925368625} + - component: {fileID: 925368624} + - component: {fileID: 925368623} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &925368622 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22413650, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 925368621} + 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: [] + m_Father: {fileID: 741290795} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &925368623 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482098, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 925368621} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &925368624 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11407460, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 925368621} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &925368625 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22221616, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 925368621} +--- !u!1 &936723342 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 120788, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 936723343} + - component: {fileID: 936723346} + - component: {fileID: 936723345} + - component: {fileID: 936723344} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &936723343 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22479018, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 936723342} + 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: [] + m_Father: {fileID: 1211834307} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &936723344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11431864, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 936723342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &936723345 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11449214, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 936723342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &936723346 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22267742, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 936723342} +--- !u!1 &953654618 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168798, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 953654619} + - component: {fileID: 953654620} + m_Layer: 5 + m_Name: B + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &953654619 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 953654618} + 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: 1790010519} + - {fileID: 2093402360} + - {fileID: 1499836824} + m_Father: {fileID: 766560829} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &953654620 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11459258, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 953654618} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &988343894 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 192924, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 988343895} + - component: {fileID: 988343897} + - component: {fileID: 988343896} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &988343895 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22471252, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 988343894} + 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: [] + m_Father: {fileID: 210948850} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &988343896 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11454424, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 988343894} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &988343897 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22247702, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 988343894} +--- !u!1 &996149345 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157484, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 996149346} + - component: {fileID: 996149350} + - component: {fileID: 996149349} + - component: {fileID: 996149348} + - component: {fileID: 996149347} + m_Layer: 5 + m_Name: Preset (0) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &996149346 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 996149345} + 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: [] + m_Father: {fileID: 694136810} + 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.5, y: 0.5} +--- !u!114 &996149347 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11443026, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 996149345} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 18 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &996149348 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482438, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 996149345} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 996149349} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 996149349} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &996149349 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11437926, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 996149345} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7647059, g: 0.19117647, b: 0.19117647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &996149350 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22257106, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 996149345} +--- !u!1 &997851833 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 117174, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 997851834} + - component: {fileID: 997851838} + - component: {fileID: 997851837} + - component: {fileID: 997851836} + - component: {fileID: 997851835} + m_Layer: 5 + m_Name: InputField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &997851834 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 997851833} + 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: 637085007} + - {fileID: 36804164} + m_Father: {fileID: 109164930} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &997851835 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11483982, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 997851833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d85c534b3c1560544b09d0996dfeba84, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &997851836 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11463028, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 997851833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 997851837} + m_TextComponent: {fileID: 36804165} + m_Placeholder: {fileID: 637085008} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &997851837 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11457280, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 997851833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &997851838 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22261740, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 997851833} +--- !u!1 &1008031675 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 135120, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1008031676} + - component: {fileID: 1008031678} + - component: {fileID: 1008031677} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1008031676 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22469358, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1008031675} + 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: [] + m_Father: {fileID: 204528839} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1008031677 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11498926, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1008031675} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1008031678 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294074, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1008031675} +--- !u!1 &1029991560 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 118848, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1029991561} + - component: {fileID: 1029991562} + m_Layer: 5 + m_Name: Seperator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1029991561 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1029991560} + 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: [] + m_Father: {fileID: 1869602467} + m_RootOrder: 7 + 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.5, y: 0.5} +--- !u!114 &1029991562 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11451352, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1029991560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 1 + m_FlexibleHeight: 1 + m_LayoutPriority: 1 +--- !u!1 &1046740782 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 198926, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1046740783} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1046740783 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22419058, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1046740782} + 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: 918932756} + m_Father: {fileID: 740175640} + m_RootOrder: 1 + 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!1001 &1064925107 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1895047780} + m_Modifications: + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: -25 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 903.3 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -441.9 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 240 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22402782, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22469358, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22432592, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22437272, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22471252, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22429276, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22445236, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11429486, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11407460, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11469324, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11461748, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11449214, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11489330, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11457780, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11407662, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11436574, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 222.5 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 222.5 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 222.5 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 222.5 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 222.5 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 222.5 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 222.5 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22441130, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_RootGameObject: {fileID: 1878514645} + m_IsPrefabParent: 0 +--- !u!1 &1076908621 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 185536, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1076908622} + - component: {fileID: 1076908625} + - component: {fileID: 1076908624} + - component: {fileID: 1076908623} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1076908622 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22423050, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1076908621} + 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: [] + m_Father: {fileID: 1301804701} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1076908623 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11403544, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1076908621} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1076908624 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11489330, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1076908621} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &1076908625 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22282672, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1076908621} +--- !u!1 &1083435563 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 185578, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1083435564} + - component: {fileID: 1083435567} + - component: {fileID: 1083435566} + - component: {fileID: 1083435565} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1083435564 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22439774, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1083435563} + 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: [] + m_Father: {fileID: 1368962646} + 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!114 &1083435565 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11481940, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1083435563} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1083435566 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11429486, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1083435563} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 2 + height: 1 +--- !u!222 &1083435567 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22263392, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1083435563} +--- !u!1 &1090620060 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 102730, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1090620061} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1090620061 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22464350, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1090620060} + 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: 2048501439} + m_Father: {fileID: 832625941} + m_RootOrder: 1 + 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!1 &1102078667 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 142866, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1102078668} + - component: {fileID: 1102078672} + - component: {fileID: 1102078671} + - component: {fileID: 1102078670} + - component: {fileID: 1102078669} + m_Layer: 5 + m_Name: Preset (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1102078668 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22465820, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1102078667} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 141.81818, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1102078669 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477610, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1102078667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1102078670 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11468552, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1102078667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1102078671} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1102078671} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1102078671 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487346, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1102078667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1102078672 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22217064, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1102078667} +--- !u!1 &1105082742 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1105082743} + - component: {fileID: 1105082746} + - component: {fileID: 1105082745} + - component: {fileID: 1105082744} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1105082743 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1105082742} + 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: [] + m_Father: {fileID: 212132363} + 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.5, y: 0.5} +--- !u!114 &1105082744 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11493426, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1105082742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1105082745 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11476698, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1105082742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: B +--- !u!222 &1105082746 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22254790, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1105082742} +--- !u!1 &1118411271 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 147170, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1118411272} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1118411272 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22410840, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1118411271} + 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: 593354543} + m_Father: {fileID: 507677672} + m_RootOrder: 1 + 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!1 &1118961866 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 108322, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1118961867} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1118961867 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22463192, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1118961866} + 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: 842308284} + m_Father: {fileID: 2093402360} + m_RootOrder: 1 + 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!1 &1127985419 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 150014, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1127985420} + - component: {fileID: 1127985424} + - component: {fileID: 1127985423} + - component: {fileID: 1127985422} + - component: {fileID: 1127985421} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1127985420 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1127985419} + 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: [] + m_Father: {fileID: 1324958792} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 222.5, y: -8} + m_SizeDelta: {x: 25, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1127985421 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11424714, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1127985419} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1127985422 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487120, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1127985419} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1127985423 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11426072, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1127985419} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &1127985424 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22214676, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1127985419} +--- !u!1 &1157843068 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 110962, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1157843069} + - component: {fileID: 1157843073} + - component: {fileID: 1157843072} + - component: {fileID: 1157843071} + - component: {fileID: 1157843070} + m_Layer: 5 + m_Name: Preset (8) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1157843069 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22407396, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1157843068} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 185.45453, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1157843070 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11453686, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1157843068} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1157843071 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469678, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1157843068} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1157843072} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1157843072} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1157843072 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11443566, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1157843068} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1157843073 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22269076, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1157843068} +--- !u!1001 &1173001356 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 2090454929} + m_Modifications: + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 240 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11407662, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11449214, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11469324, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11457780, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11407460, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11489330, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11429486, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11436574, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11461748, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: -25 + objectReference: {fileID: 0} + - target: {fileID: 22402782, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22429276, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22469358, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22445236, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22432592, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22471252, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22441130, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22437272, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_RootGameObject: {fileID: 1837440034} + m_IsPrefabParent: 0 +--- !u!1 &1175511621 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157080, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1175511622} + - component: {fileID: 1175511625} + - component: {fileID: 1175511624} + - component: {fileID: 1175511623} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1175511622 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22465756, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1175511621} + 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: [] + m_Father: {fileID: 507677672} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1175511623 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11404692, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1175511621} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1175511624 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11457780, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1175511621} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &1175511625 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22222340, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1175511621} +--- !u!1 &1177867576 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 161688, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1177867577} + - component: {fileID: 1177867580} + - component: {fileID: 1177867579} + - component: {fileID: 1177867578} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1177867577 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1177867576} + 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: 650216812} + - {fileID: 431094530} + m_Father: {fileID: 124845413} + 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: 115, y: -8} + m_SizeDelta: {x: 180, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1177867578 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11472300, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1177867576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1177867579 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415364, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1177867576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1177867580 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456442, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1177867576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 369634463} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 369634462} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1180372217 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 158070, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1180372218} + - component: {fileID: 1180372220} + - component: {fileID: 1180372219} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1180372218 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22441130, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1180372217} + 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: [] + m_Father: {fileID: 180234993} + 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: 8} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1180372219 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11464698, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1180372217} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1180372220 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22216992, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1180372217} +--- !u!1 &1194975999 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 138390, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1194976000} + - component: {fileID: 1194976003} + - component: {fileID: 1194976002} + - component: {fileID: 1194976001} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1194976000 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1194975999} + 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: [] + m_Father: {fileID: 1852080013} + 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.5, y: 0.5} +--- !u!114 &1194976001 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11412718, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1194975999} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1194976002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11443082, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1194975999} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: V +--- !u!222 &1194976003 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22214548, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1194975999} +--- !u!1 &1211834306 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 191318, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1211834307} + - component: {fileID: 1211834310} + - component: {fileID: 1211834309} + - component: {fileID: 1211834308} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1211834307 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1211834306} + 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: 936723343} + - {fileID: 1300273267} + m_Father: {fileID: 1424261726} + 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: 115, y: -8} + m_SizeDelta: {x: 180, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1211834308 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11457668, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1211834306} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1211834309 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488972, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1211834306} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1211834310 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11423356, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1211834306} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1461736453} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 1461736452} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1227911804 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188290, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1227911805} + - component: {fileID: 1227911806} + m_Layer: 5 + m_Name: Seperator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1227911805 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1227911804} + 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: [] + m_Father: {fileID: 766560829} + m_RootOrder: 3 + 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.5, y: 0.5} +--- !u!114 &1227911806 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11435842, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1227911804} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 1 + m_FlexibleHeight: 1 + m_LayoutPriority: 1 +--- !u!1 &1244806538 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109518, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1244806539} + - component: {fileID: 1244806540} + m_Layer: 5 + m_Name: A + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1244806539 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1244806538} + 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: 2008219134} + - {fileID: 741290795} + - {fileID: 1818163275} + m_Father: {fileID: 1869602467} + m_RootOrder: 8 + 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.5, y: 0.5} +--- !u!114 &1244806540 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11455040, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1244806538} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1255765975 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 169426, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1255765976} + - component: {fileID: 1255765979} + - component: {fileID: 1255765978} + - component: {fileID: 1255765977} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1255765976 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1255765975} + 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: 657443833} + - {fileID: 204528839} + m_Father: {fileID: 1455122463} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1255765977 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11446360, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1255765975} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1255765978 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11427848, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1255765975} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1255765979 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11444998, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1255765975} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1008031677} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 1008031676} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1260621561 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109518, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1260621562} + - component: {fileID: 1260621563} + m_Layer: 5 + m_Name: A + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1260621562 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1260621561} + 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: 104575433} + - {fileID: 832625941} + - {fileID: 1399776228} + m_Father: {fileID: 766560829} + m_RootOrder: 8 + 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.5, y: 0.5} +--- !u!114 &1260621563 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11455040, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1260621561} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1268005416 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 191318, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1268005417} + - component: {fileID: 1268005420} + - component: {fileID: 1268005419} + - component: {fileID: 1268005418} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1268005417 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1268005416} + 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: 1904021037} + - {fileID: 1659989094} + m_Father: {fileID: 451330292} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1268005418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11457668, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1268005416} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1268005419 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488972, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1268005416} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1268005420 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11423356, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1268005416} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 145101539} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 145101538} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1269579308 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194704, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1269579309} + - component: {fileID: 1269579313} + - component: {fileID: 1269579312} + - component: {fileID: 1269579311} + - component: {fileID: 1269579310} + m_Layer: 5 + m_Name: Preset (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1269579309 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22415658, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1269579308} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 98.181816, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1269579310 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415596, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1269579308} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1269579311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11470716, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1269579308} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1269579312} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1269579312} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1269579312 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11418286, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1269579308} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1269579313 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22220132, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1269579308} +--- !u!1 &1300273266 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 127516, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1300273267} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1300273267 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22475824, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1300273266} + 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: 1461736452} + m_Father: {fileID: 1211834307} + m_RootOrder: 1 + 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!1 &1301804700 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 189222, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1301804701} + - component: {fileID: 1301804704} + - component: {fileID: 1301804703} + - component: {fileID: 1301804702} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1301804701 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1301804700} + 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: 1076908622} + - {fileID: 1582460084} + m_Father: {fileID: 212132363} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1301804702 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11411114, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1301804700} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1301804703 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477176, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1301804700} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1301804704 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11460148, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1301804700} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1914690397} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 1914690396} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1302429622 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 150874, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1302429623} + - component: {fileID: 1302429626} + - component: {fileID: 1302429625} + - component: {fileID: 1302429624} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1302429623 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22498864, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1302429622} + 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: [] + m_Father: {fileID: 411092138} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1302429624 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11410684, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1302429622} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1302429625 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469324, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1302429622} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &1302429626 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22223566, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1302429622} +--- !u!1 &1305298855 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 158070, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1305298856} + - component: {fileID: 1305298858} + - component: {fileID: 1305298857} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1305298856 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22441130, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1305298855} + 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: [] + m_Father: {fileID: 654651893} + 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: 8} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1305298857 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11464698, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1305298855} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1305298858 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22216992, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1305298855} +--- !u!1 &1321495529 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 119286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1321495530} + - component: {fileID: 1321495534} + - component: {fileID: 1321495533} + - component: {fileID: 1321495532} + - component: {fileID: 1321495531} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1321495530 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1321495529} + 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: [] + m_Father: {fileID: 1455122463} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &1321495531 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11411592, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1321495529} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1321495532 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11433944, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1321495529} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1321495533 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11475176, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1321495529} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &1321495534 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22215766, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1321495529} +--- !u!1 &1324958791 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 165936, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1324958792} + - component: {fileID: 1324958793} + m_Layer: 5 + m_Name: V + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1324958792 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1324958791} + 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: 917512078} + - {fileID: 20473275} + - {fileID: 1127985420} + m_Father: {fileID: 766560829} + m_RootOrder: 6 + 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.5, y: 0.5} +--- !u!114 &1324958793 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11452336, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1324958791} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1329222747 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109976, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1329222748} + - component: {fileID: 1329222750} + - component: {fileID: 1329222749} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1329222748 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1329222747} + 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: [] + m_Father: {fileID: 875044583} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1329222749 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11484674, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1329222747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1329222750 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22236658, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1329222747} +--- !u!1 &1331100896 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 167200, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1331100897} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1331100897 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22431028, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1331100896} + 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: 408284502} + m_Father: {fileID: 20473275} + m_RootOrder: 1 + 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!1 &1350650411 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 173810, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1350650412} + - component: {fileID: 1350650416} + - component: {fileID: 1350650415} + - component: {fileID: 1350650414} + - component: {fileID: 1350650413} + m_Layer: 5 + m_Name: Preset (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1350650412 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22445984, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1350650411} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 120, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1350650413 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11408032, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1350650411} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1350650414 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487238, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1350650411} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1350650415} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1350650415} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1350650415 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11426590, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1350650411} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1350650416 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22216614, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1350650411} +--- !u!1 &1368962645 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114640, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1368962646} + - component: {fileID: 1368962648} + - component: {fileID: 1368962647} + m_Layer: 5 + m_Name: Hue + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1368962646 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22462156, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1368962645} + 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: 1083435564} + - {fileID: 180234993} + m_Father: {fileID: 371570537} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -25, y: -5} + m_SizeDelta: {x: 20, y: -10} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1368962647 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469788, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1368962645} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1368962648 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11499806, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1368962645} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1180372219} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 1180372218} + m_Direction: 2 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1372827461 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 190312, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1372827462} + - component: {fileID: 1372827465} + - component: {fileID: 1372827464} + - component: {fileID: 1372827463} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1372827462 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1372827461} + 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: [] + m_Father: {fileID: 2111239723} + 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.5, y: 0.5} +--- !u!114 &1372827463 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11436886, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1372827461} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1372827464 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430478, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1372827461} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: R +--- !u!222 &1372827465 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22230530, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1372827461} +--- !u!1 &1395360686 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 134618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1395360687} + - component: {fileID: 1395360690} + - component: {fileID: 1395360689} + - component: {fileID: 1395360688} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1395360687 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1395360686} + 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: [] + m_Father: {fileID: 1566327407} + 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: 12.5, y: -8} + m_SizeDelta: {x: 15, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1395360688 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11453048, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1395360686} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1395360689 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11428072, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1395360686} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: G +--- !u!222 &1395360690 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22206792, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1395360686} +--- !u!1 &1396656501 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 167200, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1396656502} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1396656502 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22431028, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1396656501} + 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: 146467718} + m_Father: {fileID: 411092138} + m_RootOrder: 1 + 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!1 &1399776227 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 190688, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1399776228} + - component: {fileID: 1399776232} + - component: {fileID: 1399776231} + - component: {fileID: 1399776230} + - component: {fileID: 1399776229} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1399776228 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1399776227} + 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: [] + m_Father: {fileID: 1260621562} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 222.5, y: -8} + m_SizeDelta: {x: 25, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1399776229 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11414424, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1399776227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1399776230 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11435758, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1399776227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1399776231 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11410848, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1399776227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 255 +--- !u!222 &1399776232 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22222836, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1399776227} +--- !u!1 &1424261725 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 144296, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1424261726} + - component: {fileID: 1424261727} + m_Layer: 5 + m_Name: H + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1424261726 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1424261725} + 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: 493804171} + - {fileID: 1211834307} + - {fileID: 244200430} + m_Father: {fileID: 766560829} + m_RootOrder: 4 + 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.5, y: 0.5} +--- !u!114 &1424261727 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11493476, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1424261725} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1428027842 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109170, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1428027843} + - component: {fileID: 1428027847} + - component: {fileID: 1428027846} + - component: {fileID: 1428027845} + - component: {fileID: 1428027844} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1428027843 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1428027842} + 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: [] + m_Father: {fileID: 451330292} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &1428027844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400974, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1428027842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1428027845 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11448474, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1428027842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1428027846 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11460492, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1428027842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &1428027847 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22289050, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1428027842} +--- !u!1 &1444409342 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168892, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1444409343} + - component: {fileID: 1444409345} + - component: {fileID: 1444409344} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1444409343 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22490412, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1444409342} + 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: [] + m_Father: {fileID: 1669242056} + m_RootOrder: 1 + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1444409344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11448266, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1444409342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1444409345 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22218658, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1444409342} +--- !u!1 &1455122462 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 196948, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1455122463} + - component: {fileID: 1455122464} + m_Layer: 5 + m_Name: G + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1455122463 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1455122462} + 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: 1550277049} + - {fileID: 1255765976} + - {fileID: 1321495530} + m_Father: {fileID: 1869602467} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1455122464 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11407234, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1455122462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1461736451 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 160884, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1461736452} + - component: {fileID: 1461736454} + - component: {fileID: 1461736453} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1461736452 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22437272, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1461736451} + 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: [] + m_Father: {fileID: 1300273267} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1461736453 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11432620, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1461736451} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1461736454 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22226060, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1461736451} +--- !u!1 &1486541059 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 142866, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1486541060} + - component: {fileID: 1486541064} + - component: {fileID: 1486541063} + - component: {fileID: 1486541062} + - component: {fileID: 1486541061} + m_Layer: 5 + m_Name: Preset (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1486541060 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22465820, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1486541059} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 141.81818, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1486541061 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477610, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1486541059} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1486541062 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11468552, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1486541059} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1486541063} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1486541063} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1486541063 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487346, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1486541059} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1486541064 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22217064, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1486541059} +--- !u!1 &1490019351 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109276, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1490019352} + - component: {fileID: 1490019353} + m_Layer: 5 + m_Name: ColorBox + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1490019352 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1490019351} + 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: 1901109258} + m_Father: {fileID: 1785630327} + 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.5, y: 0.5} +--- !u!114 &1490019353 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11475674, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1490019351} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1254083943, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AspectMode: 3 + m_AspectRatio: 1 +--- !u!1 &1490811191 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 176944, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1490811192} + - component: {fileID: 1490811195} + - component: {fileID: 1490811194} + - component: {fileID: 1490811193} + m_Layer: 5 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1490811192 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22446496, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1490811191} + 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: [] + m_Father: {fileID: 836404686} + 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!114 &1490811193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488000, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1490811191} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bca58eb07ad66b498a2f158bcb13225, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1490811194 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11459056, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1490811191} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1490811195 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22208798, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1490811191} +--- !u!1 &1497405587 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 110962, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1497405588} + - component: {fileID: 1497405592} + - component: {fileID: 1497405591} + - component: {fileID: 1497405590} + - component: {fileID: 1497405589} + m_Layer: 5 + m_Name: Preset (8) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1497405588 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22407396, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1497405587} + 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: [] + m_Father: {fileID: 694136810} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 185.45453, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1497405589 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11453686, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1497405587} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1497405590 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469678, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1497405587} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1497405591} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 694136811} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1497405591} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1497405591 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11443566, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1497405587} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1497405592 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22269076, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1497405587} +--- !u!1 &1499836823 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 118516, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1499836824} + - component: {fileID: 1499836828} + - component: {fileID: 1499836827} + - component: {fileID: 1499836826} + - component: {fileID: 1499836825} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1499836824 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1499836823} + 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: [] + m_Father: {fileID: 953654619} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 222.5, y: -8} + m_SizeDelta: {x: 25, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1499836825 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11479482, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1499836823} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1499836826 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482782, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1499836823} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1499836827 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11435316, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1499836823} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &1499836828 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22258132, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1499836823} +--- !u!1 &1550277048 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 134618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1550277049} + - component: {fileID: 1550277052} + - component: {fileID: 1550277051} + - component: {fileID: 1550277050} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1550277049 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1550277048} + 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: [] + m_Father: {fileID: 1455122463} + 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.5, y: 0.5} +--- !u!114 &1550277050 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11453048, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1550277048} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1550277051 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11428072, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1550277048} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: G +--- !u!222 &1550277052 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22206792, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1550277048} +--- !u!1 &1566327406 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 196948, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1566327407} + - component: {fileID: 1566327408} + m_Layer: 5 + m_Name: G + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1566327407 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1566327406} + 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: 1395360687} + - {fileID: 507677672} + - {fileID: 1771447196} + m_Father: {fileID: 766560829} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1566327408 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11407234, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1566327406} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1582460083 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 108322, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1582460084} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1582460084 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22463192, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1582460083} + 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: 1914690396} + m_Father: {fileID: 1301804701} + m_RootOrder: 1 + 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!1 &1645107937 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 119204, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1645107938} + m_Layer: 5 + m_Name: ColorBox Container + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1645107938 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22486906, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1645107937} + 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: 2131444184} + m_Father: {fileID: 371570537} + 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: -12.5, y: 0} + m_SizeDelta: {x: -35, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1659989093 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 127516, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1659989094} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1659989094 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22475824, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1659989093} + 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: 145101538} + m_Father: {fileID: 1268005417} + m_RootOrder: 1 + 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!1 &1669242055 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 117174, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1669242056} + - component: {fileID: 1669242060} + - component: {fileID: 1669242059} + - component: {fileID: 1669242058} + - component: {fileID: 1669242057} + m_Layer: 5 + m_Name: InputField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1669242056 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1669242055} + 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: 1932986643} + - {fileID: 1444409343} + m_Father: {fileID: 2062443902} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1669242057 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11483982, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1669242055} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d85c534b3c1560544b09d0996dfeba84, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1669242058 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11463028, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1669242055} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1669242059} + m_TextComponent: {fileID: 1444409344} + m_Placeholder: {fileID: 1932986644} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &1669242059 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11457280, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1669242055} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1669242060 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22261740, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1669242055} +--- !u!1 &1689461654 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 176944, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1689461655} + - component: {fileID: 1689461658} + - component: {fileID: 1689461657} + - component: {fileID: 1689461656} + m_Layer: 5 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1689461655 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22446496, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1689461654} + 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: [] + m_Father: {fileID: 1790845646} + 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!114 &1689461656 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488000, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1689461654} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bca58eb07ad66b498a2f158bcb13225, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1689461657 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11459056, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1689461654} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1689461658 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22208798, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1689461654} +--- !u!1 &1708059822 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 197314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1708059823} + - component: {fileID: 1708059826} + - component: {fileID: 1708059825} + - component: {fileID: 1708059824} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1708059823 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22400824, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1708059822} + 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: [] + m_Father: {fileID: 2047505125} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1708059824 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11413310, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1708059822} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1708059825 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11407662, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1708059822} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &1708059826 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22221412, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1708059822} +--- !u!1 &1742387425 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1742387427} + - component: {fileID: 1742387426} + 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 &1742387426 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1742387425} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_FalloffTable: + m_Table[0]: 0 + m_Table[1]: 0 + m_Table[2]: 0 + m_Table[3]: 0 + m_Table[4]: 0 + m_Table[5]: 0 + m_Table[6]: 0 + m_Table[7]: 0 + m_Table[8]: 0 + m_Table[9]: 0 + m_Table[10]: 0 + m_Table[11]: 0 + m_Table[12]: 0 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1742387427 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1742387425} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.10938166, w: 0.8754261} + m_LocalPosition: {x: 248.80728, y: 762.6799, z: 227.12805} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1745333869 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 150014, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1745333870} + - component: {fileID: 1745333874} + - component: {fileID: 1745333873} + - component: {fileID: 1745333872} + - component: {fileID: 1745333871} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1745333870 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1745333869} + 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: [] + m_Father: {fileID: 1852080013} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &1745333871 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11424714, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1745333869} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1745333872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487120, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1745333869} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1745333873 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11426072, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1745333869} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &1745333874 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22214676, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1745333869} +--- !u!1 &1746817116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 174742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1746817117} + - component: {fileID: 1746817121} + - component: {fileID: 1746817120} + - component: {fileID: 1746817119} + - component: {fileID: 1746817118} + m_Layer: 5 + m_Name: Preset (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1746817117 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22460006, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1746817116} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 76.36363, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1746817118 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11469158, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1746817116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1746817119 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11485084, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1746817116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1746817120} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1746817120} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1746817120 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494638, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1746817116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1746817121 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22260376, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1746817116} +--- !u!1 &1756926527 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 113042, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1756926528} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1756926528 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22498948, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1756926527} + 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: 242528465} + m_Father: {fileID: 2047505125} + m_RootOrder: 1 + 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!1 &1771447195 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 119286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1771447196} + - component: {fileID: 1771447200} + - component: {fileID: 1771447199} + - component: {fileID: 1771447198} + - component: {fileID: 1771447197} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1771447196 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1771447195} + 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: [] + m_Father: {fileID: 1566327407} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 222.5, y: -8} + m_SizeDelta: {x: 25, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1771447197 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11411592, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1771447195} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1771447198 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11433944, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1771447195} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1771447199 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11475176, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1771447195} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &1771447200 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22215766, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1771447195} +--- !u!1 &1776062161 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 118516, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1776062162} + - component: {fileID: 1776062166} + - component: {fileID: 1776062165} + - component: {fileID: 1776062164} + - component: {fileID: 1776062163} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1776062162 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1776062161} + 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: [] + m_Father: {fileID: 212132363} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &1776062163 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11479482, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1776062161} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1776062164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482782, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1776062161} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1776062165 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11435316, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1776062161} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &1776062166 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22258132, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1776062161} +--- !u!1 &1785630326 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 119204, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1785630327} + m_Layer: 5 + m_Name: ColorBox Container + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1785630327 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22486906, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1785630326} + 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: 1490019352} + m_Father: {fileID: 1981096033} + 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: -12.5, y: 0} + m_SizeDelta: {x: -35, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1790010518 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1790010519} + - component: {fileID: 1790010522} + - component: {fileID: 1790010521} + - component: {fileID: 1790010520} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1790010519 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1790010518} + 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: [] + m_Father: {fileID: 953654619} + 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: 12.5, y: -8} + m_SizeDelta: {x: 15, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1790010520 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11493426, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1790010518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1790010521 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11476698, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1790010518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: B +--- !u!222 &1790010522 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22254790, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1790010518} +--- !u!1 &1790845645 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 192330, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1790845646} + - component: {fileID: 1790845648} + - component: {fileID: 1790845647} + m_Layer: 5 + m_Name: Color + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1790845646 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1790845645} + 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: 1689461655} + m_Father: {fileID: 109164930} + 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.5, y: 0.5} +--- !u!114 &1790845647 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11461114, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1790845645} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.39215687} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 0 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1790845648 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22255370, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1790845645} +--- !u!1 &1798666490 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 118568, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1798666491} + - component: {fileID: 1798666495} + - component: {fileID: 1798666494} + - component: {fileID: 1798666493} + - component: {fileID: 1798666492} + m_Layer: 5 + m_Name: BoxSlider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1798666491 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22462880, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1798666490} + 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: 875044583} + m_Father: {fileID: 2131444184} + 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!114 &1798666492 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11463516, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1798666490} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e4240873631f724496efec97d7151b3, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1798666493 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11436574, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1798666490} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1798666494 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22222454, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1798666490} +--- !u!114 &1798666495 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11424766, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1798666490} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 37c44bc94a9a7f241b5b552f3ff89458, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1818163274 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 190688, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1818163275} + - component: {fileID: 1818163279} + - component: {fileID: 1818163278} + - component: {fileID: 1818163277} + - component: {fileID: 1818163276} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1818163275 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1818163274} + 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: [] + m_Father: {fileID: 1244806539} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &1818163276 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11414424, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1818163274} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1818163277 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11435758, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1818163274} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1818163278 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11410848, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1818163274} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 255 +--- !u!222 &1818163279 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22222836, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1818163274} +--- !u!1 &1821474526 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 184328, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1821474527} + - component: {fileID: 1821474531} + - component: {fileID: 1821474530} + - component: {fileID: 1821474529} + - component: {fileID: 1821474528} + m_Layer: 5 + m_Name: Preset (7) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1821474527 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22455926, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1821474526} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 163.63635, y: -10} + m_SizeDelta: {x: 21.818182, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1821474528 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11482218, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1821474526} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1821474529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11485672, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1821474526} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1821474530} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1821474530} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1821474530 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11425336, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1821474526} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1821474531 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22240504, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1821474526} +--- !u!1 &1828906401 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 150098, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1828906402} + - component: {fileID: 1828906403} + m_Layer: 5 + m_Name: S + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1828906402 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1828906401} + 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: 2006820090} + - {fileID: 175796671} + - {fileID: 2017415519} + m_Father: {fileID: 766560829} + m_RootOrder: 5 + 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.5, y: 0.5} +--- !u!114 &1828906403 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11496146, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1828906401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1837440034 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157272, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 367771814} + - component: {fileID: 1837440036} + - component: {fileID: 1837440035} + - component: {fileID: 367771815} + m_Layer: 5 + m_Name: Picker 2.0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1837440035 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11426166, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1837440034} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1837440036 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22269110, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1837440034} +--- !u!1 &1852080012 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 165936, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1852080013} + - component: {fileID: 1852080014} + m_Layer: 5 + m_Name: V + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1852080013 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1852080012} + 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: 1194976000} + - {fileID: 411092138} + - {fileID: 1745333870} + m_Father: {fileID: 1869602467} + m_RootOrder: 6 + 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.5, y: 0.5} +--- !u!114 &1852080014 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11452336, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1852080012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1869602466 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 169390, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1869602467} + - component: {fileID: 1869602468} + m_Layer: 5 + m_Name: Sliders + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1869602467 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22415604, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1869602466} + 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: 2111239723} + - {fileID: 1455122463} + - {fileID: 212132363} + - {fileID: 57913838} + - {fileID: 451330292} + - {fileID: 361808359} + - {fileID: 1852080013} + - {fileID: 1029991561} + - {fileID: 1244806539} + m_Father: {fileID: 367771814} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 170} + m_SizeDelta: {x: 0, y: 145} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1869602468 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11463640, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1869602466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1878514645 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157272, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 710150150} + - component: {fileID: 1878514647} + - component: {fileID: 1878514646} + - component: {fileID: 710150151} + m_Layer: 5 + m_Name: Picker 2.0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1878514646 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11426166, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1878514645} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1878514647 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22269110, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1878514645} +--- !u!1 &1886394072 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 187878, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1886394073} + - component: {fileID: 1886394077} + - component: {fileID: 1886394076} + - component: {fileID: 1886394075} + - component: {fileID: 1886394074} + m_Layer: 5 + m_Name: Preset (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1886394073 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1886394072} + 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: [] + m_Father: {fileID: 274021472} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &1886394074 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11439404, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1886394072} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 20 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1886394075 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11452934, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1886394072} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1886394076} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 274021473} + m_MethodName: PresetSelect + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1886394076} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Image, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1886394076 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11441004, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1886394072} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.21366784, g: 0.7647059, b: 0.30867442, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1886394077 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22278160, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1886394072} +--- !u!1 &1895047779 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1895047780} + - component: {fileID: 1895047783} + - component: {fileID: 1895047782} + - component: {fileID: 1895047781} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1895047780 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1895047779} + m_LocalRotation: {x: 0, y: 0.2159284, z: 0, w: 0.9764092} + m_LocalPosition: {x: 0, y: 0, z: 10} + m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} + m_Children: + - {fileID: 710150150} + m_Father: {fileID: 570113577} + 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: 1274, y: 909} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1895047781 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1895047779} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1895047782 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1895047779} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1895047783 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1895047779} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 25 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &1901109257 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 118568, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1901109258} + - component: {fileID: 1901109262} + - component: {fileID: 1901109261} + - component: {fileID: 1901109260} + - component: {fileID: 1901109259} + m_Layer: 5 + m_Name: BoxSlider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1901109258 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22462880, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1901109257} + 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: 629615632} + m_Father: {fileID: 1490019352} + 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!114 &1901109259 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11463516, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1901109257} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e4240873631f724496efec97d7151b3, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1901109260 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11436574, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1901109257} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1901109261 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22222454, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1901109257} +--- !u!114 &1901109262 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11424766, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1901109257} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 37c44bc94a9a7f241b5b552f3ff89458, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1904021036 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 120788, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1904021037} + - component: {fileID: 1904021040} + - component: {fileID: 1904021039} + - component: {fileID: 1904021038} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1904021037 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22479018, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1904021036} + 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: [] + m_Father: {fileID: 1268005417} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1904021038 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11431864, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1904021036} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1904021039 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11449214, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1904021036} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &1904021040 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22267742, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1904021036} +--- !u!1 &1914690395 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 137072, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1914690396} + - component: {fileID: 1914690398} + - component: {fileID: 1914690397} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1914690396 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22432592, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1914690395} + 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: [] + m_Father: {fileID: 1582460084} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1914690397 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11429028, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1914690395} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1914690398 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22241672, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1914690395} +--- !u!1 &1932986642 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109862, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1932986643} + - component: {fileID: 1932986645} + - component: {fileID: 1932986644} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1932986643 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22463646, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1932986642} + 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: [] + m_Father: {fileID: 1669242056} + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1932986644 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11419324, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1932986642} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter text... +--- !u!222 &1932986645 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22208894, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1932986642} +--- !u!1 &1939675297 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 152064, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1939675298} + - component: {fileID: 1939675301} + - component: {fileID: 1939675300} + - component: {fileID: 1939675299} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1939675298 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1939675297} + 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: [] + m_Father: {fileID: 451330292} + 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.5, y: 0.5} +--- !u!114 &1939675299 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11431838, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1939675297} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1939675300 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487462, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1939675297} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: H +--- !u!222 &1939675301 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22224878, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1939675297} +--- !u!1 &1941335921 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 103988, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 1941335922} + - component: {fileID: 1941335925} + - component: {fileID: 1941335924} + - component: {fileID: 1941335923} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1941335922 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22419704, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1941335921} + 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: [] + m_Father: {fileID: 740175640} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1941335923 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11434628, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1941335921} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca76dd9ad6eb204c9b0481aece34497, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1941335924 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11461748, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1941335921} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 2 +--- !u!222 &1941335925 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22202916, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 1941335921} +--- !u!1 &1959037690 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 118848, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1959037691} + - component: {fileID: 1959037692} + m_Layer: 5 + m_Name: Seperator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1959037691 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1959037690} + 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: [] + m_Father: {fileID: 766560829} + m_RootOrder: 7 + 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.5, y: 0.5} +--- !u!114 &1959037692 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11451352, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1959037690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 1 + m_FlexibleHeight: 1 + m_LayoutPriority: 1 +--- !u!1 &1981096032 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 165956, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 1981096033} + m_Layer: 5 + m_Name: HSVField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1981096033 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22468756, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 1981096032} + 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: 1785630327} + - {fileID: 206875737} + m_Father: {fileID: 710150150} + m_RootOrder: 1 + 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: 60} + m_SizeDelta: {x: 0, y: -220} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &2006820089 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 169152, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 2006820090} + - component: {fileID: 2006820093} + - component: {fileID: 2006820092} + - component: {fileID: 2006820091} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2006820090 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2006820089} + 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: [] + m_Father: {fileID: 1828906402} + 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: 12.5, y: -8} + m_SizeDelta: {x: 15, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2006820091 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11421370, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2006820089} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &2006820092 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430666, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2006820089} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: S +--- !u!222 &2006820093 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22287232, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2006820089} +--- !u!1 &2008219133 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188196, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 2008219134} + - component: {fileID: 2008219137} + - component: {fileID: 2008219136} + - component: {fileID: 2008219135} + m_Layer: 5 + m_Name: LeftText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2008219134 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2008219133} + 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: [] + m_Father: {fileID: 1244806539} + 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.5, y: 0.5} +--- !u!114 &2008219135 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11418062, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2008219133} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 15 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &2008219136 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11421558, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2008219133} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: A +--- !u!222 &2008219137 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22254392, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2008219133} +--- !u!1 &2017415518 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 197864, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 2017415519} + - component: {fileID: 2017415523} + - component: {fileID: 2017415522} + - component: {fileID: 2017415521} + - component: {fileID: 2017415520} + m_Layer: 5 + m_Name: ValueText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2017415519 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2017415518} + 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: [] + m_Father: {fileID: 1828906402} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 222.5, y: -8} + m_SizeDelta: {x: 25, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2017415520 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11445998, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2017415518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 25 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &2017415521 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11429994, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2017415518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b10e832a32d2d14facd8a3f489ee8d6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &2017415522 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415718, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2017415518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &2017415523 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22217712, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2017415518} +--- !u!1 &2047505124 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 161688, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 2047505125} + - component: {fileID: 2047505128} + - component: {fileID: 2047505127} + - component: {fileID: 2047505126} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2047505125 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2047505124} + 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: 1708059823} + - {fileID: 1756926528} + m_Father: {fileID: 2111239723} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &2047505126 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11472300, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2047505124} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &2047505127 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415364, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2047505124} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &2047505128 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456442, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2047505124} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 242528466} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 242528465} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &2048501438 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 165534, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 2048501439} + - component: {fileID: 2048501441} + - component: {fileID: 2048501440} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2048501439 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22445236, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2048501438} + 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: [] + m_Father: {fileID: 1090620061} + 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: 5, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2048501440 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415580, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2048501438} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2048501441 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22243436, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2048501438} +--- !u!1 &2062443901 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194224, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 2062443902} + - component: {fileID: 2062443903} + m_Layer: 5 + m_Name: ColorField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2062443902 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22489814, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2062443901} + 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: 836404686} + - {fileID: 1669242056} + m_Father: {fileID: 367771814} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &2062443903 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11476502, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2062443901} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 0 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &2090454928 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2090454929} + - component: {fileID: 2090454932} + - component: {fileID: 2090454931} + - component: {fileID: 2090454930} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2090454929 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2090454928} + 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_Children: + - {fileID: 367771814} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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 &2090454930 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2090454928} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &2090454931 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2090454928} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &2090454932 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2090454928} + 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: 25 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &2093402359 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 189222, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1064925107} + serializedVersion: 5 + m_Component: + - component: {fileID: 2093402360} + - component: {fileID: 2093402363} + - component: {fileID: 2093402362} + - component: {fileID: 2093402361} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2093402360 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2093402359} + 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: 148584819} + - {fileID: 1118961867} + m_Father: {fileID: 953654619} + 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: 115, y: -8} + m_SizeDelta: {x: 180, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2093402361 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11411114, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2093402359} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c600592efa0cf25479655321bf4fb08a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &2093402362 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477176, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2093402359} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 16 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &2093402363 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11460148, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1064925107} + m_GameObject: {fileID: 2093402359} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 842308285} + m_FillRect: {fileID: 0} + m_HandleRect: {fileID: 842308284} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &2111239722 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 113862, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 2111239723} + - component: {fileID: 2111239724} + m_Layer: 5 + m_Name: R + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2111239723 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2111239722} + 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: 1372827462} + - {fileID: 2047505125} + - {fileID: 261232955} + m_Father: {fileID: 1869602467} + 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.5, y: 0.5} +--- !u!114 &2111239724 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11452006, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2111239722} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &2131444183 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109276, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_PrefabInternal: {fileID: 1173001356} + serializedVersion: 5 + m_Component: + - component: {fileID: 2131444184} + - component: {fileID: 2131444185} + m_Layer: 5 + m_Name: ColorBox + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2131444184 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2131444183} + 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: 1798666491} + m_Father: {fileID: 1645107938} + 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.5, y: 0.5} +--- !u!114 &2131444185 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11475674, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1173001356} + m_GameObject: {fileID: 2131444183} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1254083943, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AspectMode: 3 + m_AspectRatio: 1 diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/PickerTest.unity.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/PickerTest.unity.meta new file mode 100755 index 00000000..f7ac8702 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/PickerTest.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ce46c07f0028e314ab7767577ab5e7a6 +DefaultImporter: + userData: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI.meta new file mode 100755 index 00000000..861a8323 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2b5fe4e314cbd9944bcaa93e814e9bd5 +folderAsset: yes +timeCreated: 1442586536 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorImage.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorImage.cs new file mode 100755 index 00000000..087b17ab --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorImage.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using UnityEngine.UI; +using System.Collections; + +[RequireComponent(typeof(Image))] +public class ColorImage : MonoBehaviour +{ + public ColorPicker picker; + + private Image image; + + private void Awake() + { + image = GetComponent(); + picker.onValueChanged.AddListener(ColorChanged); + } + + private void OnDestroy() + { + picker.onValueChanged.RemoveListener(ColorChanged); + } + + private void ColorChanged(Color newColor) + { + image.color = newColor; + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorImage.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorImage.cs.meta new file mode 100755 index 00000000..a3d87fb6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorImage.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6bca58eb07ad66b498a2f158bcb13225 +timeCreated: 1442675622 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorLabel.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorLabel.cs new file mode 100755 index 00000000..17e49235 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorLabel.cs @@ -0,0 +1,83 @@ +using UnityEngine; +using UnityEngine.UI; +using System; + +[RequireComponent(typeof(Text))] +public class ColorLabel : MonoBehaviour +{ + public ColorPicker picker; + + public ColorValues type; + + public string prefix = "R: "; + public float minValue = 0; + public float maxValue = 255; + + public int precision = 0; + + private Text label; + + private void Awake() + { + label = GetComponent(); + + } + + private void OnEnable() + { + if (Application.isPlaying && picker != null) + { + picker.onValueChanged.AddListener(ColorChanged); + picker.onHSVChanged.AddListener(HSVChanged); + } + } + + private void OnDestroy() + { + if (picker != null) + { + picker.onValueChanged.RemoveListener(ColorChanged); + picker.onHSVChanged.RemoveListener(HSVChanged); + } + } + +#if UNITY_EDITOR + private void OnValidate() + { + label = GetComponent(); + UpdateValue(); + } +#endif + + private void ColorChanged(Color color) + { + UpdateValue(); + } + + private void HSVChanged(float hue, float sateration, float value) + { + UpdateValue(); + } + + private void UpdateValue() + { + if (picker == null) + { + label.text = prefix + "-"; + } + else + { + float value = minValue + (picker.GetValue(type) * (maxValue - minValue)); + + label.text = prefix + ConvertToDisplayString(value); + } + } + + private string ConvertToDisplayString(float value) + { + if (precision > 0) + return value.ToString("f " + precision); + else + return Mathf.FloorToInt(value).ToString(); + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorLabel.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorLabel.cs.meta new file mode 100755 index 00000000..5fe62545 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorLabel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6b10e832a32d2d14facd8a3f489ee8d6 +timeCreated: 1442587803 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPicker.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPicker.cs new file mode 100755 index 00000000..7f089e6b --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPicker.cs @@ -0,0 +1,255 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; +using UnityEngine.Events; + +public class ColorPicker : MonoBehaviour +{ + private float _hue = 0; + private float _saturation = 0; + private float _brightness = 0; + + private float _red = 0; + private float _green = 0; + private float _blue = 0; + + private float _alpha = 1; + + public ColorChangedEvent onValueChanged = new ColorChangedEvent(); + public HSVChangedEvent onHSVChanged = new HSVChangedEvent(); + + public Color CurrentColor + { + get + { + return new Color(_red, _green, _blue, _alpha); + } + set + { + if (CurrentColor == value) + return; + + _red = value.r; + _green = value.g; + _blue = value.b; + _alpha = value.a; + + RGBChanged(); + + SendChangedEvent(); + } + } + + private void Start() + { + SendChangedEvent(); + } + + public float H + { + get + { + return _hue; + } + set + { + if (_hue == value) + return; + + _hue = value; + + HSVChanged(); + + SendChangedEvent(); + } + } + + public float S + { + get + { + return _saturation; + } + set + { + if (_saturation == value) + return; + + _saturation = value; + + HSVChanged(); + + SendChangedEvent(); + } + } + + public float V + { + get + { + return _brightness; + } + set + { + if (_brightness == value) + return; + + _brightness = value; + + HSVChanged(); + + SendChangedEvent(); + } + } + + public float R + { + get + { + return _red; + } + set + { + if (_red == value) + return; + + _red = value; + + RGBChanged(); + + SendChangedEvent(); + } + } + + public float G + { + get + { + return _green; + } + set + { + if (_green == value) + return; + + _green = value; + + RGBChanged(); + + SendChangedEvent(); + } + } + + public float B + { + get + { + return _blue; + } + set + { + if (_blue == value) + return; + + _blue = value; + + RGBChanged(); + + SendChangedEvent(); + } + } + + private float A + { + get + { + return _alpha; + } + set + { + if (_alpha == value) + return; + + _alpha = value; + + SendChangedEvent(); + } + } + + private void RGBChanged() + { + HsvColor color = HSVUtil.ConvertRgbToHsv(CurrentColor); + + _hue = color.normalizedH; + _saturation = color.normalizedS; + _brightness = color.normalizedV; + } + + private void HSVChanged() + { + Color color = HSVUtil.ConvertHsvToRgb(_hue * 360, _saturation, _brightness, _alpha); + + _red = color.r; + _green = color.g; + _blue = color.b; + } + + private void SendChangedEvent() + { + onValueChanged.Invoke(CurrentColor); + onHSVChanged.Invoke(_hue, _saturation, _brightness); + } + + public void AssignColor(ColorValues type, float value) + { + switch (type) + { + case ColorValues.R: + R = value; + break; + case ColorValues.G: + G = value; + break; + case ColorValues.B: + B = value; + break; + case ColorValues.A: + A = value; + break; + case ColorValues.Hue: + H = value; + break; + case ColorValues.Saturation: + S = value; + break; + case ColorValues.Value: + V = value; + break; + default: + break; + } + } + + public float GetValue(ColorValues type) + { + switch (type) + { + case ColorValues.R: + return R; + case ColorValues.G: + return G; + case ColorValues.B: + return B; + case ColorValues.A: + return A; + case ColorValues.Hue: + return H; + case ColorValues.Saturation: + return S; + case ColorValues.Value: + return V; + default: + throw new System.NotImplementedException(""); + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPicker.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPicker.cs.meta new file mode 100755 index 00000000..d4aac35f --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPicker.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8262e4a8322117f4da079921eaa72834 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPresets.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPresets.cs new file mode 100755 index 00000000..de078338 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPresets.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using UnityEngine.UI; + +public class ColorPresets : MonoBehaviour +{ + public ColorPicker picker; + public GameObject[] presets; + public Image createPresetImage; + + void Awake() + { +// picker.onHSVChanged.AddListener(HSVChanged); + picker.onValueChanged.AddListener(ColorChanged); + } + + public void CreatePresetButton() + { + for (var i = 0; i < presets.Length; i++) + { + if (!presets[i].activeSelf) + { + presets[i].SetActive(true); + presets[i].GetComponent().color = picker.CurrentColor; + break; + } + } + } + + public void PresetSelect(Image sender) + { + picker.CurrentColor = sender.color; + } + + // Not working, it seems ConvertHsvToRgb() is broken. It doesn't work when fed + // input h, s, v as shown below. +// private void HSVChanged(float h, float s, float v) +// { +// createPresetImage.color = HSVUtil.ConvertHsvToRgb(h, s, v, 1); +// } + private void ColorChanged(Color color) + { + createPresetImage.color = color; + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPresets.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPresets.cs.meta new file mode 100755 index 00000000..8901adad --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorPresets.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0923373e76e77402c9c53a2f1250ad3e +timeCreated: 1456875791 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSlider.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSlider.cs new file mode 100755 index 00000000..a91ef7db --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSlider.cs @@ -0,0 +1,91 @@ +using UnityEngine; +using UnityEngine.UI; +using System; + +/// +/// Displays one of the color values of aColorPicker +/// +[RequireComponent(typeof(Slider))] +public class ColorSlider : MonoBehaviour +{ + public ColorPicker hsvpicker; + + /// + /// Which value this slider can edit. + /// + public ColorValues type; + + private Slider slider; + + private bool listen = true; + + private void Awake() + { + slider = GetComponent(); + + hsvpicker.onValueChanged.AddListener(ColorChanged); + hsvpicker.onHSVChanged.AddListener(HSVChanged); + slider.onValueChanged.AddListener(SliderChanged); + } + + private void OnDestroy() + { + hsvpicker.onValueChanged.RemoveListener(ColorChanged); + hsvpicker.onHSVChanged.RemoveListener(HSVChanged); + slider.onValueChanged.RemoveListener(SliderChanged); + } + + private void ColorChanged(Color newColor) + { + listen = false; + switch (type) + { + case ColorValues.R: + slider.normalizedValue = newColor.r; + break; + case ColorValues.G: + slider.normalizedValue = newColor.g; + break; + case ColorValues.B: + slider.normalizedValue = newColor.b; + break; + case ColorValues.A: + slider.normalizedValue = newColor.a; + break; + default: + break; + } + } + + private void HSVChanged(float hue, float saturation, float value) + { + listen = false; + switch (type) + { + case ColorValues.Hue: + slider.normalizedValue = hue; //1 - hue; + break; + case ColorValues.Saturation: + slider.normalizedValue = saturation; + break; + case ColorValues.Value: + slider.normalizedValue = value; + break; + default: + break; + } + } + + private void SliderChanged(float newValue) + { + if (listen) + { + newValue = slider.normalizedValue; + //if (type == ColorValues.Hue) + // newValue = 1 - newValue; + + hsvpicker.AssignColor(type, newValue); + } + listen = true; + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSlider.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSlider.cs.meta new file mode 100755 index 00000000..c516b5e7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSlider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c600592efa0cf25479655321bf4fb08a +timeCreated: 1442586558 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSliderImage.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSliderImage.cs new file mode 100755 index 00000000..4121ded2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSliderImage.cs @@ -0,0 +1,212 @@ +using UnityEngine; +using UnityEngine.UI; +using System.Collections; + +[RequireComponent(typeof(RawImage)), ExecuteInEditMode()] +public class ColorSliderImage : MonoBehaviour +{ + public ColorPicker picker; + + /// + /// Which value this slider can edit. + /// + public ColorValues type; + + public Slider.Direction direction; + + private RawImage image; + + private RectTransform rectTransform + { + get + { + return transform as RectTransform; + } + } + + private void Awake() + { + image = GetComponent(); + + RegenerateTexture(); + } + + private void OnEnable() + { + if (picker != null && Application.isPlaying) + { + picker.onValueChanged.AddListener(ColorChanged); + picker.onHSVChanged.AddListener(HSVChanged); + } + } + + private void OnDisable() + { + if (picker != null) + { + picker.onValueChanged.RemoveListener(ColorChanged); + picker.onHSVChanged.RemoveListener(HSVChanged); + } + } + + private void OnDestroy() + { + if (image.texture != null) + DestroyImmediate(image.texture); + } + +#if UNITY_EDITOR + private void OnValidate() + { + image = GetComponent(); + RegenerateTexture(); + } +#endif + + private void ColorChanged(Color newColor) + { + switch (type) + { + case ColorValues.R: + case ColorValues.G: + case ColorValues.B: + case ColorValues.Saturation: + case ColorValues.Value: + RegenerateTexture(); + break; + case ColorValues.A: + case ColorValues.Hue: + default: + break; + } + } + + private void HSVChanged(float hue, float saturation, float value) + { + switch (type) + { + case ColorValues.R: + case ColorValues.G: + case ColorValues.B: + case ColorValues.Saturation: + case ColorValues.Value: + RegenerateTexture(); + break; + case ColorValues.A: + case ColorValues.Hue: + default: + break; + } + } + + private void RegenerateTexture() + { + Color32 baseColor = picker != null ? picker.CurrentColor : Color.black; + + float h = picker != null ? picker.H : 0; + float s = picker != null ? picker.S : 0; + float v = picker != null ? picker.V : 0; + + Texture2D texture; + Color32[] colors; + + bool vertical = direction == Slider.Direction.BottomToTop || direction == Slider.Direction.TopToBottom; + bool inverted = direction == Slider.Direction.TopToBottom || direction == Slider.Direction.RightToLeft; + + int size; + switch (type) + { + case ColorValues.R: + case ColorValues.G: + case ColorValues.B: + case ColorValues.A: + size = 255; + break; + case ColorValues.Hue: + size = 360; + break; + case ColorValues.Saturation: + case ColorValues.Value: + size = 100; + break; + default: + throw new System.NotImplementedException(""); + } + if (vertical) + texture = new Texture2D(1, size); + else + texture = new Texture2D(size, 1); + + texture.hideFlags = HideFlags.DontSave; + colors = new Color32[size]; + + switch (type) + { + case ColorValues.R: + for (byte i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = new Color32(i, baseColor.g, baseColor.b, 255); + } + break; + case ColorValues.G: + for (byte i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = new Color32(baseColor.r, i, baseColor.b, 255); + } + break; + case ColorValues.B: + for (byte i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = new Color32(baseColor.r, baseColor.g, i, 255); + } + break; + case ColorValues.A: + for (byte i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = new Color32(i, i, i, 255); + } + break; + case ColorValues.Hue: + for (int i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(i, 1, 1, 1); + } + break; + case ColorValues.Saturation: + for (int i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(h * 360, (float)i / size, v, 1); + } + break; + case ColorValues.Value: + for (int i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(h * 360, s, (float)i / size, 1); + } + break; + default: + throw new System.NotImplementedException(""); + } + texture.SetPixels32(colors); + texture.Apply(); + + if (image.texture != null) + DestroyImmediate(image.texture); + image.texture = texture; + + switch (direction) + { + case Slider.Direction.BottomToTop: + case Slider.Direction.TopToBottom: + image.uvRect = new Rect(0, 0, 2, 1); + break; + case Slider.Direction.LeftToRight: + case Slider.Direction.RightToLeft: + image.uvRect = new Rect(0, 0, 1, 2); + break; + default: + break; + } + } + +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSliderImage.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSliderImage.cs.meta new file mode 100755 index 00000000..2deb1fe2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/ColorSliderImage.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7ca76dd9ad6eb204c9b0481aece34497 +timeCreated: 1442682013 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/HexColorField.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/HexColorField.cs new file mode 100755 index 00000000..a0af5a09 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/HexColorField.cs @@ -0,0 +1,98 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; +using System.Text; +using System.Globalization; + +[RequireComponent(typeof(InputField))] +public class HexColorField : MonoBehaviour +{ + public ColorPicker hsvpicker; + + public bool displayAlpha; + + private InputField hexInputField; + + private const string hexRegex = "^#?(?:[0-9a-fA-F]{3,4}){1,2}$"; + + private void Awake() + { + hexInputField = GetComponent(); + + // Add listeners to keep text (and color) up to date + hexInputField.onEndEdit.AddListener(UpdateColor); + hsvpicker.onValueChanged.AddListener(UpdateHex); + } + + private void OnDestroy() + { + hexInputField.onValueChanged.RemoveListener(UpdateColor); + hsvpicker.onValueChanged.RemoveListener(UpdateHex); + } + + private void UpdateHex(Color newColor) + { + hexInputField.text = ColorToHex(newColor); + } + + private void UpdateColor(string newHex) + { + Color32 color; + if (HexToColor(newHex, out color)) + hsvpicker.CurrentColor = color; + else + Debug.Log("hex value is in the wrong format, valid formats are: #RGB, #RGBA, #RRGGBB and #RRGGBBAA (# is optional)"); + } + + private string ColorToHex(Color32 color) + { + if (displayAlpha) + return string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", color.r, color.g, color.b, color.a); + else + return string.Format("#{0:X2}{1:X2}{2:X2}", color.r, color.g, color.b); + } + + public static bool HexToColor(string hex, out Color32 color) + { + // Check if this is a valid hex string (# is optional) + if (System.Text.RegularExpressions.Regex.IsMatch(hex, hexRegex)) + { + int startIndex = hex.StartsWith("#") ? 1 : 0; + + if (hex.Length == startIndex + 8) //#RRGGBBAA + { + color = new Color32(byte.Parse(hex.Substring(startIndex, 2), NumberStyles.AllowHexSpecifier), + byte.Parse(hex.Substring(startIndex + 2, 2), NumberStyles.AllowHexSpecifier), + byte.Parse(hex.Substring(startIndex + 4, 2), NumberStyles.AllowHexSpecifier), + byte.Parse(hex.Substring(startIndex + 6, 2), NumberStyles.AllowHexSpecifier)); + } + else if (hex.Length == startIndex + 6) //#RRGGBB + { + color = new Color32(byte.Parse(hex.Substring(startIndex, 2), NumberStyles.AllowHexSpecifier), + byte.Parse(hex.Substring(startIndex + 2, 2), NumberStyles.AllowHexSpecifier), + byte.Parse(hex.Substring(startIndex + 4, 2), NumberStyles.AllowHexSpecifier), + 255); + } + else if (hex.Length == startIndex + 4) //#RGBA + { + color = new Color32(byte.Parse("" + hex[startIndex] + hex[startIndex], NumberStyles.AllowHexSpecifier), + byte.Parse("" + hex[startIndex + 1] + hex[startIndex + 1], NumberStyles.AllowHexSpecifier), + byte.Parse("" + hex[startIndex + 2] + hex[startIndex + 2], NumberStyles.AllowHexSpecifier), + byte.Parse("" + hex[startIndex + 3] + hex[startIndex + 3], NumberStyles.AllowHexSpecifier)); + } + else //#RGB + { + color = new Color32(byte.Parse("" + hex[startIndex] + hex[startIndex], NumberStyles.AllowHexSpecifier), + byte.Parse("" + hex[startIndex + 1] + hex[startIndex + 1], NumberStyles.AllowHexSpecifier), + byte.Parse("" + hex[startIndex + 2] + hex[startIndex + 2], NumberStyles.AllowHexSpecifier), + 255); + } + return true; + } + else + { + color = new Color32(); + return false; + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/HexColorField.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/HexColorField.cs.meta new file mode 100755 index 00000000..5fa9f8de --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/HexColorField.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d85c534b3c1560544b09d0996dfeba84 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/SVBoxSlider.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/SVBoxSlider.cs new file mode 100755 index 00000000..f51a7473 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/SVBoxSlider.cs @@ -0,0 +1,118 @@ +using UnityEngine; +using UnityEngine.UI; +using System.Collections; + +[RequireComponent(typeof(BoxSlider), typeof(RawImage)), ExecuteInEditMode()] +public class SVBoxSlider : MonoBehaviour +{ + public ColorPicker picker; + + private BoxSlider slider; + private RawImage image; + + private float lastH = -1; + private bool listen = true; + + public RectTransform rectTransform + { + get + { + return transform as RectTransform; + } + } + + private void Awake() + { + slider = GetComponent(); + image = GetComponent(); + + RegenerateSVTexture(); + } + + private void OnEnable() + { + if (Application.isPlaying && picker != null) + { + slider.onValueChanged.AddListener(SliderChanged); + picker.onHSVChanged.AddListener(HSVChanged); + } + } + + private void OnDisable() + { + if (picker != null) + { + slider.onValueChanged.RemoveListener(SliderChanged); + picker.onHSVChanged.RemoveListener(HSVChanged); + } + } + + private void OnDestroy() + { + if (image.texture != null) + DestroyImmediate(image.texture); + } + +#if UNITY_EDITOR + private void OnValidate() + { + image = GetComponent(); + RegenerateSVTexture(); + } +#endif + + private void SliderChanged(float saturation, float value) + { + if (listen) + { + picker.AssignColor(ColorValues.Saturation, saturation); + picker.AssignColor(ColorValues.Value, value); + } + listen = true; + } + + private void HSVChanged(float h, float s, float v) + { + if (lastH != h) + { + lastH = h; + RegenerateSVTexture(); + } + + if (s != slider.normalizedValue) + { + listen = false; + slider.normalizedValue = s; + } + + if (v != slider.normalizedValueY) + { + listen = false; + slider.normalizedValueY = v; + } + } + + private void RegenerateSVTexture() + { + double h = picker != null ? picker.H * 360 : 0; + + if (image.texture != null) + DestroyImmediate(image.texture); + + Texture2D texture = new Texture2D(100, 100); + texture.hideFlags = HideFlags.DontSave; + + for (int s = 0; s < 100; s++) + { + Color32[] colors = new Color32[100]; + for (int v = 0; v < 100; v++) + { + colors[v] = HSVUtil.ConvertHsvToRgb(h, (float)s / 100, (float)v / 100, 1); + } + texture.SetPixels32(s, 0, 1, 100, colors); + } + texture.Apply(); + + image.texture = texture; + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/SVBoxSlider.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/SVBoxSlider.cs.meta new file mode 100755 index 00000000..5b57beb3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UI/SVBoxSlider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1e4240873631f724496efec97d7151b3 +timeCreated: 1442650713 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts.meta new file mode 100755 index 00000000..87cb4f59 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2b33138f525222146865861432dbe845 +folderAsset: yes +timeCreated: 1426051345 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/BoxSlider.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/BoxSlider.cs new file mode 100755 index 00000000..31c53d74 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/BoxSlider.cs @@ -0,0 +1,448 @@ +using System; +using UnityEngine.Events; +using UnityEngine.EventSystems; + +namespace UnityEngine.UI +{ + [AddComponentMenu("UI/BoxSlider", 35)] + [RequireComponent(typeof(RectTransform))] + public class BoxSlider : Selectable, IDragHandler, IInitializePotentialDragHandler, ICanvasElement + { + public enum Direction + { + LeftToRight, + RightToLeft, + BottomToTop, + TopToBottom, + } + + [Serializable] + public class BoxSliderEvent : UnityEvent { } + + [SerializeField] + private RectTransform m_HandleRect; + public RectTransform handleRect { get { return m_HandleRect; } set { if (SetClass(ref m_HandleRect, value)) { UpdateCachedReferences(); UpdateVisuals(); } } } + + [Space(6)] + + [SerializeField] + private float m_MinValue = 0; + public float minValue { get { return m_MinValue; } set { if (SetStruct(ref m_MinValue, value)) { Set(m_Value); SetY (m_ValueY); UpdateVisuals(); } } } + + [SerializeField] + private float m_MaxValue = 1; + public float maxValue { get { return m_MaxValue; } set { if (SetStruct(ref m_MaxValue, value)) { Set(m_Value); SetY (m_ValueY); UpdateVisuals(); } } } + + [SerializeField] + private bool m_WholeNumbers = false; + public bool wholeNumbers { get { return m_WholeNumbers; } set { if (SetStruct(ref m_WholeNumbers, value)) { Set(m_Value); SetY (m_ValueY); UpdateVisuals(); } } } + + [SerializeField] + private float m_Value = 1f; + public float value + { + get + { + if (wholeNumbers) + return Mathf.Round(m_Value); + return m_Value; + } + set + { + Set(value); + } + } + + public float normalizedValue + { + get + { + if (Mathf.Approximately(minValue, maxValue)) + return 0; + return Mathf.InverseLerp(minValue, maxValue, value); + } + set + { + this.value = Mathf.Lerp(minValue, maxValue, value); + } + } + + [SerializeField] + private float m_ValueY = 1f; + public float valueY + { + get + { + if (wholeNumbers) + return Mathf.Round(m_ValueY); + return m_ValueY; + } + set + { + SetY(value); + } + } + + public float normalizedValueY + { + get + { + if (Mathf.Approximately(minValue, maxValue)) + return 0; + return Mathf.InverseLerp(minValue, maxValue, valueY); + } + set + { + this.valueY = Mathf.Lerp(minValue, maxValue, value); + } + } + + [Space(6)] + + // Allow for delegate-based subscriptions for faster events than 'eventReceiver', and allowing for multiple receivers. + [SerializeField] + private BoxSliderEvent m_OnValueChanged = new BoxSliderEvent(); + public BoxSliderEvent onValueChanged { get { return m_OnValueChanged; } set { m_OnValueChanged = value; } } + + // Private fields + + //private Image m_FillImage; + //private Transform m_FillTransform; + //private RectTransform m_FillContainerRect; + private Transform m_HandleTransform; + private RectTransform m_HandleContainerRect; + + // The offset from handle position to mouse down position + private Vector2 m_Offset = Vector2.zero; + + private DrivenRectTransformTracker m_Tracker; + + // Size of each step. + float stepSize { get { return wholeNumbers ? 1 : (maxValue - minValue) * 0.1f; } } + + protected BoxSlider() + { } + + #if UNITY_EDITOR + protected override void OnValidate() + { + base.OnValidate(); + + if (wholeNumbers) + { + m_MinValue = Mathf.Round(m_MinValue); + m_MaxValue = Mathf.Round(m_MaxValue); + } + //Onvalidate is called before OnEnabled. We need to make sure not to touch any other objects before OnEnable is run. + if (IsActive()) + { + UpdateCachedReferences(); + Set(m_Value, false); + SetY(m_ValueY, false); + // Update rects since other things might affect them even if value didn't change. + UpdateVisuals(); + } + + #if UNITY_2018_3_OR_NEWER + //handle new prefab API + var prefabType = UnityEditor.PrefabUtility.GetPrefabAssetType(this); + if (prefabType != UnityEditor.PrefabAssetType.Regular && !Application.isPlaying) + CanvasUpdateRegistry.RegisterCanvasElementForLayoutRebuild(this); + #else + var prefabType = UnityEditor.PrefabUtility.GetPrefabType(this); + if (prefabType != UnityEditor.PrefabType.Prefab && !Application.isPlaying) + CanvasUpdateRegistry.RegisterCanvasElementForLayoutRebuild(this); + #endif + } + + #endif // if UNITY_EDITOR + + public virtual void Rebuild(CanvasUpdate executing) + { + #if UNITY_EDITOR + if (executing == CanvasUpdate.Prelayout) + onValueChanged.Invoke(value, valueY); + #endif + } + + public void LayoutComplete() + { + + } + + public void GraphicUpdateComplete() + { + + } + + public static bool SetClass(ref T currentValue, T newValue) where T: class + { + if ((currentValue == null && newValue == null) || (currentValue != null && currentValue.Equals(newValue))) + return false; + + currentValue = newValue; + return true; + } + + public static bool SetStruct(ref T currentValue, T newValue) where T: struct + { + if (currentValue.Equals(newValue)) + return false; + + currentValue = newValue; + return true; + } + + protected override void OnEnable() + { + base.OnEnable(); + UpdateCachedReferences(); + Set(m_Value, false); + SetY(m_ValueY, false); + // Update rects since they need to be initialized correctly. + UpdateVisuals(); + } + + protected override void OnDisable() + { + m_Tracker.Clear(); + base.OnDisable(); + } + + void UpdateCachedReferences() + { + + if (m_HandleRect) + { + m_HandleTransform = m_HandleRect.transform; + if (m_HandleTransform.parent != null) + m_HandleContainerRect = m_HandleTransform.parent.GetComponent(); + } + else + { + m_HandleContainerRect = null; + } + } + + // Set the valueUpdate the visible Image. + void Set(float input) + { + Set(input, true); + } + + void Set(float input, bool sendCallback) + { + // Clamp the input + float newValue = Mathf.Clamp(input, minValue, maxValue); + if (wholeNumbers) + newValue = Mathf.Round(newValue); + + // If the stepped value doesn't match the last one, it's time to update + if (m_Value == newValue) + return; + + m_Value = newValue; + UpdateVisuals(); + if (sendCallback) + m_OnValueChanged.Invoke(newValue, valueY); + } + + void SetY(float input) + { + SetY(input, true); + } + + void SetY(float input, bool sendCallback) + { + // Clamp the input + float newValue = Mathf.Clamp(input, minValue, maxValue); + if (wholeNumbers) + newValue = Mathf.Round(newValue); + + // If the stepped value doesn't match the last one, it's time to update + if (m_ValueY == newValue) + return; + + m_ValueY = newValue; + UpdateVisuals(); + if (sendCallback) + m_OnValueChanged.Invoke(value, newValue); + } + + + protected override void OnRectTransformDimensionsChange() + { + base.OnRectTransformDimensionsChange(); + //This can be invoked before OnEnabled is called. So we shouldn't be accessing other objects, before OnEnable is called. + if (!IsActive()) + return; + UpdateVisuals(); + } + + enum Axis + { + Horizontal = 0, + Vertical = 1 + } + + + // Force-update the slider. Useful if you've changed the properties and want it to update visually. + private void UpdateVisuals() + { + #if UNITY_EDITOR + if (!Application.isPlaying) + UpdateCachedReferences(); + #endif + + m_Tracker.Clear(); + + + //to business! + if (m_HandleContainerRect != null) + { + m_Tracker.Add(this, m_HandleRect, DrivenTransformProperties.Anchors); + Vector2 anchorMin = Vector2.zero; + Vector2 anchorMax = Vector2.one; + anchorMin[0] = anchorMax[0] = (normalizedValue); + anchorMin[1] = anchorMax[1] = ( normalizedValueY); + + m_HandleRect.anchorMin = anchorMin; + m_HandleRect.anchorMax = anchorMax; + } + } + + // Update the slider's position based on the mouse. + void UpdateDrag(PointerEventData eventData, Camera cam) + { + RectTransform clickRect = m_HandleContainerRect; + if (clickRect != null && clickRect.rect.size[0] > 0) + { + Vector2 localCursor; + if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(clickRect, eventData.position, cam, out localCursor)) + return; + localCursor -= clickRect.rect.position; + + float val = Mathf.Clamp01((localCursor - m_Offset)[0] / clickRect.rect.size[0]); + normalizedValue = (val); + + float valY = Mathf.Clamp01((localCursor - m_Offset)[1] / clickRect.rect.size[1]); + normalizedValueY = ( valY); + + } + } + + private bool MayDrag(PointerEventData eventData) + { + return IsActive() && IsInteractable() && eventData.button == PointerEventData.InputButton.Left; + } + + public override void OnPointerDown(PointerEventData eventData) + { + if (!MayDrag(eventData)) + return; + + base.OnPointerDown(eventData); + + m_Offset = Vector2.zero; + if (m_HandleContainerRect != null && RectTransformUtility.RectangleContainsScreenPoint(m_HandleRect, eventData.position, eventData.enterEventCamera)) + { + Vector2 localMousePos; + if (RectTransformUtility.ScreenPointToLocalPointInRectangle(m_HandleRect, eventData.position, eventData.pressEventCamera, out localMousePos)) + m_Offset = localMousePos; + m_Offset.y = -m_Offset.y; + } + else + { + // Outside the slider handle - jump to this point instead + UpdateDrag(eventData, eventData.pressEventCamera); + } + } + + public virtual void OnDrag(PointerEventData eventData) + { + if (!MayDrag(eventData)) + return; + + UpdateDrag(eventData, eventData.pressEventCamera); + } + + //public override void OnMove(AxisEventData eventData) + //{ + // if (!IsActive() || !IsInteractable()) + // { + // base.OnMove(eventData); + // return; + // } + + // switch (eventData.moveDir) + // { + // case MoveDirection.Left: + // if (axis == Axis.Horizontal && FindSelectableOnLeft() == null) { + // Set(reverseValue ? value + stepSize : value - stepSize); + // SetY (reverseValue ? valueY + stepSize : valueY - stepSize); + // } + // else + // base.OnMove(eventData); + // break; + // case MoveDirection.Right: + // if (axis == Axis.Horizontal && FindSelectableOnRight() == null) { + // Set(reverseValue ? value - stepSize : value + stepSize); + // SetY(reverseValue ? valueY - stepSize : valueY + stepSize); + // } + // else + // base.OnMove(eventData); + // break; + // case MoveDirection.Up: + // if (axis == Axis.Vertical && FindSelectableOnUp() == null) { + // Set(reverseValue ? value - stepSize : value + stepSize); + // SetY(reverseValue ? valueY - stepSize : valueY + stepSize); + // } + // else + // base.OnMove(eventData); + // break; + // case MoveDirection.Down: + // if (axis == Axis.Vertical && FindSelectableOnDown() == null) { + // Set(reverseValue ? value + stepSize : value - stepSize); + // SetY(reverseValue ? valueY + stepSize : valueY - stepSize); + // } + // else + // base.OnMove(eventData); + // break; + // } + //} + + //public override Selectable FindSelectableOnLeft() + //{ + // if (navigation.mode == Navigation.Mode.Automatic && axis == Axis.Horizontal) + // return null; + // return base.FindSelectableOnLeft(); + //} + + //public override Selectable FindSelectableOnRight() + //{ + // if (navigation.mode == Navigation.Mode.Automatic && axis == Axis.Horizontal) + // return null; + // return base.FindSelectableOnRight(); + //} + + //public override Selectable FindSelectableOnUp() + //{ + // if (navigation.mode == Navigation.Mode.Automatic && axis == Axis.Vertical) + // return null; + // return base.FindSelectableOnUp(); + //} + + //public override Selectable FindSelectableOnDown() + //{ + // if (navigation.mode == Navigation.Mode.Automatic && axis == Axis.Vertical) + // return null; + // return base.FindSelectableOnDown(); + //} + + public virtual void OnInitializePotentialDrag(PointerEventData eventData) + { + eventData.useDragThreshold = false; + } + + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/BoxSlider.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/BoxSlider.cs.meta new file mode 100755 index 00000000..0c384ec6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/BoxSlider.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 37c44bc94a9a7f241b5b552f3ff89458 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/HSVUtil.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/HSVUtil.cs new file mode 100755 index 00000000..f131b57a --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/HSVUtil.cs @@ -0,0 +1,211 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + + + +#region ColorUtilities + +public static class HSVUtil +{ + + public static HsvColor ConvertRgbToHsv(Color color) + { + return ConvertRgbToHsv((int)(color.r * 255), (int)(color.g * 255), (int)(color.b * 255)); + } + + //Converts an RGB color to an HSV color. + public static HsvColor ConvertRgbToHsv(double r, double b, double g) + { + double delta, min; + double h = 0, s, v; + + min = Math.Min(Math.Min(r, g), b); + v = Math.Max(Math.Max(r, g), b); + delta = v - min; + + if (v == 0.0) + s = 0; + else + s = delta / v; + + if (s == 0) + h = 360; + else + { + if (r == v) + h = (g - b) / delta; + else if (g == v) + h = 2 + (b - r) / delta; + else if (b == v) + h = 4 + (r - g) / delta; + + h *= 60; + if (h <= 0.0) + h += 360; + } + + HsvColor hsvColor = new HsvColor(); + hsvColor.H = 360 - h; + hsvColor.S = s; + hsvColor.V = v / 255; + + return hsvColor; + + } + + // Converts an HSV color to an RGB color. + public static Color ConvertHsvToRgb(double h, double s, double v, float alpha) + { + + double r = 0, g = 0, b = 0; + + if (s == 0) + { + r = v; + g = v; + b = v; + } + + else + { + int i; + double f, p, q, t; + + + if (h == 360) + h = 0; + else + h = h / 60; + + i = (int)(h); + f = h - i; + + p = v * (1.0 - s); + q = v * (1.0 - (s * f)); + t = v * (1.0 - (s * (1.0f - f))); + + + switch (i) + { + case 0: + r = v; + g = t; + b = p; + break; + + case 1: + r = q; + g = v; + b = p; + break; + + case 2: + r = p; + g = v; + b = t; + break; + + case 3: + r = p; + g = q; + b = v; + break; + + case 4: + r = t; + g = p; + b = v; + break; + + default: + r = v; + g = p; + b = q; + break; + } + + } + + return new Color((float)r, (float)g, (float)b, alpha); + + } +} + + +#endregion ColorUtilities + + +// Describes a color in terms of +// Hue, Saturation, and Value (brightness) +#region HsvColor +public struct HsvColor +{ + /// + /// The Hue, ranges between 0 and 360 + /// + public double H; + + /// + /// The saturation, ranges between 0 and 1 + /// + public double S; + + // The value (brightness), ranges between 0 and 1 + public double V; + + public float normalizedH + { + get + { + return (float)H / 360f; + } + + set + { + H = (double)value * 360; + } + } + + public float normalizedS + { + get + { + return (float)S; + } + set + { + S = (double)value; + } + } + + public float normalizedV + { + get + { + return (float)V; + } + set + { + V = (double)value; + } + } + + public HsvColor(double h, double s, double v) + { + this.H = h; + this.S = s; + this.V = v; + } + + public override string ToString() + { + return "{" + H.ToString("f2") + "," + S.ToString("f2") + "," + V.ToString("f2") + "}"; + } +} +#endregion HsvColor + + + + diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/HSVUtil.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/HSVUtil.cs.meta new file mode 100755 index 00000000..f84f89a1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/HSVPicker/UtilityScripts/HSVUtil.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4f3189246d7fc204faba7a1e9c08e0af +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/ParticlePainter.cs b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/ParticlePainter.cs new file mode 100644 index 00000000..10cedfd4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/ParticlePainter.cs @@ -0,0 +1,88 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class ParticlePainter : MonoBehaviour { + public ParticleSystem painterParticlePrefab; + public float minDistanceThreshold; + public float maxDistanceThreshold; + private bool frameUpdated = false; + public float particleSize = .1f; + public float penDistance = 0.2f; + public ColorPicker colorPicker; + private ParticleSystem currentPS; + private ParticleSystem.Particle [] particles; + private Vector3 previousPosition = Vector3.zero; //camera starts from origin + private List currentPaintVertices; + private Color currentColor = Color.white; + private List paintSystems; + private int paintMode = 0; //0 = off, 1 = pick color, 2 = paint + + // Use this for initialization + void Start () { + UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; + currentPS = Instantiate (painterParticlePrefab); + currentPaintVertices = new List (); + paintSystems = new List (); + frameUpdated = false; + colorPicker.onValueChanged.AddListener( newColor => currentColor = newColor); + colorPicker.gameObject.SetActive (false); + } + + public void ARFrameUpdated(UnityARCamera camera) + { + Matrix4x4 matrix = new Matrix4x4(); + matrix.SetColumn(3, camera.worldTransform.column3); + + Vector3 currentPositon = UnityARMatrixOps.GetPosition(matrix) + (Camera.main.transform.forward * penDistance); + if (Vector3.Distance (currentPositon, previousPosition) > minDistanceThreshold) { + if (paintMode == 2) currentPaintVertices.Add (currentPositon); + frameUpdated = true; + previousPosition = currentPositon; + } + } + + void OnGUI() + { + string modeString = paintMode == 0 ? "OFF" : (paintMode == 1 ? "PICK" : "PAINT"); + if (GUI.Button(new Rect(Screen.width -100.0f, 0.0f, 100.0f, 50.0f), modeString)) + { + paintMode = (paintMode + 1) % 3; + colorPicker.gameObject.SetActive (paintMode == 1); + if (paintMode == 2) + RestartPainting (); + } + + } + + void RestartPainting() + { + paintSystems.Add (currentPS); + currentPS = Instantiate (painterParticlePrefab); + currentPaintVertices = new List (); + } + + // Update is called once per frame + void Update () { + if (frameUpdated && paintMode == 2) { + if ( currentPaintVertices.Count > 0) { + int numParticles = currentPaintVertices.Count; + ParticleSystem.Particle[] particles = new ParticleSystem.Particle[numParticles]; + int index = 0; + foreach (Vector3 currentPoint in currentPaintVertices) { + particles [index].position = currentPoint; + particles [index].startColor = currentColor; + particles [index].startSize = particleSize; + index++; + } + currentPS.SetParticles (particles, numParticles); + } else { + ParticleSystem.Particle[] particles = new ParticleSystem.Particle[1]; + particles [0].startSize = 0.0f; + currentPS.SetParticles (particles, 1); + } + frameUpdated = false; + } + } +} diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/ParticlePainter.cs.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/ParticlePainter.cs.meta new file mode 100644 index 00000000..3f1a04d3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/ParticlePainter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a3a20b380ef854b22b8541736614c00e +timeCreated: 1494016368 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/UnityParticlePainter.unity b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/UnityParticlePainter.unity new file mode 100644 index 00000000..447cd277 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/UnityParticlePainter.unity @@ -0,0 +1,1635 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 0} + m_AmbientEquatorColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientGroundColor: {r: 0.098908, g: 0.100485, b: 0.119403, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.4 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.9 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.13333333 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &7 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 9} + - component: {fileID: 10} + - component: {fileID: 12} + - component: {fileID: 13} + - component: {fileID: 11} + - component: {fileID: 8} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b58ecea7a196242dd879c814ac05084c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ClearMaterial: {fileID: 2100000, guid: f1d9352050a75486f878ab19fa578f16, type: 2} +--- !u!4 &9 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + 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: [] + m_Father: {fileID: 229804521} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &10 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19788063, g: 0.2953552, b: 0.44852942, a: 0.019608} + m_BackgroundMaterial: {fileID: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 30 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &11 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!92 &12 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!124 &13 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 7} + m_Enabled: 1 +--- !u!1 &16 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 20} + - component: {fileID: 29} + - component: {fileID: 17} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5587c957048494a2f96db36e0995449e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &20 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_LocalRotation: {x: -0.31668198, y: -0.33227497, z: 0.119525984, w: -0.8803519} + m_LocalPosition: {x: -2.359002, y: 2.21, z: -3.580904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &29 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 16} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.997495, b: 0.955224, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_FalloffTable: + m_Table[0]: 0 + m_Table[1]: 0 + m_Table[2]: 0 + m_Table[3]: 0 + m_Table[4]: 0 + m_Table[5]: 0 + m_Table[6]: 0 + m_Table[7]: 0 + m_Table[8]: 0 + m_Table[9]: 0 + m_Table[10]: 0 + m_Table[11]: 0 + m_Table[12]: 0 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &159264908 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 159264909} + - component: {fileID: 159264911} + - component: {fileID: 159264910} + m_Layer: 5 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &159264909 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 159264908} + 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: [] + m_Father: {fileID: 584460312} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &159264910 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 159264908} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &159264911 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 159264908} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!1 &209779403 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 209779405} + - component: {fileID: 209779404} + m_Layer: 0 + m_Name: ParticlePainter + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &209779404 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 209779403} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a3a20b380ef854b22b8541736614c00e, type: 3} + m_Name: + m_EditorClassIdentifier: + painterParticlePrefab: {fileID: 198095342896748244, guid: 200646a121c9c46f69245ca2c1b789ee, + type: 2} + minDistanceThreshold: 0.05 + maxDistanceThreshold: 1 + particleSize: 0.2 + penDistance: 0.2 + colorPicker: {fileID: 612194366} +--- !u!4 &209779405 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 209779403} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &229804520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 229804521} + m_Layer: 0 + m_Name: CameraParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &229804521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229804520} + 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: 9} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &584460308 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 584460312} + - component: {fileID: 584460311} + - component: {fileID: 584460310} + - component: {fileID: 584460309} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &584460309 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 584460308} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &584460310 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 584460308} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &584460311 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 584460308} + 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: 25 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &584460312 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 584460308} + 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_Children: + - {fileID: 612194365} + - {fileID: 159264909} + m_Father: {fileID: 0} + m_RootOrder: 4 + 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!224 &612194365 stripped +RectTransform: + m_PrefabParentObject: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1997614655} +--- !u!114 &612194366 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 11423364, guid: 916ee089a0d7b63419075f91e1c657ec, + type: 2} + m_PrefabInternal: {fileID: 1997614655} + m_Script: {fileID: 11500000, guid: 8262e4a8322117f4da079921eaa72834, type: 3} +--- !u!1 &1121666029 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1121666033} + - component: {fileID: 1121666030} + m_Layer: 0 + m_Name: ARCameraManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1121666030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 462d46d2423bb4f738d2497a397b1590, type: 3} + m_Name: + m_EditorClassIdentifier: + m_camera: {fileID: 10} +--- !u!4 &1121666033 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1121666029} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1997614655 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 584460312} + m_Modifications: + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22448498, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11461748, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11449214, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11436574, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11407662, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11469324, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11429486, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11489330, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11407460, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 11457780, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_Texture + value: + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22499384, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22497436, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: -185 + objectReference: {fileID: 0} + - target: {fileID: 22429276, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22471252, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22445236, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22469358, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22437272, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22432592, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22441130, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22402782, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22422416, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 395 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 740 + objectReference: {fileID: 0} + - target: {fileID: 22489920, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 782.5 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22405742, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22407456, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 395 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 740 + objectReference: {fileID: 0} + - target: {fileID: 22474838, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 782.5 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22404596, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22466750, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 395 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 740 + objectReference: {fileID: 0} + - target: {fileID: 22476772, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 782.5 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22483054, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22477690, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 395 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 740 + objectReference: {fileID: 0} + - target: {fileID: 22449292, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 782.5 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22431826, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22446644, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 395 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 740 + objectReference: {fileID: 0} + - target: {fileID: 22464540, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 782.5 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22467618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22493148, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 395 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 740 + objectReference: {fileID: 0} + - target: {fileID: 22471500, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 782.5 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22410532, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 12.5 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 22462776, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 395 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 740 + objectReference: {fileID: 0} + - target: {fileID: 22416876, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 782.5 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22409896, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 157272, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 202.5 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -25 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 395 + objectReference: {fileID: 0} + - target: {fileID: 22413792, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 602.5 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -25 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 385 + objectReference: {fileID: 0} + - target: {fileID: 22446600, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22449618, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -24 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22421016, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -40 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22463286, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -56.25 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22460246, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16.5 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -72.5 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22475684, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -88.5 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22478158, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -104.5 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22412396, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -120.75 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22422480, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16.5 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -137 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 800 + objectReference: {fileID: 0} + - target: {fileID: 22473052, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -10 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 18 + objectReference: {fileID: 0} + - target: {fileID: 22447314, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 18 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -10 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 22484834, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 18 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 51 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -10 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 22488338, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 18 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.x + value: 72 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_AnchoredPosition.y + value: -10 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.x + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 22487740, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + propertyPath: m_SizeDelta.y + value: 18 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 916ee089a0d7b63419075f91e1c657ec, type: 2} + m_IsPrefabParent: 0 diff --git a/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/UnityParticlePainter.unity.meta b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/UnityParticlePainter.unity.meta new file mode 100644 index 00000000..f0846e71 --- /dev/null +++ b/Assets/UnityARKitPlugin/Examples/UnityParticlePainter/UnityParticlePainter.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0327f0aa0142146c291df8203b848257 +timeCreated: 1494021616 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins.meta b/Assets/UnityARKitPlugin/Plugins.meta new file mode 100644 index 00000000..a919bb36 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 05a89afb32ff4cd48a0278f931aa903b diff --git a/Assets/UnityARKitPlugin/Plugins/iOS.meta b/Assets/UnityARKitPlugin/Plugins/iOS.meta new file mode 100644 index 00000000..c567747f --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 20ca1a77fe0cf4e049dac6d2a8afd62e +folderAsset: yes +timeCreated: 1492036260 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit.meta new file mode 100644 index 00000000..5253052c --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b8fd2eea89786441a84b5c25c1d48982 +folderAsset: yes +timeCreated: 1492103332 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImage.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImage.cs new file mode 100644 index 00000000..ae371f65 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImage.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[CreateAssetMenu(fileName = "ARReferenceImage" , menuName = "UnityARKitPlugin/ARReferenceImage", order = 2)] +public class ARReferenceImage : ScriptableObject { + + public string imageName; + public Texture2D imageTexture; + public float physicalSize; + +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImage.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImage.cs.meta new file mode 100644 index 00000000..e2d38fb9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImage.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0414577f9c6b244e696949154859a4af +timeCreated: 1517880235 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImagesSet.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImagesSet.cs new file mode 100644 index 00000000..11a01f67 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImagesSet.cs @@ -0,0 +1,11 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[CreateAssetMenu(fileName = "ARReferenceImagesSet" , menuName = "UnityARKitPlugin/ARReferenceImagesSet", order = 3)] +public class ARReferenceImagesSet : ScriptableObject { + + public string resourceGroupName; + public ARReferenceImage [] referenceImages; + +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImagesSet.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImagesSet.cs.meta new file mode 100644 index 00000000..078d4dba --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceImagesSet.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1c37f7746917f4760aa00e7ff7fd81dc +timeCreated: 1518054368 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectAsset.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectAsset.cs new file mode 100644 index 00000000..84676d6b --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectAsset.cs @@ -0,0 +1,11 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +[CreateAssetMenu(fileName = "ARReferenceObjectAsset" , menuName = "UnityARKitPlugin/ARReferenceObjectAsset", order = 4)] +public class ARReferenceObjectAsset : ScriptableObject { + public string objectName; + public Object referenceObject; + +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectAsset.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectAsset.cs.meta new file mode 100644 index 00000000..34f0270e --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectAsset.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: ea5fe5050450e46b696fbcff74cf3370 +timeCreated: 1523901725 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectsSetAsset.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectsSetAsset.cs new file mode 100644 index 00000000..52aa2af6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectsSetAsset.cs @@ -0,0 +1,41 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; +using System.IO; + +[CreateAssetMenu(fileName = "ARReferenceObjectsSetAsset" , menuName = "UnityARKitPlugin/ARReferenceObjectsSetAsset", order = 4)] +public class ARReferenceObjectsSetAsset : ScriptableObject { + + public string resourceGroupName; + public ARReferenceObjectAsset [] referenceObjectAssets; + + public List LoadReferenceObjectsInSet() + { + List listRefObjects = new List (); + + if (UnityARSessionNativeInterface.IsARKit_2_0_Supported() == false) + { + return listRefObjects; + } + + string folderPath = Application.streamingAssetsPath + "/ARReferenceObjects/" + resourceGroupName + ".arresourcegroup"; + string contentsJsonPath = Path.Combine(folderPath, "Contents.json"); + + ARResourceGroupContents resGroupContents = JsonUtility.FromJson(File.ReadAllText (contentsJsonPath)); + + foreach (ARResourceGroupResource arrgr in resGroupContents.resources) + { + string objectFolderPath = Path.Combine(folderPath, arrgr.filename); + string objJsonPath = Path.Combine (objectFolderPath, "Contents.json"); + ARReferenceObjectResourceContents resourceContents = JsonUtility.FromJson (File.ReadAllText (objJsonPath)); + string fileToLoad = Path.Combine (objectFolderPath, resourceContents.objects [0].filename); + ARReferenceObject arro = ARReferenceObject.Load(fileToLoad); + arro.name = resourceContents.referenceObjectName; + listRefObjects.Add (arro); + } + + return listRefObjects; + } + +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectsSetAsset.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectsSetAsset.cs.meta new file mode 100644 index 00000000..5dc31ae4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARReferenceObjectsSetAsset.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: a5fac0b2c4da9499891f5a2e62563e15 +timeCreated: 1523901725 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARResourcesJSON.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARResourcesJSON.cs new file mode 100644 index 00000000..24713196 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARResourcesJSON.cs @@ -0,0 +1,63 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; + +namespace UnityEngine.XR.iOS +{ + [Serializable] + public class ARResourceGroupInfo + { + public int version; + public string author; + } + + [Serializable] + public class ARResourceGroupResource + { + public string filename; + } + + [Serializable] + public class ARResourceGroupContents + { + public ARResourceGroupInfo info; + public ARResourceGroupResource [] resources; + } + + [Serializable] + public class ARResourceInfo + { + public int version; + public string author; + } + + [Serializable] + public class ARResourceProperties + { + public float width; + } + + [Serializable] + public class ARResourceFilename + { + public string idiom; + public string filename; + } + + [Serializable] + public class ARResourceContents + { + public ARResourceFilename [] images; + public ARResourceInfo info; + public ARResourceProperties properties; + } + + [Serializable] + public class ARReferenceObjectResourceContents + { + public ARResourceFilename[] objects; + public ARResourceInfo info; + public string referenceObjectName; + } +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARResourcesJSON.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARResourcesJSON.cs.meta new file mode 100644 index 00000000..eb6ed218 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/ARResourcesJSON.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c96ff67f78bac414e844358bb0f999fb +timeCreated: 1518029034 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor.meta new file mode 100644 index 00000000..b4efc4e6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 085eeda524261654b88f97ea61b33090 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs new file mode 100644 index 00000000..e9f41fa0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs @@ -0,0 +1,380 @@ +using UnityEngine; +using UnityEditor; +using UnityEditor.Callbacks; +#if UNITY_IOS +using UnityEditor.iOS.Xcode; +#endif +using UnityEngine.XR.iOS; +using System.IO; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using System; + + +public class UnityARBuildPostprocessor +{ + static List imageSets = new List(); + static List objectSets = new List(); + // Build postprocessor. Currently only needed on: + // - iOS: no dynamic libraries, so plugin source files have to be copied into Xcode project + [PostProcessBuild] + public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) + { + if (target == BuildTarget.iOS) + OnPostprocessBuildIOS(pathToBuiltProject); + } + + [PostProcessScene] + public static void OnPostProcessScene() + { + if (!BuildPipeline.isBuildingPlayer) + return; + + foreach (ARReferenceImagesSet ar in UnityEngine.Resources.FindObjectsOfTypeAll()) + { + if (!imageSets.Contains(ar)) + { + imageSets.Add(ar); + } + } + + foreach (ARReferenceObjectsSetAsset ar in UnityEngine.Resources.FindObjectsOfTypeAll()) + { + if (!objectSets.Contains(ar)) + { + objectSets.Add(ar); + } + } + + } + + private static UnityARKitPluginSettings LoadSettings() + { + UnityARKitPluginSettings loadedSettings = Resources.Load("UnityARKitPlugin/ARKitSettings"); + if (loadedSettings == null) + { + loadedSettings = ScriptableObject.CreateInstance(); + } + return loadedSettings; + } + + // Replaces the first C++ macro with the given name in the source file. Only changes + // single-line macro declarations, if multi-line macro declaration is detected, the + // function returns without changing it. Macro name must be a valid C++ identifier. + internal static bool ReplaceCppMacro(string[] lines, string name, string newValue) + { + bool replaced = false; + Regex matchRegex = new Regex(@"^.*#\s*define\s+" + name); + Regex replaceRegex = new Regex(@"^.*#\s*define\s+" + name + @"(:?|\s|\s.*[^\\])$"); + for (int i = 0; i < lines.Count(); i++) + { + if (matchRegex.Match(lines[i]).Success) + { + lines[i] = replaceRegex.Replace(lines[i], "#define " + name + " " + newValue); + replaced = true; + } + } + return replaced; + } + + internal static void AddOrReplaceCppMacro(ref string[] lines, string name, string newValue) + { + if (ReplaceCppMacro(lines, name, newValue) == false) + { + Array.Resize(ref lines, lines.Length + 1); + lines[lines.Length - 1] = "#define " + name + " " + newValue; + } + } + + static void UpdateDefinesInFile(string file, Dictionary valuesToUpdate) + { + string[] src = File.ReadAllLines(file); + var copy = (string[])src.Clone(); + + foreach (var kvp in valuesToUpdate) + AddOrReplaceCppMacro(ref copy, kvp.Key, kvp.Value ? "1" : "0"); + + if (!copy.SequenceEqual(src)) + File.WriteAllLines(file, copy); + } + +#if UNITY_IOS + static void AddReferenceImageToResourceGroup(ARReferenceImage arri, string parentFolderFullPath, string projectRelativePath, PBXProject project) + { + + ARResourceContents resourceContents = new ARResourceContents (); + resourceContents.info = new ARResourceInfo (); + resourceContents.info.author = "unity"; + resourceContents.info.version = 1; + + resourceContents.images = new ARResourceFilename[1]; + resourceContents.images [0] = new ARResourceFilename (); + resourceContents.images [0].idiom = "universal"; + + resourceContents.properties = new ARResourceProperties (); + resourceContents.properties.width = arri.physicalSize; + + //add folder for reference image + string folderToCreate = arri.imageName + ".arreferenceimage"; + string folderFullPath = Path.Combine (parentFolderFullPath, folderToCreate); + string projectRelativeFolder = Path.Combine (projectRelativePath, folderToCreate); + Directory.CreateDirectory (folderFullPath); + project.AddFolderReference (folderFullPath, projectRelativeFolder); + + //copy file from texture asset + string imagePath = AssetDatabase.GetAssetPath(arri.imageTexture); + string imageFilename = Path.GetFileName (imagePath); + var dstPath = Path.Combine(folderFullPath, imageFilename); + File.Copy(imagePath, dstPath, true); + project.AddFile (dstPath, Path.Combine (projectRelativeFolder, imageFilename)); + resourceContents.images [0].filename = imageFilename; + + //add contents.json file + string contentsJsonPath = Path.Combine(folderFullPath, "Contents.json"); + File.WriteAllText (contentsJsonPath, JsonUtility.ToJson (resourceContents, true)); + project.AddFile (contentsJsonPath, Path.Combine (projectRelativeFolder, "Contents.json")); + + } + + static void AddReferenceImagesSetToAssetCatalog(ARReferenceImagesSet aris, string pathToBuiltProject, PBXProject project) + { + List processedImages = new List (); + ARResourceGroupContents groupContents = new ARResourceGroupContents(); + groupContents.info = new ARResourceGroupInfo (); + groupContents.info.author = "unity"; + groupContents.info.version = 1; + string folderToCreate = "Unity-iPhone/Images.xcassets/" + aris.resourceGroupName + ".arresourcegroup"; + string folderFullPath = Path.Combine (pathToBuiltProject, folderToCreate); + Directory.CreateDirectory (folderFullPath); + project.AddFolderReference (folderFullPath, folderToCreate); + foreach (ARReferenceImage arri in aris.referenceImages) { + if (!processedImages.Contains (arri)) { + processedImages.Add (arri); //get rid of dupes + AddReferenceImageToResourceGroup(arri, folderFullPath, folderToCreate, project); + } + } + + groupContents.resources = new ARResourceGroupResource[processedImages.Count]; + int index = 0; + foreach (ARReferenceImage arri in processedImages) { + groupContents.resources [index] = new ARResourceGroupResource (); + groupContents.resources [index].filename = arri.imageName + ".arreferenceimage"; + index++; + } + string contentsJsonPath = Path.Combine(folderFullPath, "Contents.json"); + File.WriteAllText (contentsJsonPath, JsonUtility.ToJson (groupContents, true)); + project.AddFile (contentsJsonPath, Path.Combine (folderToCreate, "Contents.json")); + } + + static void AddReferenceObjectAssetToStreamingAssets(ARReferenceObjectAsset arro, string parentFolderFullPath, string projectRelativePath) + { + + ARReferenceObjectResourceContents resourceContents = new ARReferenceObjectResourceContents (); + resourceContents.info = new ARResourceInfo (); + resourceContents.info.author = "unity"; + resourceContents.info.version = 1; + + resourceContents.objects = new ARResourceFilename[1]; + resourceContents.objects [0] = new ARResourceFilename (); + resourceContents.objects [0].idiom = "universal"; + + resourceContents.referenceObjectName = arro.objectName; + + //add folder for reference image + string folderToCreate = arro.objectName + ".arreferenceobject"; + string folderFullPath = Path.Combine (parentFolderFullPath, folderToCreate); + string projectRelativeFolder = Path.Combine (projectRelativePath, folderToCreate); + Directory.CreateDirectory (folderFullPath); + + //copy file from refobject asset + string objectPath = AssetDatabase.GetAssetPath(arro.referenceObject); + string objectFilename = Path.GetFileName (objectPath); + var dstPath = Path.Combine(folderFullPath, objectFilename); + File.Copy(objectPath, dstPath, true); + resourceContents.objects [0].filename = objectFilename; + + //add contents.json file + string contentsJsonPath = Path.Combine(folderFullPath, "Contents.json"); + File.WriteAllText (contentsJsonPath, JsonUtility.ToJson (resourceContents, true)); + } + + static void AddReferenceObjectsSetAssetToStreamingAssets(ARReferenceObjectsSetAsset aros, string pathToBuiltProject) + { + List processedObjects = new List (); + ARResourceGroupContents groupContents = new ARResourceGroupContents(); + groupContents.info = new ARResourceGroupInfo (); + groupContents.info.author = "xcode"; + groupContents.info.version = 1; + //On iOS, StreamingAssets end up at /Data/Raw + string folderToCreate = "Data/Raw/ARReferenceObjects/" + aros.resourceGroupName + ".arresourcegroup"; + string folderFullPath = Path.Combine (pathToBuiltProject, folderToCreate); + Directory.CreateDirectory (folderFullPath); + foreach (ARReferenceObjectAsset arro in aros.referenceObjectAssets) { + if (!processedObjects.Contains (arro)) { + processedObjects.Add (arro); //get rid of dupes + AddReferenceObjectAssetToStreamingAssets(arro, folderFullPath, folderToCreate); + } + } + + groupContents.resources = new ARResourceGroupResource[processedObjects.Count]; + int index = 0; + foreach (ARReferenceObjectAsset arro in processedObjects) { + groupContents.resources [index] = new ARResourceGroupResource (); + groupContents.resources [index].filename = arro.objectName + ".arreferenceobject"; + index++; + } + string contentsJsonPath = Path.Combine(folderFullPath, "Contents.json"); + File.WriteAllText (contentsJsonPath, JsonUtility.ToJson (groupContents, true)); + } + + + #if ARREFERENCEOBJECT_XCODE_ASSET_CATALOG + static void AddReferenceObjectAssetToResourceGroup(ARReferenceObjectAsset arro, string parentFolderFullPath, string projectRelativePath, PBXProject project) + { + + ARReferenceObjectResourceContents resourceContents = new ARReferenceObjectResourceContents (); + resourceContents.info = new ARResourceInfo (); + resourceContents.info.author = "unity"; + resourceContents.info.version = 1; + + resourceContents.objects = new ARResourceFilename[1]; + resourceContents.objects [0] = new ARResourceFilename (); + resourceContents.objects [0].idiom = "universal"; + + //add folder for reference image + string folderToCreate = arro.objectName + ".arreferenceobject"; + string folderFullPath = Path.Combine (parentFolderFullPath, folderToCreate); + string projectRelativeFolder = Path.Combine (projectRelativePath, folderToCreate); + Directory.CreateDirectory (folderFullPath); + project.AddFolderReference (folderFullPath, projectRelativeFolder); + + //copy file from texture asset + string objectPath = AssetDatabase.GetAssetPath(arro.referenceObject); + string objectFilename = Path.GetFileName (objectPath); + var dstPath = Path.Combine(folderFullPath, objectFilename); + File.Copy(objectPath, dstPath, true); + project.AddFile (dstPath, Path.Combine (projectRelativeFolder, objectFilename)); + resourceContents.objects [0].filename = objectFilename; + + //add contents.json file + string contentsJsonPath = Path.Combine(folderFullPath, "Contents.json"); + File.WriteAllText (contentsJsonPath, JsonUtility.ToJson (resourceContents, true)); + project.AddFile (contentsJsonPath, Path.Combine (projectRelativeFolder, "Contents.json")); + + } + + static void AddReferenceObjectsSetAssetToAssetCatalog(ARReferenceObjectsSetAsset aros, string pathToBuiltProject, PBXProject project) + { + List processedObjects = new List (); + ARResourceGroupContents groupContents = new ARResourceGroupContents(); + groupContents.info = new ARResourceGroupInfo (); + groupContents.info.author = "xcode"; + groupContents.info.version = 1; + string folderToCreate = "Unity-iPhone/Images.xcassets/" + aros.resourceGroupName + ".arresourcegroup"; + string folderFullPath = Path.Combine (pathToBuiltProject, folderToCreate); + Directory.CreateDirectory (folderFullPath); + project.AddFolderReference (folderFullPath, folderToCreate); + foreach (ARReferenceObjectAsset arro in aros.referenceObjectAssets) { + if (!processedObjects.Contains (arro)) { + processedObjects.Add (arro); //get rid of dupes + AddReferenceObjectAssetToResourceGroup(arro, folderFullPath, folderToCreate, project); + } + } + + groupContents.resources = new ARResourceGroupResource[processedObjects.Count]; + int index = 0; + foreach (ARReferenceObjectAsset arro in processedObjects) { + groupContents.resources [index] = new ARResourceGroupResource (); + groupContents.resources [index].filename = arro.objectName + ".arreferenceobject"; + index++; + } + string contentsJsonPath = Path.Combine(folderFullPath, "Contents.json"); + File.WriteAllText (contentsJsonPath, JsonUtility.ToJson (groupContents, true)); + project.AddFile (contentsJsonPath, Path.Combine (folderToCreate, "Contents.json")); + } + #endif //ARREFERENCEOBJECT_XCODE_ASSET_CATALOG + +#endif //UNITY_IOS + + private static void OnPostprocessBuildIOS(string pathToBuiltProject) + { + // We use UnityEditor.iOS.Xcode API which only exists in iOS editor module +#if UNITY_IOS + string projPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj"; + + UnityEditor.iOS.Xcode.PBXProject proj = new UnityEditor.iOS.Xcode.PBXProject(); + proj.ReadFromString(File.ReadAllText(projPath)); + proj.AddFrameworkToProject(proj.TargetGuidByName("Unity-iPhone"), "ARKit.framework", false); + string target = proj.TargetGuidByName("Unity-iPhone"); + Directory.CreateDirectory(Path.Combine(pathToBuiltProject, "Libraries/Unity")); + + // Check UnityARKitPluginSettings + UnityARKitPluginSettings ps = LoadSettings(); + string plistPath = Path.Combine(pathToBuiltProject, "Info.plist"); + PlistDocument plist = new PlistDocument(); + plist.ReadFromString(File.ReadAllText(plistPath)); + PlistElementDict rootDict = plist.root; + + // Get or create array to manage device capabilities + const string capsKey = "UIRequiredDeviceCapabilities"; + PlistElementArray capsArray; + PlistElement pel; + if (rootDict.values.TryGetValue(capsKey, out pel)) { + capsArray = pel.AsArray(); + } + else { + capsArray = rootDict.CreateArray(capsKey); + } + // Remove any existing "arkit" plist entries + const string arkitStr = "arkit"; + capsArray.values.RemoveAll(x => arkitStr.Equals(x.AsString())); + if (ps.AppRequiresARKit) { + // Add "arkit" plist entry + capsArray.AddString(arkitStr); + } + + const string shareString = "UIFileSharingEnabled"; + rootDict.SetBoolean(shareString, true); + + File.WriteAllText(plistPath, plist.WriteToString()); + + foreach(ARReferenceImagesSet ar in imageSets) + { + AddReferenceImagesSetToAssetCatalog(ar, pathToBuiltProject, proj); + } + + foreach(ARReferenceObjectsSetAsset objSet in objectSets) + { + AddReferenceObjectsSetAssetToStreamingAssets(objSet, pathToBuiltProject); + } + + //TODO: remove this when XCode actool is able to handles ARResources despite deployment target + if (imageSets.Count > 0) + { + proj.SetBuildProperty(target, "IPHONEOS_DEPLOYMENT_TARGET", "11.3"); + } + + // Add or replace define for facetracking + UpdateDefinesInFile(pathToBuiltProject + "/Classes/Preprocessor.h", new Dictionary() { + { "ARKIT_USES_FACETRACKING", ps.m_ARKitUsesFacetracking } + }); + + string[] filesToCopy = new string[] + { + + }; + + for(int i = 0 ; i < filesToCopy.Length ; ++i) + { + var srcPath = Path.Combine("../PluginSource/source", filesToCopy[i]); + var dstLocalPath = "Libraries/" + filesToCopy[i]; + var dstPath = Path.Combine(pathToBuiltProject, dstLocalPath); + File.Copy(srcPath, dstPath, true); + proj.AddFileToBuild(target, proj.AddFile(dstLocalPath, dstLocalPath)); + } + + File.WriteAllText(projPath, proj.WriteToString()); +#endif // #if UNITY_IOS + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs.meta new file mode 100644 index 00000000..19bb10b7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a56f8b807c15f4cf3a44275a5e5f89f3 +timeCreated: 1492795428 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers.meta new file mode 100644 index 00000000..ebbfde22 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1e4b720fdfe6441c280f3288bdb93c0d +folderAsset: yes +timeCreated: 1503626042 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/AR3DOFCameraManager.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/AR3DOFCameraManager.cs new file mode 100644 index 00000000..9c93caf1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/AR3DOFCameraManager.cs @@ -0,0 +1,74 @@ + +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class AR3DOFCameraManager : MonoBehaviour { + + public Camera m_camera; + private UnityARSessionNativeInterface m_session; + private Material savedClearMaterial; + + // Use this for initialization + void Start () { +#if !UNITY_EDITOR + Application.targetFrameRate = 60; + m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + ARKitSessionConfiguration config = new ARKitSessionConfiguration(); + config.alignment = UnityARAlignment.UnityARAlignmentGravity; + config.getPointCloudData = true; + config.enableLightEstimation = true; + m_session.RunWithConfig(config); + + if (m_camera == null) { + m_camera = Camera.main; + } +#endif + } + + public void SetCamera(Camera newCamera) + { + if (m_camera != null) { + UnityARVideo oldARVideo = m_camera.gameObject.GetComponent (); + if (oldARVideo != null) { + savedClearMaterial = oldARVideo.m_ClearMaterial; + Destroy (oldARVideo); + } + } + SetupNewCamera (newCamera); + } + + private void SetupNewCamera(Camera newCamera) + { + m_camera = newCamera; + + if (m_camera != null) { + UnityARVideo unityARVideo = m_camera.gameObject.GetComponent (); + if (unityARVideo != null) { + savedClearMaterial = unityARVideo.m_ClearMaterial; + Destroy (unityARVideo); + } + unityARVideo = m_camera.gameObject.AddComponent (); + unityARVideo.m_ClearMaterial = savedClearMaterial; + } + } + + // Update is called once per frame + +#if !UNITY_EDITOR + void Update () { + + if (m_camera != null) + { + // JUST WORKS! + Matrix4x4 matrix = m_session.GetCameraPose(); + m_camera.transform.localPosition = UnityARMatrixOps.GetPosition(matrix); + m_camera.transform.localRotation = UnityARMatrixOps.GetRotation (matrix); + m_camera.projectionMatrix = m_session.GetCameraProjection (); + } + + } +#endif + +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/AR3DOFCameraManager.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/AR3DOFCameraManager.cs.meta new file mode 100644 index 00000000..ec8ad352 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/AR3DOFCameraManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0ff614c6973544218b2c1e3036b8de0a +timeCreated: 1494626284 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARKitPlaneMeshRender.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARKitPlaneMeshRender.cs new file mode 100644 index 00000000..df3277e4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARKitPlaneMeshRender.cs @@ -0,0 +1,76 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class ARKitPlaneMeshRender : MonoBehaviour { + + [SerializeField] + private MeshFilter meshFilter; + [SerializeField] + private LineRenderer lineRenderer; + private Mesh planeMesh; + + public void InitiliazeMesh(ARPlaneAnchor arPlaneAnchor) + { + planeMesh = new Mesh (); + UpdateMesh (arPlaneAnchor); + meshFilter.mesh = planeMesh; + + } + + public void UpdateMesh(ARPlaneAnchor arPlaneAnchor) + { + if (UnityARSessionNativeInterface.IsARKit_1_5_Supported()) //otherwise we cannot access planeGeometry + { + if (arPlaneAnchor.planeGeometry.vertices.Length != planeMesh.vertices.Length || + arPlaneAnchor.planeGeometry.textureCoordinates.Length != planeMesh.uv.Length || + arPlaneAnchor.planeGeometry.triangleIndices.Length != planeMesh.triangles.Length) + { + planeMesh.Clear(); + } + + planeMesh.vertices = arPlaneAnchor.planeGeometry.vertices; + planeMesh.uv = arPlaneAnchor.planeGeometry.textureCoordinates; + planeMesh.triangles = arPlaneAnchor.planeGeometry.triangleIndices; + + lineRenderer.positionCount = arPlaneAnchor.planeGeometry.boundaryVertexCount; + lineRenderer.SetPositions(arPlaneAnchor.planeGeometry.boundaryVertices); + + // Assign the mesh object and update it. + planeMesh.RecalculateBounds(); + planeMesh.RecalculateNormals(); + } + + } + + void PrintOutMesh() + { + string outputMessage = "\n"; + outputMessage += "Vertices = " + planeMesh.vertices.GetLength (0); + outputMessage += "\nVertices = ["; + foreach (Vector3 v in planeMesh.vertices) { + outputMessage += v.ToString (); + outputMessage += ","; + } + outputMessage += "]\n Triangles = " + planeMesh.triangles.GetLength (0); + outputMessage += "\n Triangles = ["; + foreach (int i in planeMesh.triangles) { + outputMessage += i; + outputMessage += ","; + } + outputMessage += "]\n"; + Debug.Log (outputMessage); + + } + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARKitPlaneMeshRender.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARKitPlaneMeshRender.cs.meta new file mode 100644 index 00000000..2f4431d6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARKitPlaneMeshRender.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e8e41ddf2dd3348c18a8734d14dbb2ba +timeCreated: 1517429452 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARPlaneAnchorGameObject.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARPlaneAnchorGameObject.cs new file mode 100644 index 00000000..3aee8d60 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARPlaneAnchorGameObject.cs @@ -0,0 +1,11 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public class ARPlaneAnchorGameObject + { + public GameObject gameObject; + public ARPlaneAnchor planeAnchor; + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARPlaneAnchorGameObject.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARPlaneAnchorGameObject.cs.meta new file mode 100644 index 00000000..26a06e47 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/ARPlaneAnchorGameObject.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6a07258b16ace4bf1a395aa0a80f2135 +timeCreated: 1493059957 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/DontDestroyOnLoad.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/DontDestroyOnLoad.cs new file mode 100644 index 00000000..40741387 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/DontDestroyOnLoad.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class DontDestroyOnLoad : MonoBehaviour { + + // Use this for initialization + void Start () { + DontDestroyOnLoad (gameObject); + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/DontDestroyOnLoad.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/DontDestroyOnLoad.cs.meta new file mode 100644 index 00000000..b6401748 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/DontDestroyOnLoad.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 562a9fe49bfc2418099790a804f22711 +timeCreated: 1493408595 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/LinkedListDictionary.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/LinkedListDictionary.cs new file mode 100644 index 00000000..1d394261 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/LinkedListDictionary.cs @@ -0,0 +1,114 @@ +using System.Collections; +using System.Collections.Generic; + +namespace Collections.Hybrid.Generic +{ + /// + /// LinkedList/Dictionary combo for constant time add/remove/contains. Memory usage is higher as expected. + /// -kazoo + /// + /// key value type. It is recomended that this be "int", for speed purposes. + /// The value type. Can be anything you like. + public class LinkedListDictionary + { + private readonly Dictionary dictionary = new Dictionary(); + private readonly LinkedList list = new LinkedList(); + + /// + /// Get The count. + /// + /// + public int Count + { + get { return list.Count; } + } + + /// + /// Is the key in the dictionary? + /// + /// key + /// true if key is present, false otherwise. + public bool ContainsKey(TK k) + { + return dictionary.ContainsKey(k); + } + + /// + /// Remove a key/value from the dictionary if present. + /// + /// key + /// True if removal worked. False if removal is not possible. + public bool Remove(TK k) + { + if (!ContainsKey(k)) + { + return false; + } + + LLEntry entry = dictionary[k]; + list.Remove(entry.vNode); + return dictionary.Remove(k); + } + + /// + /// Add an item. Replacement is allowed. + /// + /// key + /// value + public void Add(TK k, TV v) + { + Remove(k); + dictionary[k] = new LLEntry(v, list.AddLast(v)); + } + + /// + /// Retrieve an element by key. + /// + /// key + /// Value. If element is not present, default(V) will be returned. + public TV GetValue(TK k) + { + if (ContainsKey(k)) + { + return dictionary[k].v; + } + return default(TV); + } + + public TV this[TK k] + { + get { return GetValue(k); } + set { Add(k, value); } + } + + /// + /// Raw list of Values for garbage-free iteration. Do not modify. + /// + /// The values + public LinkedList Values + { + get + { + return list; + } + } + + public void Clear() + { + dictionary.Clear(); + list.Clear(); + } + + private struct LLEntry + { + public readonly TV v; + public readonly LinkedListNode vNode; + + public LLEntry(TV v, LinkedListNode vNode) + { + this.v = v; + this.vNode = vNode; + } + } + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/LinkedListDictionary.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/LinkedListDictionary.cs.meta new file mode 100644 index 00000000..6ac8386c --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/LinkedListDictionary.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 356fa3989471245169edcc5abb89e6d7 +timeCreated: 1502403391 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/PointCloudParticleExample.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/PointCloudParticleExample.cs new file mode 100644 index 00000000..21d27033 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/PointCloudParticleExample.cs @@ -0,0 +1,61 @@ +using UnityEngine; +using UnityEngine.XR.iOS; + +public class PointCloudParticleExample : MonoBehaviour +{ + public ParticleSystem pointCloudParticlePrefab; + public int maxPointsToShow; + public float particleSize = 1.0f; + Vector3[] m_PointCloudData; + bool frameUpdated = false; + ParticleSystem currentPS; + ParticleSystem.Particle [] particles; + + // Use this for initialization + void Start () + { + UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; + currentPS = Instantiate (pointCloudParticlePrefab); + m_PointCloudData = null; + frameUpdated = false; + } + + public void ARFrameUpdated(UnityARCamera camera) + { + if (camera.pointCloud != null) + { + m_PointCloudData = camera.pointCloud.Points; + } + frameUpdated = true; + } + + // Update is called once per frame + void Update () + { + if (frameUpdated) + { + if (m_PointCloudData != null && m_PointCloudData.Length > 0 && maxPointsToShow > 0) + { + int numParticles = Mathf.Min (m_PointCloudData.Length, maxPointsToShow); + ParticleSystem.Particle[] particles = new ParticleSystem.Particle[numParticles]; + int index = 0; + foreach (Vector3 currentPoint in m_PointCloudData) + { + particles [index].position = currentPoint; + particles [index].startColor = new Color (1.0f, 1.0f, 1.0f); + particles [index].startSize = particleSize; + index++; + if (index >= numParticles) break; + } + currentPS.SetParticles (particles, numParticles); + } + else + { + ParticleSystem.Particle[] particles = new ParticleSystem.Particle[1]; + particles [0].startSize = 0.0f; + currentPS.SetParticles (particles, 1); + } + frameUpdated = false; + } + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/PointCloudParticleExample.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/PointCloudParticleExample.cs.meta new file mode 100644 index 00000000..3eefcb18 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/PointCloudParticleExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ec20d460fbb7e4f92b4d84a10da98cd9 +timeCreated: 1494006942 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAmbient.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAmbient.cs new file mode 100644 index 00000000..c2419e73 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAmbient.cs @@ -0,0 +1,36 @@ +using System.Runtime.InteropServices; +using UnityEngine.XR.iOS; + +namespace UnityEngine.XR.iOS +{ + public class UnityARAmbient : MonoBehaviour + { + + private Light l; + + public void Start() + { + l = GetComponent(); + UnityARSessionNativeInterface.ARFrameUpdatedEvent += UpdateLightEstimation; + } + + void UpdateLightEstimation(UnityARCamera camera) + { + if (camera.lightData.arLightingType == LightDataType.LightEstimate) { + // Convert ARKit intensity to Unity intensity + // ARKit ambient intensity ranges 0-2000 + // Unity ambient intensity ranges 0-8 (for over-bright lights) + float newai = camera.lightData.arLightEstimate.ambientIntensity; + l.intensity = newai / 1000.0f; + + //Unity Light has functionality to filter the light color to correct temperature + //https://docs.unity3d.com/ScriptReference/Light-colorTemperature.html + l.colorTemperature = camera.lightData.arLightEstimate.ambientColorTemperature; + } + } + + void OnDestroy() { + UnityARSessionNativeInterface.ARFrameUpdatedEvent -= UpdateLightEstimation; + } + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAmbient.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAmbient.cs.meta new file mode 100644 index 00000000..342d9762 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAmbient.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5587c957048494a2f96db36e0995449e +timeCreated: 1492805300 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAnchorManager.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAnchorManager.cs new file mode 100644 index 00000000..4776c80e --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAnchorManager.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Collections.Hybrid.Generic; + +namespace UnityEngine.XR.iOS +{ + public class UnityARAnchorManager + { + + + private LinkedListDictionary planeAnchorMap; + + + public UnityARAnchorManager () + { + planeAnchorMap = new LinkedListDictionary (); + UnityARSessionNativeInterface.ARAnchorAddedEvent += AddAnchor; + UnityARSessionNativeInterface.ARAnchorUpdatedEvent += UpdateAnchor; + UnityARSessionNativeInterface.ARAnchorRemovedEvent += RemoveAnchor; + + } + + + public void AddAnchor(ARPlaneAnchor arPlaneAnchor) + { + GameObject go = UnityARUtility.CreatePlaneInScene (arPlaneAnchor); + go.AddComponent (); //this is so these GOs persist across scene loads + ARPlaneAnchorGameObject arpag = new ARPlaneAnchorGameObject (); + arpag.planeAnchor = arPlaneAnchor; + arpag.gameObject = go; + planeAnchorMap.Add (arPlaneAnchor.identifier, arpag); + } + + public void RemoveAnchor(ARPlaneAnchor arPlaneAnchor) + { + if (planeAnchorMap.ContainsKey (arPlaneAnchor.identifier)) { + ARPlaneAnchorGameObject arpag = planeAnchorMap [arPlaneAnchor.identifier]; + GameObject.Destroy (arpag.gameObject); + planeAnchorMap.Remove (arPlaneAnchor.identifier); + } + } + + public void UpdateAnchor(ARPlaneAnchor arPlaneAnchor) + { + if (planeAnchorMap.ContainsKey (arPlaneAnchor.identifier)) { + ARPlaneAnchorGameObject arpag = planeAnchorMap [arPlaneAnchor.identifier]; + UnityARUtility.UpdatePlaneWithAnchorTransform (arpag.gameObject, arPlaneAnchor); + arpag.planeAnchor = arPlaneAnchor; + planeAnchorMap [arPlaneAnchor.identifier] = arpag; + } + } + + public void UnsubscribeEvents() + { + UnityARSessionNativeInterface.ARAnchorAddedEvent -= AddAnchor; + UnityARSessionNativeInterface.ARAnchorUpdatedEvent -= UpdateAnchor; + UnityARSessionNativeInterface.ARAnchorRemovedEvent -= RemoveAnchor; + } + + public void Destroy() + { + foreach (ARPlaneAnchorGameObject arpag in GetCurrentPlaneAnchors()) { + GameObject.Destroy (arpag.gameObject); + } + + planeAnchorMap.Clear (); + UnsubscribeEvents(); + } + + public LinkedList GetCurrentPlaneAnchors() + { + return planeAnchorMap.Values; + } + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAnchorManager.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAnchorManager.cs.meta new file mode 100644 index 00000000..b5de8fa9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARAnchorManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 00b197bb73412448e9a5e14be146aaeb +timeCreated: 1492557010 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraManager.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraManager.cs new file mode 100644 index 00000000..cf321514 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraManager.cs @@ -0,0 +1,125 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +public class UnityARCameraManager : MonoBehaviour { + + public Camera m_camera; + private UnityARSessionNativeInterface m_session; + private Material savedClearMaterial; + + [Header("AR Config Options")] + public UnityARAlignment startAlignment = UnityARAlignment.UnityARAlignmentGravity; + public UnityARPlaneDetection planeDetection = UnityARPlaneDetection.Horizontal; + public bool getPointCloud = true; + public bool enableLightEstimation = true; + public bool enableAutoFocus = true; + public UnityAREnvironmentTexturing environmentTexturing = UnityAREnvironmentTexturing.UnityAREnvironmentTexturingNone; + + [Header("Image Tracking")] + public ARReferenceImagesSet detectionImages = null; + public int maximumNumberOfTrackedImages = 0; + + [Header("Object Tracking")] + public ARReferenceObjectsSetAsset detectionObjects = null; + private bool sessionStarted = false; + + public ARKitWorldTrackingSessionConfiguration sessionConfiguration + { + get + { + ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration (); + config.planeDetection = planeDetection; + config.alignment = startAlignment; + config.getPointCloudData = getPointCloud; + config.enableLightEstimation = enableLightEstimation; + config.enableAutoFocus = enableAutoFocus; + config.maximumNumberOfTrackedImages = maximumNumberOfTrackedImages; + config.environmentTexturing = environmentTexturing; + if (detectionImages != null) + config.referenceImagesGroupName = detectionImages.resourceGroupName; + + if (detectionObjects != null) + { + config.referenceObjectsGroupName = ""; //lets not read from XCode asset catalog right now + config.dynamicReferenceObjectsPtr = m_session.CreateNativeReferenceObjectsSet(detectionObjects.LoadReferenceObjectsInSet()); + } + + return config; + } + } + + // Use this for initialization + void Start () { + + m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); + + Application.targetFrameRate = 60; + + var config = sessionConfiguration; + if (config.IsSupported) { + m_session.RunWithConfig (config); + UnityARSessionNativeInterface.ARFrameUpdatedEvent += FirstFrameUpdate; + } + + if (m_camera == null) { + m_camera = Camera.main; + } + } + + void OnDestroy() + { + m_session.Pause(); + } + + void FirstFrameUpdate(UnityARCamera cam) + { + sessionStarted = true; + UnityARSessionNativeInterface.ARFrameUpdatedEvent -= FirstFrameUpdate; + } + + public void SetCamera(Camera newCamera) + { + if (m_camera != null) { + UnityARVideo oldARVideo = m_camera.gameObject.GetComponent (); + if (oldARVideo != null) { + savedClearMaterial = oldARVideo.m_ClearMaterial; + Destroy (oldARVideo); + } + } + SetupNewCamera (newCamera); + } + + private void SetupNewCamera(Camera newCamera) + { + m_camera = newCamera; + + if (m_camera != null) { + UnityARVideo unityARVideo = m_camera.gameObject.GetComponent (); + if (unityARVideo != null) { + savedClearMaterial = unityARVideo.m_ClearMaterial; + Destroy (unityARVideo); + } + unityARVideo = m_camera.gameObject.AddComponent (); + unityARVideo.m_ClearMaterial = savedClearMaterial; + } + } + + // Update is called once per frame + + void Update () { + + if (m_camera != null && sessionStarted) + { + // JUST WORKS! + Matrix4x4 matrix = m_session.GetCameraPose(); + m_camera.transform.localPosition = UnityARMatrixOps.GetPosition(matrix); + m_camera.transform.localRotation = UnityARMatrixOps.GetRotation (matrix); + + m_camera.projectionMatrix = m_session.GetCameraProjection (); + } + + } + +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraManager.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraManager.cs.meta new file mode 100644 index 00000000..72b75395 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 462d46d2423bb4f738d2497a397b1590 +timeCreated: 1493058653 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraNearFar.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraNearFar.cs new file mode 100644 index 00000000..7a3fa155 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraNearFar.cs @@ -0,0 +1,32 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +[RequireComponent(typeof(Camera))] +public class UnityARCameraNearFar : MonoBehaviour { + + private Camera attachedCamera; + private float currentNearZ; + private float currentFarZ; + + // Use this for initialization + void Start () { + attachedCamera = GetComponent (); + UpdateCameraClipPlanes (); + } + + void UpdateCameraClipPlanes() + { + currentNearZ = attachedCamera.nearClipPlane; + currentFarZ = attachedCamera.farClipPlane; + UnityARSessionNativeInterface.GetARSessionNativeInterface ().SetCameraClipPlanes (currentNearZ, currentFarZ); + } + + // Update is called once per frame + void Update () { + if (currentNearZ != attachedCamera.nearClipPlane || currentFarZ != attachedCamera.farClipPlane) { + UpdateCameraClipPlanes (); + } + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraNearFar.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraNearFar.cs.meta new file mode 100644 index 00000000..8614b2f1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARCameraNearFar.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ce437cef046e841aabd6070890e79d41 +timeCreated: 1496930896 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARGeneratePlane.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARGeneratePlane.cs new file mode 100644 index 00000000..029c76e6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARGeneratePlane.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; + +namespace UnityEngine.XR.iOS +{ + public class UnityARGeneratePlane : MonoBehaviour + { + public GameObject planePrefab; + private UnityARAnchorManager unityARAnchorManager; + + // Use this for initialization + void Start () { + unityARAnchorManager = new UnityARAnchorManager(); + UnityARUtility.InitializePlanePrefab (planePrefab); + } + + void OnDestroy() + { + unityARAnchorManager.Destroy (); + } + + void OnGUI() + { + IEnumerable arpags = unityARAnchorManager.GetCurrentPlaneAnchors (); + foreach(var planeAnchor in arpags) + { + //ARPlaneAnchor ap = planeAnchor; + //GUI.Box (new Rect (100, 100, 800, 60), string.Format ("Center: x:{0}, y:{1}, z:{2}", ap.center.x, ap.center.y, ap.center.z)); + //GUI.Box(new Rect(100, 200, 800, 60), string.Format ("Extent: x:{0}, y:{1}, z:{2}", ap.extent.x, ap.extent.y, ap.extent.z)); + } + } + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARGeneratePlane.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARGeneratePlane.cs.meta new file mode 100644 index 00000000..d1b20fea --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARGeneratePlane.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 31cac8edf84834043ac167deaeba16a9 +timeCreated: 1493058396 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARHitTestExample.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARHitTestExample.cs new file mode 100644 index 00000000..563b2528 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARHitTestExample.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; + +namespace UnityEngine.XR.iOS +{ + public class UnityARHitTestExample : MonoBehaviour + { + public Transform m_HitTransform; + public float maxRayDistance = 30.0f; + public LayerMask collisionLayer = 1 << 10; //ARKitPlane layer + + bool HitTestWithResultType (ARPoint point, ARHitTestResultType resultTypes) + { + List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, resultTypes); + if (hitResults.Count > 0) { + foreach (var hitResult in hitResults) { + Debug.Log ("Got hit!"); + m_HitTransform.position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); + m_HitTransform.rotation = UnityARMatrixOps.GetRotation (hitResult.worldTransform); + Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", m_HitTransform.position.x, m_HitTransform.position.y, m_HitTransform.position.z)); + return true; + } + } + return false; + } + + // Update is called once per frame + void Update () { + #if UNITY_EDITOR //we will only use this script on the editor side, though there is nothing that would prevent it from working on device + if (Input.GetMouseButtonDown (0)) { + Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); + RaycastHit hit; + + //we'll try to hit one of the plane collider gameobjects that were generated by the plugin + //effectively similar to calling HitTest with ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent + if (Physics.Raycast (ray, out hit, maxRayDistance, collisionLayer)) { + //we're going to get the position from the contact point + m_HitTransform.position = hit.point; + Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", m_HitTransform.position.x, m_HitTransform.position.y, m_HitTransform.position.z)); + + //and the rotation from the transform of the plane collider + m_HitTransform.rotation = hit.transform.rotation; + } + } + #else + if (Input.touchCount > 0 && m_HitTransform != null) + { + var touch = Input.GetTouch(0); + if (touch.phase == TouchPhase.Began || touch.phase == TouchPhase.Moved) + { + var screenPosition = Camera.main.ScreenToViewportPoint(touch.position); + ARPoint point = new ARPoint { + x = screenPosition.x, + y = screenPosition.y + }; + + // prioritize reults types + ARHitTestResultType[] resultTypes = { + //ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingGeometry, + ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent, + // if you want to use infinite planes use this: + //ARHitTestResultType.ARHitTestResultTypeExistingPlane, + //ARHitTestResultType.ARHitTestResultTypeEstimatedHorizontalPlane, + //ARHitTestResultType.ARHitTestResultTypeEstimatedVerticalPlane, + //ARHitTestResultType.ARHitTestResultTypeFeaturePoint + }; + + foreach (ARHitTestResultType resultType in resultTypes) + { + if (HitTestWithResultType (point, resultType)) + { + return; + } + } + } + } + #endif + + } + + + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARHitTestExample.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARHitTestExample.cs.meta new file mode 100644 index 00000000..065d7b07 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARHitTestExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6941ec02ead994c9b848d640887441f1 +timeCreated: 1492806244 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitControl.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitControl.cs new file mode 100644 index 00000000..6a565cdd --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitControl.cs @@ -0,0 +1,72 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEngine.XR.iOS +{ + public class UnityARKitControl : MonoBehaviour { + + UnityARSessionRunOption [] runOptions = new UnityARSessionRunOption[4]; + UnityARAlignment [] alignmentOptions = new UnityARAlignment[3]; + UnityARPlaneDetection [] planeOptions = new UnityARPlaneDetection[4]; + + int currentOptionIndex = 0; + int currentAlignmentIndex = 0; + int currentPlaneIndex = 0; + + // Use this for initialization + void Start () { + runOptions [0] = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking; + runOptions [1] = UnityARSessionRunOption.ARSessionRunOptionResetTracking; + runOptions [2] = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors; + runOptions [3] = 0; + + alignmentOptions [0] = UnityARAlignment.UnityARAlignmentCamera; + alignmentOptions [1] = UnityARAlignment.UnityARAlignmentGravity; + alignmentOptions [2] = UnityARAlignment.UnityARAlignmentGravityAndHeading; + + planeOptions [0] = UnityARPlaneDetection.Horizontal; + planeOptions [1] = UnityARPlaneDetection.None; + + } + + // Update is called once per frame + void Update () { + + } + + void OnGUI() + { + if (GUI.Button (new Rect (100, 100, 200, 50), "Stop")) { + UnityARSessionNativeInterface.GetARSessionNativeInterface ().Pause (); + } + + if (GUI.Button (new Rect (300, 100, 200, 50), "Start")) { + ARKitWorldTrackingSessionConfiguration sessionConfig = new ARKitWorldTrackingSessionConfiguration (alignmentOptions [currentAlignmentIndex], planeOptions[currentPlaneIndex]); + UnityARSessionNativeInterface.GetARSessionNativeInterface ().RunWithConfigAndOptions (sessionConfig, runOptions[currentOptionIndex]); + } + + + if (GUI.Button (new Rect (100, 300, 200, 100), "Start Non-WT Session")) { + ARKitSessionConfiguration sessionConfig = new ARKitSessionConfiguration (alignmentOptions [currentAlignmentIndex], true, true); + UnityARSessionNativeInterface.GetARSessionNativeInterface ().RunWithConfig (sessionConfig); + } + + + string runOptionStr = (currentOptionIndex == 0 ? "Full" : (currentOptionIndex == 1 ? "Tracking" : (currentOptionIndex == 2 ? "Anchors" : "None"))); + if (GUI.Button (new Rect (100, 200, 150, 50), "RunOption:" + runOptionStr)) { + currentOptionIndex = (currentOptionIndex + 1) % 4; + } + + string alignmentOptionStr = (currentAlignmentIndex == 0 ? "Camera" : (currentAlignmentIndex == 1 ? "Gravity" : "GravityAndHeading")); + if (GUI.Button (new Rect (300, 200, 150, 50), "AlignOption:" + alignmentOptionStr)) { + currentAlignmentIndex = (currentAlignmentIndex + 1) % 3; + } + + string planeOptionStr = currentPlaneIndex == 0 ? "Horizontal": "None"; + if (GUI.Button (new Rect (500, 200, 150, 50), "PlaneOption:" + planeOptionStr)) { + currentPlaneIndex = (currentPlaneIndex + 1) % 2; + } + } + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitControl.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitControl.cs.meta new file mode 100644 index 00000000..1f53e03c --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4977b930c0f8843c8b8a101ba5bf3c8f +timeCreated: 1493240142 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitLightManager.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitLightManager.cs new file mode 100644 index 00000000..efc4111d --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitLightManager.cs @@ -0,0 +1,94 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; +using UnityEngine.Rendering; + +public class UnityARKitLightManager : MonoBehaviour { + + Light [] lightsInScene; + SphericalHarmonicsL2 shl; + + // Use this for initialization + void Start () { + //find all the lights in the scene + lightsInScene = FindAllLights(); + shl = new SphericalHarmonicsL2 (); + + //subscribe to event informing us of light changes from AR + UnityARSessionNativeInterface.ARFrameUpdatedEvent += UpdateLightEstimations; + + } + + void OnDestroy() + { + UnityARSessionNativeInterface.ARFrameUpdatedEvent -= UpdateLightEstimations; + } + + + Light [] FindAllLights() + { + return FindObjectsOfType (); + } + + + + void UpdateLightEstimations(UnityARCamera camera) + { + if (camera.lightData.arLightingType == LightDataType.LightEstimate) { + UpdateBasicLightEstimation (camera.lightData.arLightEstimate); + } + else if (camera.lightData.arLightingType == LightDataType.DirectionalLightEstimate) + { + UpdateDirectionalLightEstimation (camera.lightData.arDirectonalLightEstimate); + } + } + + void UpdateBasicLightEstimation(UnityARLightEstimate uarle) + { + foreach (Light l in lightsInScene) + { + //fix ambient light + // Convert ARKit intensity to Unity intensity + // ARKit ambient intensity ranges 0-2000 + // Unity ambient intensity ranges 0-8 (for over-bright lights) + float newai = uarle.ambientIntensity; + l.intensity = newai / 1000.0f; + + //Unity Light has functionality to filter the light color to correct temperature + //https://docs.unity3d.com/ScriptReference/Light-colorTemperature.html + l.colorTemperature = uarle.ambientColorTemperature; + } + + + + } + + void UpdateDirectionalLightEstimation(UnityARDirectionalLightEstimate uardle) + { + for (int colorChannel = 0; colorChannel < 3; colorChannel++) { + for (int index = 0; index < 9; index++) { + shl [colorChannel, index] = uardle.sphericalHarmonicsCoefficients [(colorChannel * 9) + index]; + } + } + + if (LightmapSettings.lightProbes != null) { + int probeCount = LightmapSettings.lightProbes.count; + + //we have at least one light probe in the scene + if (probeCount > 0) { + + //Replace all the baked probes in the scene with our generated Spherical Harmonics + SphericalHarmonicsL2[] bakedProbes = LightmapSettings.lightProbes.bakedProbes; + + for (int i = 0; i < probeCount; i++) { + bakedProbes [i] = shl; + } + } + } + + //for objects unaffected by any lightprobes, set up ambient probe + RenderSettings.ambientProbe = shl; + RenderSettings.ambientMode = AmbientMode.Custom; + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitLightManager.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitLightManager.cs.meta new file mode 100644 index 00000000..83b643de --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARKitLightManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d0b95baf0d5f840f4bd22de86c996c08 +timeCreated: 1506357597 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARMatrixOps.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARMatrixOps.cs new file mode 100644 index 00000000..2a0b3b38 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARMatrixOps.cs @@ -0,0 +1,90 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public class UnityARMatrixOps + { + + public static Matrix4x4 UnityToARKitCoordChange(Vector3 position, Quaternion rotation) + { + Matrix4x4 result = new Matrix4x4 (); + //do the conversions back to ARKit space + result.SetTRS (new Vector3 (position.x, position.y, -position.z), + new Quaternion (rotation.x, rotation.y, -rotation.z, -rotation.w), + Vector3.one); + return result; + + } + + public static Matrix4x4 GetMatrix(UnityARMatrix4x4 unityMatrix) + { + var matrix = new Matrix4x4(); + matrix.SetColumn(0, unityMatrix.column0); + matrix.SetColumn(1, unityMatrix.column1); + matrix.SetColumn(2, unityMatrix.column2); + matrix.SetColumn(3, unityMatrix.column3); + + return matrix; + } + + public static UnityARMatrix4x4 GetMatrix(Matrix4x4 nativeMatrix) + { + var matrix = new UnityARMatrix4x4(); + matrix.column0 = nativeMatrix.GetColumn(0); + matrix.column1 = nativeMatrix.GetColumn(1); + matrix.column2 = nativeMatrix.GetColumn(2); + matrix.column3 = nativeMatrix.GetColumn(3); + + return matrix; + } + + public static Pose GetPose(UnityARMatrix4x4 unityMatrix) + { + return GetPose(GetMatrix(unityMatrix)); + } + + public static Pose GetPose(Matrix4x4 matrix) + { + return new Pose(GetPosition(matrix), GetRotation(matrix)); + } + + public static Vector3 GetPosition(Matrix4x4 matrix) + { + return GetPosition(matrix.GetColumn(3)); + } + + public static Quaternion GetRotation(Matrix4x4 matrix) + { + // Convert from ARKit's right-handed coordinate + // system to Unity's left-handed + Quaternion rotation = QuaternionFromMatrix(matrix); + rotation.z = -rotation.z; + rotation.w = -rotation.w; + + return rotation; + } + + public static Vector3 GetPosition(Vector3 position) + { + // Convert from ARKit's right-handed coordinate + // system to Unity's left-handed + position.z = -position.z; + return position; + } + + static Quaternion QuaternionFromMatrix(Matrix4x4 m) { + // Adapted from: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm + Quaternion q = new Quaternion(); + q.w = Mathf.Sqrt( Mathf.Max( 0, 1 + m[0,0] + m[1,1] + m[2,2] ) ) / 2; + q.x = Mathf.Sqrt( Mathf.Max( 0, 1 + m[0,0] - m[1,1] - m[2,2] ) ) / 2; + q.y = Mathf.Sqrt( Mathf.Max( 0, 1 - m[0,0] + m[1,1] - m[2,2] ) ) / 2; + q.z = Mathf.Sqrt( Mathf.Max( 0, 1 - m[0,0] - m[1,1] + m[2,2] ) ) / 2; + q.x *= Mathf.Sign( q.x * ( m[2,1] - m[1,2] ) ); + q.y *= Mathf.Sign( q.y * ( m[0,2] - m[2,0] ) ); + q.z *= Mathf.Sign( q.z * ( m[1,0] - m[0,1] ) ); + return q; + } + + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARMatrixOps.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARMatrixOps.cs.meta new file mode 100644 index 00000000..35f29479 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARMatrixOps.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 37808a86538754725a15d36128fd2afc +timeCreated: 1492800582 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUserAnchorComponent.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUserAnchorComponent.cs new file mode 100644 index 00000000..a24b4203 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUserAnchorComponent.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.iOS; + +namespace UnityEngine.XR.iOS +{ +public class UnityARUserAnchorComponent : MonoBehaviour { + + private string m_AnchorId; + + public string AnchorId { get { return m_AnchorId; } } + + void Awake() + { + UnityARSessionNativeInterface.ARUserAnchorUpdatedEvent += GameObjectAnchorUpdated; + UnityARSessionNativeInterface.ARUserAnchorRemovedEvent += AnchorRemoved; + this.m_AnchorId = UnityARSessionNativeInterface.GetARSessionNativeInterface ().AddUserAnchorFromGameObject(this.gameObject).identifierStr; + } + void Start () { + + } + + public void AnchorRemoved(ARUserAnchor anchor) + { + if (anchor.identifier.Equals(m_AnchorId)) + { + Destroy(this.gameObject); + } + } + + void OnDestroy() { + UnityARSessionNativeInterface.ARUserAnchorUpdatedEvent -= GameObjectAnchorUpdated; + UnityARSessionNativeInterface.ARUserAnchorRemovedEvent -= AnchorRemoved; + UnityARSessionNativeInterface.GetARSessionNativeInterface ().RemoveUserAnchor(this.m_AnchorId); + } + + private void GameObjectAnchorUpdated(ARUserAnchor anchor) + { + if (anchor.identifier.Equals(m_AnchorId)) + { + transform.position = UnityARMatrixOps.GetPosition(anchor.transform); + transform.rotation = UnityARMatrixOps.GetRotation(anchor.transform); + + Console.WriteLine("Updated: pos = " + transform.position + m_AnchorId); + } + } +} +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUserAnchorComponent.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUserAnchorComponent.cs.meta new file mode 100644 index 00000000..7671fd67 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUserAnchorComponent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4d24244ceb54d42ca92481ba81c45056 +timeCreated: 1499372973 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUtility.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUtility.cs new file mode 100644 index 00000000..9d6a8ea3 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUtility.cs @@ -0,0 +1,70 @@ +using System; +using System.Runtime.InteropServices; + +namespace UnityEngine.XR.iOS +{ + public class UnityARUtility + { + private MeshCollider meshCollider; //declared to avoid code stripping of class + private MeshFilter meshFilter; //declared to avoid code stripping of class + private static GameObject planePrefab = null; + + public static void InitializePlanePrefab(GameObject go) + { + planePrefab = go; + } + + public static GameObject CreatePlaneInScene(ARPlaneAnchor arPlaneAnchor) + { + GameObject plane; + if (planePrefab != null) { + plane = GameObject.Instantiate(planePrefab); + } else { + plane = new GameObject (); //put in a blank gameObject to get at least a transform to manipulate + } + + plane.name = arPlaneAnchor.identifier; + + ARKitPlaneMeshRender apmr = plane.GetComponent (); + if (apmr != null) { + apmr.InitiliazeMesh (arPlaneAnchor); + } + + return UpdatePlaneWithAnchorTransform(plane, arPlaneAnchor); + + } + + public static GameObject UpdatePlaneWithAnchorTransform(GameObject plane, ARPlaneAnchor arPlaneAnchor) + { + + //do coordinate conversion from ARKit to Unity + plane.transform.position = UnityARMatrixOps.GetPosition (arPlaneAnchor.transform); + plane.transform.rotation = UnityARMatrixOps.GetRotation (arPlaneAnchor.transform); + + ARKitPlaneMeshRender apmr = plane.GetComponent (); + if (apmr != null) { + apmr.UpdateMesh (arPlaneAnchor); + } + + + MeshFilter mf = plane.GetComponentInChildren (); + + if (mf != null) { + if (apmr == null) { + //since our plane mesh is actually 10mx10m in the world, we scale it here by 0.1f + mf.gameObject.transform.localScale = new Vector3 (arPlaneAnchor.extent.x * 0.1f, arPlaneAnchor.extent.y * 0.1f, arPlaneAnchor.extent.z * 0.1f); + + //convert our center position to unity coords + mf.gameObject.transform.localPosition = new Vector3(arPlaneAnchor.center.x,arPlaneAnchor.center.y, -arPlaneAnchor.center.z); + } + + } + + return plane; + } + + + + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUtility.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUtility.cs.meta new file mode 100644 index 00000000..9de43b4e --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARUtility.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9736aad5d8518481ab7e8d1d0b0e6e36 +timeCreated: 1492800582 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARVideo.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARVideo.cs new file mode 100644 index 00000000..fb99e66c --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARVideo.cs @@ -0,0 +1,119 @@ +using System; +using System.Runtime.InteropServices; +using UnityEngine; +using UnityEngine.Rendering; + +namespace UnityEngine.XR.iOS +{ + + public class UnityARVideo : MonoBehaviour + { + public Material m_ClearMaterial; + + private CommandBuffer m_VideoCommandBuffer; + private Texture2D _videoTextureY; + private Texture2D _videoTextureCbCr; + private Matrix4x4 _displayTransform; + + private bool bCommandBufferInitialized; + + public void Start() + { + UnityARSessionNativeInterface.ARFrameUpdatedEvent += UpdateFrame; + bCommandBufferInitialized = false; + } + + void UpdateFrame(UnityARCamera cam) + { + _displayTransform = new Matrix4x4(); + _displayTransform.SetColumn(0, cam.displayTransform.column0); + _displayTransform.SetColumn(1, cam.displayTransform.column1); + _displayTransform.SetColumn(2, cam.displayTransform.column2); + _displayTransform.SetColumn(3, cam.displayTransform.column3); + } + + void InitializeCommandBuffer() + { + m_VideoCommandBuffer = new CommandBuffer(); + m_VideoCommandBuffer.Blit(null, BuiltinRenderTextureType.CurrentActive, m_ClearMaterial); + GetComponent().AddCommandBuffer(CameraEvent.BeforeForwardOpaque, m_VideoCommandBuffer); + bCommandBufferInitialized = true; + + } + + void OnDestroy() + { + if (m_VideoCommandBuffer != null) { + GetComponent().RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, m_VideoCommandBuffer); + } + UnityARSessionNativeInterface.ARFrameUpdatedEvent -= UpdateFrame; + bCommandBufferInitialized = false; + } + +#if !UNITY_EDITOR && UNITY_IOS + + public void OnPreRender() + { + ARTextureHandles handles = UnityARSessionNativeInterface.GetARSessionNativeInterface().GetARVideoTextureHandles(); + if (handles.IsNull()) + { + return; + } + + if (!bCommandBufferInitialized) { + InitializeCommandBuffer (); + } + + Resolution currentResolution = Screen.currentResolution; + + // Texture Y + if (_videoTextureY == null) { + _videoTextureY = Texture2D.CreateExternalTexture(currentResolution.width, currentResolution.height, + TextureFormat.R8, false, false, (System.IntPtr)handles.TextureY); + _videoTextureY.filterMode = FilterMode.Bilinear; + _videoTextureY.wrapMode = TextureWrapMode.Repeat; + m_ClearMaterial.SetTexture("_textureY", _videoTextureY); + } + + // Texture CbCr + if (_videoTextureCbCr == null) { + _videoTextureCbCr = Texture2D.CreateExternalTexture(currentResolution.width, currentResolution.height, + TextureFormat.RG16, false, false, (System.IntPtr)handles.TextureCbCr); + _videoTextureCbCr.filterMode = FilterMode.Bilinear; + _videoTextureCbCr.wrapMode = TextureWrapMode.Repeat; + m_ClearMaterial.SetTexture("_textureCbCr", _videoTextureCbCr); + } + + _videoTextureY.UpdateExternalTexture(handles.TextureY); + _videoTextureCbCr.UpdateExternalTexture(handles.TextureCbCr); + + m_ClearMaterial.SetMatrix("_DisplayTransform", _displayTransform); + } +#else + + public void SetYTexure(Texture2D YTex) + { + _videoTextureY = YTex; + } + + public void SetUVTexure(Texture2D UVTex) + { + _videoTextureCbCr = UVTex; + } + + public void OnPreRender() + { + + if (!bCommandBufferInitialized) { + InitializeCommandBuffer (); + } + + m_ClearMaterial.SetTexture("_textureY", _videoTextureY); + m_ClearMaterial.SetTexture("_textureCbCr", _videoTextureCbCr); + + m_ClearMaterial.SetMatrix("_DisplayTransform", _displayTransform); + } + +#endif + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARVideo.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARVideo.cs.meta new file mode 100644 index 00000000..05ab96b9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityARVideo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b58ecea7a196242dd879c814ac05084c +timeCreated: 1492796577 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityPointCloudExample.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityPointCloudExample.cs new file mode 100644 index 00000000..e21372c2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityPointCloudExample.cs @@ -0,0 +1,43 @@ +using System; +using UnityEngine; +using UnityEngine.XR.iOS; +using System.Collections.Generic; + +public class UnityPointCloudExample : MonoBehaviour +{ + public uint numPointsToShow = 100; + public GameObject PointCloudPrefab = null; + List pointCloudObjects; + Vector3[] m_PointCloudData; + + public void Start() + { + UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; + if (PointCloudPrefab != null) + { + pointCloudObjects = new List (); + for (int i =0; i < numPointsToShow; i++) + { + pointCloudObjects.Add (Instantiate (PointCloudPrefab)); + } + } + } + + public void ARFrameUpdated(UnityARCamera camera) + { + m_PointCloudData = camera.pointCloud.Points; + } + + public void Update() + { + if (PointCloudPrefab != null && m_PointCloudData != null) + { + for (int count = 0; count < Math.Min (m_PointCloudData.Length, numPointsToShow); count++) + { + Vector4 vert = m_PointCloudData [count]; + GameObject point = pointCloudObjects [count]; + point.transform.position = new Vector3(vert.x, vert.y, vert.z); + } + } + } +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityPointCloudExample.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityPointCloudExample.cs.meta new file mode 100644 index 00000000..818e6990 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Helpers/UnityPointCloudExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c5ab0fdfbf2334e8dbbcdda6ceada7e3 +timeCreated: 1493835634 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials.meta new file mode 100644 index 00000000..1b15efe8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b97b0ebd5e0d84160a0b477bf246c1e1 +folderAsset: yes +timeCreated: 1492792741 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterial.mat b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterial.mat new file mode 100644 index 00000000..964adb8e --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterial.mat @@ -0,0 +1,90 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: YUVMaterial + m_Shader: {fileID: 4800000, guid: ef7b8eec959eb4f1e9fa97bc86273848, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + 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} + - _textureCbCr: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _textureCrCb: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _textureY: + 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 + - _isPortrait: 0 + - _texCoordScale: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterial.mat.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterial.mat.meta new file mode 100644 index 00000000..4ca86089 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterial.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f1d9352050a75486f878ab19fa578f16 +timeCreated: 1492641356 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterialLinear.mat b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterialLinear.mat new file mode 100644 index 00000000..b890a268 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterialLinear.mat @@ -0,0 +1,90 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: YUVMaterialLinear + m_Shader: {fileID: 4800000, guid: 57c2c07a0719d4fafab7a4f8a84d1767, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + 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} + - _textureCbCr: + m_Texture: {fileID: 0} + m_Scale: {x: 2, y: 2} + m_Offset: {x: -1, y: -1} + - _textureCrCb: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _textureY: + m_Texture: {fileID: 0} + m_Scale: {x: 2, y: 2} + m_Offset: {x: -1, y: -1} + 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 + - _isPortrait: 0 + - _texCoordScale: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterialLinear.mat.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterialLinear.mat.meta new file mode 100644 index 00000000..595a6548 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Materials/YUVMaterialLinear.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2081057c5ab9b4b20a1a1c4efdace299 +timeCreated: 1492641356 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface.meta new file mode 100644 index 00000000..feefcbbc --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6930a53974b964a77bb66c8a01551eaa +folderAsset: yes +timeCreated: 1492795798 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARAnchor.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARAnchor.cs new file mode 100644 index 00000000..590794e6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARAnchor.cs @@ -0,0 +1,15 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public struct ARAnchor + { + public string identifier; + + /** + The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. + */ + public Matrix4x4 transform; + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARAnchor.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARAnchor.cs.meta new file mode 100644 index 00000000..8d9bf2f4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARAnchor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 79ff8feee38c24e158252a971d93a42a +timeCreated: 1492118050 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARCamera.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARCamera.cs new file mode 100644 index 00000000..dcfd5891 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARCamera.cs @@ -0,0 +1,50 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEngine.XR.iOS +{ + public struct ARCamera + { + /** + The transformation matrix that defines the camera's rotation and translation in world coordinates. + */ + + public Matrix4x4 worldTransform; + + /** + The camera's orientation defined as Euler angles. + + @dicussion The order of components in this vector matches the axes of rotation: + 1. Pitch (the x component) is the rotation about the node's x-axis (in radians) + 2. Yaw (the y component) is the rotation about the node's y-axis (in radians) + 3. Roll (the z component) is the rotation about the node's z-axis (in radians) + ARKit applies these rotations in the reverse order of the components: + 1. first roll + 2. then yaw + 3. then pitch + */ + + public Vector3 eulerAngles; + + public ARTrackingQuality trackingQuality; + + /** + The camera intrinsics. + @discussion The matrix has the following contents: + fx 0 px + 0 fy py + 0 0 1 + fx and fy are the focal length in pixels. + px and py are the coordinates of the principal point in pixels. + The origin is at the center of the upper-left pixel. + */ + + public Vector3 intrinsics_row1; + public Vector3 intrinsics_row2; + public Vector3 intrinsics_row3; + + public ARSize imageResolution; + + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARCamera.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARCamera.cs.meta new file mode 100644 index 00000000..bcb49ba6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARCamera.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f7914788e42e54a09ac79ed2629dfb48 +timeCreated: 1492103364 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbe.mm b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbe.mm new file mode 100644 index 00000000..058f8924 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbe.mm @@ -0,0 +1,170 @@ +// Unity Technologies Inc (c) 2017 +// AREnvironmentProbe.mm +// Main implementation of ARKit plugin native AREnvironmentProbeAnchor + +#include "ARKitDefines.h" + + +enum UnityAREnvironmentTextureFormat : long +{ + // NOTE: Not a complete set, but an initial mapping that matches some internal texture readmap mappings. + UnityAREnvironmentTextureFormatR16, + UnityAREnvironmentTextureFormatRG16, + UnityAREnvironmentTextureFormatBGRA32, + UnityAREnvironmentTextureFormatRGBA32, + UnityAREnvironmentTextureFormatRGBAFloat, + UnityAREnvironmentTextureFormatRGBAHalf, + UnityAREnvironmentTextureFormatDefault = UnityAREnvironmentTextureFormatBGRA32 +}; + +typedef struct +{ + void* cubemapPtr; + UnityAREnvironmentTextureFormat textureFormat; + int width; + int height; + int mipmapCount; +} UnityAREnvironmentProbeCubemapData; + +typedef struct +{ + void* identifier; + UnityARMatrix4x4 transform; + UnityAREnvironmentProbeCubemapData cubemapData; + UnityARVector3 extent; +} UnityAREnvironmentProbeAnchorData; + +inline UnityAREnvironmentTextureFormat GetUnityAREnvironmentTextureFormat (MTLPixelFormat mtlPixelFormat) +{ + // This mapping is based on a Unity internal runtime method metal::UnityTextureFormat() in TextureFormatMetal.mm that maps a subset of the Metal pixel formats to the Unity texture format + switch (mtlPixelFormat) + { + case MTLPixelFormatRGBA16Float: + return UnityAREnvironmentTextureFormatRGBAHalf; + case MTLPixelFormatRGBA32Float: + return UnityAREnvironmentTextureFormatRGBAFloat; + case MTLPixelFormatRGBA8Unorm_sRGB: + case MTLPixelFormatRGBA8Unorm: + return UnityAREnvironmentTextureFormatRGBA32; + case MTLPixelFormatBGRA8Unorm_sRGB: + case MTLPixelFormatBGRA8Unorm: + return UnityAREnvironmentTextureFormatBGRA32; + case MTLPixelFormatR16Unorm: + return UnityAREnvironmentTextureFormatR16; + case MTLPixelFormatRG8Unorm: + return UnityAREnvironmentTextureFormatRG16; + default: + return UnityAREnvironmentTextureFormatDefault; + } +} + +inline void UnityAREnvironmentProbeCubemapDataFromMTLTextureRef(UnityAREnvironmentProbeCubemapData& cubemapData, MTLTextureRef environmentTexture) +{ + cubemapData.cubemapPtr = (__bridge void*)environmentTexture; + cubemapData.textureFormat = GetUnityAREnvironmentTextureFormat([environmentTexture pixelFormat]); + cubemapData.width = (int)[environmentTexture width]; + cubemapData.height = (int)[environmentTexture height]; + cubemapData.mipmapCount = (int)[environmentTexture mipmapLevelCount]; +} + +API_AVAILABLE(ios(12.0)) +inline void UnityAREnvironmentProbeAnchorDataFromAREnvironmentProbeAnchorPtr(UnityAREnvironmentProbeAnchorData& anchorData, AREnvironmentProbeAnchor* nativeAnchor) +{ + anchorData.identifier = (void*)[nativeAnchor.identifier.UUIDString UTF8String]; + ARKitMatrixToUnityARMatrix4x4(nativeAnchor.transform, &anchorData.transform); + UnityAREnvironmentProbeCubemapDataFromMTLTextureRef(anchorData.cubemapData, [nativeAnchor environmentTexture]); + anchorData.extent = UnityARVector3 { + nativeAnchor.extent.x, + nativeAnchor.extent.y, + nativeAnchor.extent.z + }; +} + +typedef void (*UNITY_AR_ENVPROBE_ANCHOR_CALLBACK)(UnityAREnvironmentProbeAnchorData anchorData); + + +@interface UnityAREnvironmentProbeAnchorCallbackWrapper : NSObject +{ +@public + UNITY_AR_ENVPROBE_ANCHOR_CALLBACK _anchorAddedCallback; + UNITY_AR_ENVPROBE_ANCHOR_CALLBACK _anchorUpdatedCallback; + UNITY_AR_ENVPROBE_ANCHOR_CALLBACK _anchorRemovedCallback; +} +@end + +@implementation UnityAREnvironmentProbeAnchorCallbackWrapper + +-(void)sendAnchorAddedEvent:(ARAnchor*)anchor +{ + if (@available(iOS 12.0, *)) + { + UnityAREnvironmentProbeAnchorData data; + UnityAREnvironmentProbeAnchorDataFromAREnvironmentProbeAnchorPtr(data, (AREnvironmentProbeAnchor*)anchor); + _anchorAddedCallback(data); + } +} + +-(void)sendAnchorRemovedEvent:(ARAnchor*)anchor +{ + if (@available(iOS 12.0, *)) { + UnityAREnvironmentProbeAnchorData data; + UnityAREnvironmentProbeAnchorDataFromAREnvironmentProbeAnchorPtr(data, (AREnvironmentProbeAnchor*)anchor); + _anchorRemovedCallback(data); + } +} + +-(void)sendAnchorUpdatedEvent:(ARAnchor*)anchor +{ + if (@available(iOS 12.0, *)) + { + UnityAREnvironmentProbeAnchorData data; + UnityAREnvironmentProbeAnchorDataFromAREnvironmentProbeAnchorPtr(data, (AREnvironmentProbeAnchor*)anchor); + _anchorUpdatedCallback(data); + } +} + +@end + +extern "C" UnityAREnvironmentProbeAnchorData SessionAddEnvironmentProbeAnchor(void* nativeSession, UnityAREnvironmentProbeAnchorData anchorData) +{ + UnityAREnvironmentProbeAnchorData returnAnchorData; + + if (UnityIsARKit_2_0_Supported()) + { + // create a native AREnvironmentProbeAnchor and add it to the session + // then return the data back to the user that they will + // need in case they want to remove it + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + matrix_float4x4 initMat; + UnityARMatrix4x4ToARKitMatrix(anchorData.transform, &initMat); + if (@available(iOS 12.0, *)) + { + AREnvironmentProbeAnchor *newAnchor = [[AREnvironmentProbeAnchor alloc] initWithTransform:initMat]; + [session->_session addAnchor:newAnchor]; + UnityAREnvironmentProbeAnchorDataFromAREnvironmentProbeAnchorPtr(returnAnchorData, newAnchor); + } + } + + return returnAnchorData; + + } + + +extern "C" void session_SetEnvironmentProbeAnchorCallbacks(const void* session, UNITY_AR_ENVPROBE_ANCHOR_CALLBACK envProbeAnchorAddedCallback, + UNITY_AR_ENVPROBE_ANCHOR_CALLBACK envProbeAnchorUpdatedCallback, + UNITY_AR_ENVPROBE_ANCHOR_CALLBACK envProbeAnchorRemovedCallback) +{ + if (UnityIsARKit_2_0_Supported()) + { + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + UnityAREnvironmentProbeAnchorCallbackWrapper* envProbeAnchorCallbacks = [[UnityAREnvironmentProbeAnchorCallbackWrapper alloc] init]; + envProbeAnchorCallbacks->_anchorAddedCallback = envProbeAnchorAddedCallback; + envProbeAnchorCallbacks->_anchorUpdatedCallback = envProbeAnchorUpdatedCallback; + envProbeAnchorCallbacks->_anchorRemovedCallback = envProbeAnchorRemovedCallback; + if (@available(iOS 12.0, *)) { + [nativeSession->_classToCallbackMap setObject:envProbeAnchorCallbacks forKey:[AREnvironmentProbeAnchor class]]; + } + } +} + + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbe.mm.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbe.mm.meta new file mode 100644 index 00000000..ec2797ef --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbe.mm.meta @@ -0,0 +1,36 @@ +fileFormatVersion: 2 +guid: 0c6d0809cf3424e35877af8d6971e6b0 +timeCreated: 1523998953 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + - first: + tvOS: tvOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbeAnchor.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbeAnchor.cs new file mode 100644 index 00000000..8364610f --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbeAnchor.cs @@ -0,0 +1,203 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; +using System.Runtime.InteropServices; +using AOT; + + +namespace UnityEngine.XR.iOS +{ + + public enum UnityAREnvironmentTexturing + { + UnityAREnvironmentTexturingNone, + UnityAREnvironmentTexturingManual, + UnityAREnvironmentTexturingAutomatic + }; + + public enum UnityAREnvironmentTextureFormat : long + { + // NOTE: Not a complete set, but an initial mapping that matches an internal set of texture readback mappings. + UnityAREnvironmentTextureFormatR16, + UnityAREnvironmentTextureFormatRG16, + UnityAREnvironmentTextureFormatBGRA32, + UnityAREnvironmentTextureFormatRGBA32, + UnityAREnvironmentTextureFormatRGBAFloat, + UnityAREnvironmentTextureFormatRGBAHalf, + UnityAREnvironmentTextureFormatDefault = UnityAREnvironmentTextureFormatBGRA32 + }; + + public struct UnityAREnvironmentProbeCubemapData + { + public IntPtr cubemapPtr; + public UnityAREnvironmentTextureFormat textureFormat; + public int width; + public int height; + public int mipmapCount; + }; + + public struct UnityAREnvironmentProbeAnchorData + { + + public IntPtr ptrIdentifier; + + /** + The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. + */ + public UnityARMatrix4x4 transform; + + public UnityAREnvironmentProbeCubemapData cubemapData; + + public Vector3 probeExtent; + + }; + + public static class UnityAREnvironmentProbeCubemapDataMethods + { + public static TextureFormat GetTextureFormat(this UnityAREnvironmentTextureFormat unityAREnvironmentTextureFormat) + { + switch (unityAREnvironmentTextureFormat) + { + case UnityAREnvironmentTextureFormat.UnityAREnvironmentTextureFormatR16: + return TextureFormat.R16; + case UnityAREnvironmentTextureFormat.UnityAREnvironmentTextureFormatRG16: + return TextureFormat.RG16; + case UnityAREnvironmentTextureFormat.UnityAREnvironmentTextureFormatRGBA32: + return TextureFormat.RGBA32; + case UnityAREnvironmentTextureFormat.UnityAREnvironmentTextureFormatRGBAFloat: + return TextureFormat.RGBAFloat; + case UnityAREnvironmentTextureFormat.UnityAREnvironmentTextureFormatRGBAHalf: + return TextureFormat.RGBAHalf; + case UnityAREnvironmentTextureFormat.UnityAREnvironmentTextureFormatBGRA32: + default: + return TextureFormat.BGRA32; + } + } + } + + public class AREnvironmentProbeAnchor + { + + UnityAREnvironmentProbeAnchorData envProbeAnchorData; + + public AREnvironmentProbeAnchor(UnityAREnvironmentProbeAnchorData uarepad) + { + envProbeAnchorData = uarepad; + } + + public string identifier { get { return Marshal.PtrToStringAuto(envProbeAnchorData.ptrIdentifier); } } + + public Matrix4x4 transform { + get { + Matrix4x4 matrix = new Matrix4x4 (); + matrix.SetColumn (0, envProbeAnchorData.transform.column0); + matrix.SetColumn (1, envProbeAnchorData.transform.column1); + matrix.SetColumn (2, envProbeAnchorData.transform.column2); + matrix.SetColumn (3, envProbeAnchorData.transform.column3); + return matrix; + } + } + + public Cubemap Cubemap + { + get + { + if (envProbeAnchorData.cubemapData.cubemapPtr != IntPtr.Zero) { + Cubemap cubemap = Cubemap.CreateExternalTexture(envProbeAnchorData.cubemapData.width, + envProbeAnchorData.cubemapData.textureFormat.GetTextureFormat(), + (envProbeAnchorData.cubemapData.mipmapCount > 1), + envProbeAnchorData.cubemapData.cubemapPtr); + cubemap.filterMode = FilterMode.Trilinear; + return cubemap; + } else { + return null; + } + } + + } + + public Vector3 Extent + { + get { return envProbeAnchorData.probeExtent; } + } + } + + + public partial class UnityARSessionNativeInterface + { + // Object Anchors + public delegate void AREnvironmentProbeAnchorAdded(AREnvironmentProbeAnchor anchorData); + public static event AREnvironmentProbeAnchorAdded AREnvironmentProbeAnchorAddedEvent; + + public delegate void AREnvironmentProbeAnchorUpdated(AREnvironmentProbeAnchor anchorData); + public static event AREnvironmentProbeAnchorUpdated AREnvironmentProbeAnchorUpdatedEvent; + + public delegate void AREnvironmentProbeAnchorRemoved(AREnvironmentProbeAnchor anchorData); + public static event AREnvironmentProbeAnchorRemoved AREnvironmentProbeAnchorRemovedEvent; + + + delegate void internal_AREnvironmentProbeAnchorAdded(UnityAREnvironmentProbeAnchorData anchorData); + delegate void internal_AREnvironmentProbeAnchorUpdated(UnityAREnvironmentProbeAnchorData anchorData); + delegate void internal_AREnvironmentProbeAnchorRemoved(UnityAREnvironmentProbeAnchorData anchorData); + + public UnityAREnvironmentProbeAnchorData AddEnvironmentProbeAnchor(UnityAREnvironmentProbeAnchorData anchorData) + { + #if !UNITY_EDITOR && UNITY_IOS + return SessionAddEnvironmentProbeAnchor(m_NativeARSession, anchorData); + #else + return new UnityAREnvironmentProbeAnchorData(); + #endif + } + + +#if !UNITY_EDITOR && UNITY_IOS + + #region Environment Probe Anchors + [MonoPInvokeCallback(typeof(internal_AREnvironmentProbeAnchorAdded))] + static void _envprobe_anchor_added(UnityAREnvironmentProbeAnchorData anchor) + { + if (AREnvironmentProbeAnchorAddedEvent != null) + { + AREnvironmentProbeAnchor arEnvProbeAnchor = new AREnvironmentProbeAnchor(anchor); + AREnvironmentProbeAnchorAddedEvent(arEnvProbeAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_AREnvironmentProbeAnchorUpdated))] + static void _envprobe_anchor_updated(UnityAREnvironmentProbeAnchorData anchor) + { + if (AREnvironmentProbeAnchorUpdatedEvent != null) + { + AREnvironmentProbeAnchor arEnvProbeAnchor = new AREnvironmentProbeAnchor(anchor); + AREnvironmentProbeAnchorUpdatedEvent(arEnvProbeAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_AREnvironmentProbeAnchorRemoved))] + static void _envprobe_anchor_removed(UnityAREnvironmentProbeAnchorData anchor) + { + if (AREnvironmentProbeAnchorRemovedEvent != null) + { + AREnvironmentProbeAnchor arEnvProbeAnchor = new AREnvironmentProbeAnchor(anchor); + AREnvironmentProbeAnchorRemovedEvent(arEnvProbeAnchor); + } + } + #endregion + + [DllImport("__Internal")] + private static extern void session_SetEnvironmentProbeAnchorCallbacks(IntPtr nativeSession, internal_AREnvironmentProbeAnchorAdded envprobeAnchorAddedCallback, + internal_AREnvironmentProbeAnchorUpdated envprobeAnchorUpdatedCallback, + internal_AREnvironmentProbeAnchorRemoved envprobeAnchorRemovedCallback); + + [DllImport("__Internal")] + private static extern UnityAREnvironmentProbeAnchorData SessionAddEnvironmentProbeAnchor (IntPtr nativeSession, UnityAREnvironmentProbeAnchorData anchorData); + + +#endif //!UNITY_EDITOR && UNITY_IOS + + + + + } +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbeAnchor.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbeAnchor.cs.meta new file mode 100644 index 00000000..e6fe2dbe --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/AREnvironmentProbeAnchor.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 910c01687822140fda3d851b2e33844d +timeCreated: 1524000394 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARErrorCode.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARErrorCode.cs new file mode 100644 index 00000000..b6b6b7e2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARErrorCode.cs @@ -0,0 +1,21 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public enum ARErrorCode : long + { + /** Unsupported session configuration. */ + ARErrorCodeUnsupportedConfiguration = 100, + + /** A sensor required to run the session is not available. */ + ARErrorCodeSensorUnavailable = 101, + + /** A sensor failed to provide the required input. */ + ARErrorCodeSensorFailed = 102, + + /** World tracking has encountered a fatal error. */ + ARErrorCodeWorldTrackingFailed = 200, + + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARErrorCode.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARErrorCode.cs.meta new file mode 100644 index 00000000..b348c2fe --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARErrorCode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 094318df5b9084291abdf9a768914ab7 +timeCreated: 1492118622 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFaceAnchor.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFaceAnchor.cs new file mode 100644 index 00000000..7653d6a0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFaceAnchor.cs @@ -0,0 +1,287 @@ +using UnityEngine; +using System.Collections; +using System.Runtime.InteropServices; +using System; +using System.Collections.Generic; +using AOT; +using System.Text; + +namespace UnityEngine.XR.iOS +{ + + public static class ARBlendShapeLocation + { + public const string BrowDownLeft = "browDown_L"; + public const string BrowDownRight = "browDown_R"; + public const string BrowInnerUp = "browInnerUp"; + public const string BrowOuterUpLeft = "browOuterUp_L"; + public const string BrowOuterUpRight = "browOuterUp_R"; + public const string CheekPuff = "cheekPuff"; + public const string CheekSquintLeft = "cheekSquint_L"; + public const string CheekSquintRight = "cheekSquint_R"; + public const string EyeBlinkLeft = "eyeBlink_L"; + public const string EyeBlinkRight = "eyeBlink_R"; + public const string EyeLookDownLeft = "eyeLookDown_L"; + public const string EyeLookDownRight = "eyeLookDown_R"; + public const string EyeLookInLeft = "eyeLookIn_L"; + public const string EyeLookInRight = "eyeLookIn_R"; + public const string EyeLookOutLeft = "eyeLookOut_L"; + public const string EyeLookOutRight = "eyeLookOut_R"; + public const string EyeLookUpLeft = "eyeLookUp_L"; + public const string EyeLookUpRight = "eyeLookUp_R"; + public const string EyeSquintLeft = "eyeSquint_L"; + public const string EyeSquintRight = "eyeSquint_R"; + public const string EyeWideLeft = "eyeWide_L"; + public const string EyeWideRight = "eyeWide_R"; + public const string JawForward = "jawForward"; + public const string JawLeft = "jawLeft"; + public const string JawOpen = "jawOpen"; + public const string JawRight = "jawRight"; + public const string MouthClose = "mouthClose"; + public const string MouthDimpleLeft = "mouthDimple_L"; + public const string MouthDimpleRight = "mouthDimple_R"; + public const string MouthFrownLeft = "mouthFrown_L"; + public const string MouthFrownRight = "mouthFrown_R"; + public const string MouthFunnel = "mouthFunnel"; + public const string MouthLeft = "mouthLeft"; + public const string MouthLowerDownLeft = "mouthLowerDown_L"; + public const string MouthLowerDownRight = "mouthLowerDown_R"; + public const string MouthPressLeft = "mouthPress_L"; + public const string MouthPressRight = "mouthPress_R"; + public const string MouthPucker = "mouthPucker"; + public const string MouthRight = "mouthRight"; + public const string MouthRollLower = "mouthRollLower"; + public const string MouthRollUpper = "mouthRollUpper"; + public const string MouthShrugLower = "mouthShrugLower"; + public const string MouthShrugUpper = "mouthShrugUpper"; + public const string MouthSmileLeft = "mouthSmile_L"; + public const string MouthSmileRight = "mouthSmile_R"; + public const string MouthStretchLeft = "mouthStretch_L"; + public const string MouthStretchRight = "mouthStretch_R"; + public const string MouthUpperUpLeft = "mouthUpperUp_L"; + public const string MouthUpperUpRight = "mouthUpperUp_R"; + public const string NoseSneerLeft = "noseSneer_L"; + public const string NoseSneerRight = "noseSneer_R"; + public const string TongueOut = "tongueOut"; + } + + + public struct UnityARFaceGeometry + { + public int vertexCount; + public IntPtr vertices; + public int textureCoordinateCount; + public IntPtr textureCoordinates; + public int triangleCount; + public IntPtr triangleIndices; + + } + + public struct UnityARFaceAnchorData + { + + public IntPtr ptrIdentifier; + + /** + The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. + */ + public UnityARMatrix4x4 transform; + + public string identifierStr { get { return Marshal.PtrToStringAuto(this.ptrIdentifier); } } + + public UnityARFaceGeometry faceGeometry; + public IntPtr blendShapes; + public UnityARMatrix4x4 leftEyeTransform; + public UnityARMatrix4x4 rightEyeTransform; + public Vector3 lookAtPoint; + public bool isTracked; //this is from the new ARTrackable protocol that ARFaceAnchor now subscribes to + } + + + #if !UNITY_EDITOR && UNITY_IOS + public class ARFaceGeometry + { + internal UnityARFaceGeometry uFaceGeometry { private get; set; } + + readonly Vector3[] m_Vertices; + readonly Vector2[] m_TextureCoordinates; + readonly int[] m_TriangleIndices; + readonly float[] m_WorkVertices; + readonly float[] m_WorkTextureCoordinates; + readonly short[] m_WorkIndices; //since ARKit returns Int16 + readonly int m_VertexCount; + readonly int m_TextureCoordinateCount; + readonly int m_TriangleCount; + readonly int m_IndexCount; + readonly int m_WorkVertexCount; + readonly int m_WorkTextureCoordinateCount; + + public ARFaceGeometry (UnityARFaceGeometry ufg) + { + uFaceGeometry = ufg; + m_VertexCount = ufg.vertexCount; + m_Vertices = new Vector3[m_VertexCount]; + m_WorkVertexCount = m_VertexCount * 4; + m_WorkVertices = new float[m_WorkVertexCount]; + m_TextureCoordinateCount = ufg.textureCoordinateCount; + m_TextureCoordinates = new Vector2[textureCoordinateCount]; + m_WorkTextureCoordinateCount = m_TextureCoordinateCount * 2; + m_WorkTextureCoordinates = new float[m_WorkTextureCoordinateCount]; + m_TriangleCount = ufg.triangleCount; + m_IndexCount = m_TriangleCount * 3; + m_TriangleIndices = new int[m_IndexCount]; + m_WorkIndices = new short[m_IndexCount]; + } + + public int vertexCount { get { return m_VertexCount; } } + public int triangleCount { get { return m_TriangleCount; } } + public int textureCoordinateCount { get { return m_TextureCoordinateCount; } } + + public Vector3 [] vertices { get { return MarshalVertices(uFaceGeometry.vertices); } } + + public Vector2 [] textureCoordinates { get { return MarshalTexCoords(uFaceGeometry.textureCoordinates); } } + + public int [] triangleIndices { get { return MarshalIndices(uFaceGeometry.triangleIndices); } } + + Vector3 [] MarshalVertices(IntPtr ptrFloatArray) + { + Marshal.Copy (ptrFloatArray, m_WorkVertices, 0, m_WorkVertexCount); + + for (var count = 0; count < m_WorkVertexCount; count++) + { + m_Vertices[count / 4].x = m_WorkVertices[count++]; + m_Vertices[count / 4].y = m_WorkVertices[count++]; + m_Vertices[count / 4].z = -m_WorkVertices[count++]; + } + + return m_Vertices; + } + + int [] MarshalIndices(IntPtr ptrIndices) + { + Marshal.Copy (ptrIndices, m_WorkIndices, 0, m_IndexCount); + + for (var count = 0; count < m_IndexCount; count+=3) { + //reverse winding order + m_TriangleIndices [count] = m_WorkIndices [count]; + m_TriangleIndices [count + 1] = m_WorkIndices [count + 2]; + m_TriangleIndices [count + 2] = m_WorkIndices [count + 1]; + } + + return m_TriangleIndices; + } + + Vector2 [] MarshalTexCoords(IntPtr ptrTexCoords) + { + Marshal.Copy (ptrTexCoords, m_WorkTextureCoordinates, 0, m_WorkTextureCoordinateCount); + + for (var count = 0; count < m_WorkTextureCoordinateCount; count++) + { + m_TextureCoordinates[count / 2].x = m_WorkTextureCoordinates[count++]; + m_TextureCoordinates[count / 2].y = m_WorkTextureCoordinates[count]; + } + + return m_TextureCoordinates; + } + } + + public class ARFaceAnchor + { + private UnityARFaceAnchorData faceAnchorData; + private static Dictionary blendshapesDictionary; + readonly ARFaceGeometry m_FaceGeometry; + + public ARFaceAnchor (UnityARFaceAnchorData ufad) + { + faceAnchorData = ufad; + m_FaceGeometry = new ARFaceGeometry(ufad.faceGeometry); + if (blendshapesDictionary == null) { + blendshapesDictionary = new Dictionary (); + } + } + + public void Update(UnityARFaceAnchorData ufad) + { + faceAnchorData = ufad; + m_FaceGeometry.uFaceGeometry = ufad.faceGeometry; + } + + + public string identifierStr { get { return faceAnchorData.identifierStr; } } + + public bool isTracked { get { return faceAnchorData.isTracked; } } + + public Matrix4x4 transform { + get { + Matrix4x4 matrix = new Matrix4x4 (); + matrix.SetColumn (0, faceAnchorData.transform.column0); + matrix.SetColumn (1, faceAnchorData.transform.column1); + matrix.SetColumn (2, faceAnchorData.transform.column2); + matrix.SetColumn (3, faceAnchorData.transform.column3); + return matrix; + } + } + + public Pose leftEyePose + { + get + { + Matrix4x4 anchorMat = UnityARMatrixOps.GetMatrix (faceAnchorData.transform); + Matrix4x4 eyeMat = UnityARMatrixOps.GetMatrix (faceAnchorData.leftEyeTransform); + Matrix4x4 worldEyeMat = anchorMat * eyeMat; + return UnityARMatrixOps.GetPose(worldEyeMat); + } + } + + public Pose rightEyePose + { + get + { + Matrix4x4 anchorMat = UnityARMatrixOps.GetMatrix (faceAnchorData.transform); + Matrix4x4 eyeMat = UnityARMatrixOps.GetMatrix (faceAnchorData.rightEyeTransform); + Matrix4x4 worldEyeMat = anchorMat * eyeMat; + return UnityARMatrixOps.GetPose(worldEyeMat); + } + } + + public Vector3 lookAtPoint + { + get + { + Matrix4x4 anchorMat = UnityARMatrixOps.GetMatrix (faceAnchorData.transform); + return anchorMat.MultiplyPoint3x4 (UnityARMatrixOps.GetPosition (faceAnchorData.lookAtPoint)); + } + } + + public ARFaceGeometry faceGeometry + { + get + { + m_FaceGeometry.uFaceGeometry = faceAnchorData.faceGeometry; + return m_FaceGeometry; + } + } + + public Dictionary blendShapes { get { return GetBlendShapesFromNative(faceAnchorData.blendShapes); } } + + delegate void DictionaryVisitorHandler(IntPtr keyPtr, float value); + + [DllImport("__Internal")] + private static extern void GetBlendShapesInfo(IntPtr ptrDic, DictionaryVisitorHandler handler); + + Dictionary GetBlendShapesFromNative(IntPtr blendShapesPtr) + { + blendshapesDictionary.Clear (); + GetBlendShapesInfo (blendShapesPtr, AddElementToManagedDictionary); + return blendshapesDictionary; + } + + [MonoPInvokeCallback(typeof(DictionaryVisitorHandler))] + static void AddElementToManagedDictionary(IntPtr keyPtr, float value) + { + string key = Marshal.PtrToStringAuto(keyPtr); + blendshapesDictionary.Add(key, value); + } + } + #endif +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFaceAnchor.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFaceAnchor.cs.meta new file mode 100644 index 00000000..02b97bc0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFaceAnchor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6bd5d00d33612415b85197cd523a21e6 +timeCreated: 1505528974 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFrame.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFrame.cs new file mode 100644 index 00000000..d8eb94ad --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFrame.cs @@ -0,0 +1,36 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public struct ARFrame + { + /** + A timestamp identifying the frame. + */ + public double timestamp; + + /** + The frame's captured image. + */ + public IntPtr capturedImage; + + /** + The camera used to capture the frame's image. + @discussion The camera provides the device's position and orientation as well as camera parameters. + */ + public ARCamera camera; + + /** + A list of anchors in the scene. + */ + //List anchors; + + /** + A light estimate representing the light in the scene. + @discussion Returns nil if there is no light estimation. + */ + ARLightEstimate lightEstimate; + + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFrame.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFrame.cs.meta new file mode 100644 index 00000000..98bf8772 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARFrame.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b8b915b5e16c84740b940efc7a7e2821 +timeCreated: 1492118050 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResult.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResult.cs new file mode 100644 index 00000000..08fa5aae --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResult.cs @@ -0,0 +1,40 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public struct ARHitTestResult + { + /** + The type of the hit-test result. + */ + public ARHitTestResultType type; + + /** + The distance from the camera to the intersection in meters. + */ + public double distance; + + /** + The transformation matrix that defines the intersection's rotation, translation and scale + relative to the anchor or nearest feature point. + */ + public Matrix4x4 localTransform; + + /** + The transformation matrix that defines the intersection's rotation, translation and scale + relative to the world. + */ + public Matrix4x4 worldTransform; + + /** + The anchor that the hit-test intersected. + */ + public string anchorIdentifier; + + /** + True if the test represents a valid hit test. Data is undefined otherwise. + */ + public bool isValid; + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResult.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResult.cs.meta new file mode 100644 index 00000000..0a61a15a --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResult.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 048b3fa7b70bb49689905314375cd7c3 +timeCreated: 1492121726 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResultType.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResultType.cs new file mode 100644 index 00000000..e6c01c83 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResultType.cs @@ -0,0 +1,28 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + [Flags] + public enum ARHitTestResultType : long + { + /** Result type from intersecting the nearest feature point. */ + ARHitTestResultTypeFeaturePoint = (1 << 0), + + /** A real-world planar surface detected by the search (without a corresponding anchor), whose orientation is perpendicular to gravity. */ + ARHitTestResultTypeEstimatedHorizontalPlane = (1 << 1), + + /** A real-world planar surface detected by the search, whose orientation is parallel to gravity. */ + ARHitTestResultTypeEstimatedVerticalPlane = (1 << 2), + + /** Result type from intersecting with an existing plane anchor. */ + ARHitTestResultTypeExistingPlane = (1 << 3), + + /** Result type from intersecting with an existing plane anchor, taking into account the plane's extent. */ + ARHitTestResultTypeExistingPlaneUsingExtent = ( 1 << 4), + + /** A plane anchor already in the scene (detected with the planeDetection option), respecting the plane's estimated size and shape. **/ + ARHitTestResultTypeExistingPlaneUsingGeometry = (1 << 5) + + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResultType.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResultType.cs.meta new file mode 100644 index 00000000..d1bb2f51 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResultType.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1d70fc085339c436b848c46340250a29 +timeCreated: 1492121726 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARImageAnchor.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARImageAnchor.cs new file mode 100644 index 00000000..05561d7f --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARImageAnchor.cs @@ -0,0 +1,60 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; +using System.Runtime.InteropServices; + + +namespace UnityEngine.XR.iOS +{ + + public struct UnityARImageAnchorData + { + + public IntPtr ptrIdentifier; + + /** + The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. + */ + public UnityARMatrix4x4 transform; + + public IntPtr referenceImageNamePtr; + + public float referenceImagePhysicalSize; + + public int isTracked; + + }; + + + + public class ARImageAnchor { + + private UnityARImageAnchorData imageAnchorData; + + public ARImageAnchor (UnityARImageAnchorData uiad) + { + imageAnchorData = uiad; + } + + + public string identifier { get { return Marshal.PtrToStringAuto(imageAnchorData.ptrIdentifier); } } + public bool isTracked { get {return imageAnchorData.isTracked != 0; } } + + public Matrix4x4 transform { + get { + Matrix4x4 matrix = new Matrix4x4 (); + matrix.SetColumn (0, imageAnchorData.transform.column0); + matrix.SetColumn (1, imageAnchorData.transform.column1); + matrix.SetColumn (2, imageAnchorData.transform.column2); + matrix.SetColumn (3, imageAnchorData.transform.column3); + return matrix; + } + } + + public string referenceImageName { get { return Marshal.PtrToStringAuto(imageAnchorData.referenceImageNamePtr); } } + + public float referenceImagePhysicalSize { get { return imageAnchorData.referenceImagePhysicalSize; } } + } + +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARImageAnchor.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARImageAnchor.cs.meta new file mode 100644 index 00000000..0edd9c58 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARImageAnchor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 888a393eca1cb4822ab6eb99ddaa0e9e +timeCreated: 1517602605 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitDefines.h b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitDefines.h new file mode 100644 index 00000000..2056a3a4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitDefines.h @@ -0,0 +1,438 @@ +// Unity Technologies Inc (c) 2017 +// ARKitDefines.h + +#import + + +typedef struct +{ + float x,y,z,w; +} UnityARVector4; + +typedef struct +{ + float x,y,z; +} UnityARVector3; + +typedef struct +{ + UnityARVector4 column0; + UnityARVector4 column1; + UnityARVector4 column2; + UnityARVector4 column3; +} UnityARMatrix4x4; + +enum UnityARAlignment +{ + UnityARAlignmentGravity, + UnityARAlignmentGravityAndHeading, + UnityARAlignmentCamera +}; + +enum UnityARPlaneDetection +{ + UnityARPlaneDetectionNone = 0, + UnityARPlaneDetectionHorizontal = (1 << 0), + UnityARPlaneDetectionVertical = (1 << 1) +}; + +enum UnityAREnvironmentTexturing +{ + UnityAREnvironmentTexturingNone, + UnityAREnvironmentTexturingManual, + UnityAREnvironmentTexturingAutomatic +}; + +typedef enum +{ + UnityARWorldMappingStatusNotAvailable, + UnityARWorldMappingStatusLimited, + UnityARWorldMappingStatusExtending, + UnityARWorldMappingStatusMapped +}UnityARWorldMappingStatus; + +typedef enum +{ + kUnityARKitSupportedFeaturesNone = 0, + kUnityARKitSupportedFeaturesWorldMap = 1 << 0, + kUnityARKitSupportedFeaturesReferenceObject = 1 << 1, +} UnityARKitSupportedFeatures; + +typedef struct +{ + UnityARAlignment alignment; + uint32_t getPointCloudData; + uint32_t enableLightEstimation; + +} ARKitSessionConfiguration; + +typedef struct +{ + UnityARAlignment alignment; + UnityARPlaneDetection planeDetection; + uint32_t getPointCloudData; + uint32_t enableLightEstimation; + uint32_t enableAutoFocus; + UnityAREnvironmentTexturing environmentTexturing; + int maximumNumberOfTrackedImages; + void *ptrVideoFormat; + char *referenceImagesResourceGroup; + char *referenceObjectsResourceGroup; + void *ptrDynamicReferenceObjects; + void *ptrWorldMap; +} ARKitWorldTrackingSessionConfiguration; + +typedef struct +{ + UnityARAlignment alignment; + uint32_t enableLightEstimation; + void *ptrVideoFormat; +} ARKitFaceTrackingConfiguration; + +enum UnityARSessionRunOptions +{ + UnityARSessionRunOptionsNone = 0, + UnityARSessionRunOptionResetTracking = (1 << 0), + UnityARSessionRunOptionRemoveExistingAnchors = (1 << 1) + +}; + +typedef struct +{ + NSUInteger vertexCount; + float *vertices; + NSUInteger textureCoordinateCount; + float *textureCoordinates; + NSUInteger triangleCount; + int *triangleIndices; + NSUInteger boundaryVertexCount; + float *boundaryVertices; +} UnityARPlaneGeometry; + + +typedef struct +{ + void* identifier; + UnityARMatrix4x4 transform; + ARPlaneAnchorAlignment alignment; + UnityARVector4 center; + UnityARVector4 extent; + UnityARPlaneGeometry planeGeometry; +} UnityARAnchorData; + +typedef struct +{ + void* identifier; + UnityARMatrix4x4 transform; +} UnityARUserAnchorData; + +typedef struct +{ + NSUInteger vertexCount; + float *vertices; + NSUInteger textureCoordinateCount; + float *textureCoordinates; + NSUInteger triangleCount; + int *triangleIndices; +} UnityARFaceGeometry; + +typedef struct +{ + void *identifier; + UnityARMatrix4x4 transform; + UnityARFaceGeometry faceGeometry; + void *blendShapes; //NSDictionary * + UnityARMatrix4x4 leftEyeTransform; + UnityARMatrix4x4 rightEyeTransform; + UnityARVector3 lookAtPoint; + uint32_t isTracked; +} UnityARFaceAnchorData; + +typedef struct +{ + void* identifier; + UnityARMatrix4x4 transform; + void* referenceImageName; + float referenceImageSize; + int isTracked; +} UnityARImageAnchorData; + + + +enum UnityARTrackingState +{ + UnityARTrackingStateNotAvailable, + UnityARTrackingStateLimited, + UnityARTrackingStateNormal, +}; + +enum UnityARTrackingReason +{ + UnityARTrackingStateReasonNone, + UnityARTrackingStateReasonInitializing, + UnityARTrackingStateReasonExcessiveMotion, + UnityARTrackingStateReasonInsufficientFeatures, + UnityARTrackingStateReasonRelocalizing, +}; + +typedef struct +{ + uint32_t yWidth; + uint32_t yHeight; + uint32_t screenOrientation; + float texCoordScale; + void* cvPixelBufferPtr; +}UnityVideoParams; + +typedef struct +{ + float ambientIntensity; + float ambientColorTemperature; +}UnityARLightEstimation; + +typedef struct +{ + UnityARVector4 primaryLightDirectionAndIntensity; + float *sphericalHarmonicsCoefficients; +}UnityARDirectionalLightEstimate; + +enum UnityLightDataType +{ + LightEstimate, + DirectionalLightEstimate +}; + +typedef struct +{ + UnityLightDataType arLightingType; + UnityARLightEstimation arLightEstimate; + UnityARDirectionalLightEstimate arDirectionalLightEstimate; +}UnityLightData; + +typedef struct +{ + UnityARMatrix4x4 worldTransform; + UnityARMatrix4x4 projectionMatrix; + UnityARTrackingState trackingState; + UnityARTrackingReason trackingReason; + UnityVideoParams videoParams; + UnityLightData lightData; + UnityARMatrix4x4 displayTransform; + void* ptrPointCloud; + uint32_t getLightEstimation; + UnityARWorldMappingStatus worldMappingStatus; +} UnityARCamera; + +typedef struct +{ + vector_float3* pointCloud; + NSUInteger pointCloudSize; +} UnityARPointCloudData; + +typedef struct +{ + void* pYPixelBytes; + void* pUVPixelBytes; + BOOL bEnable; +}UnityPixelBuffer; + +typedef struct +{ + void* ptrVideoFormat; + float imageResolutionWidth; + float imageResolutionHeight; + int framesPerSecond; +}UnityARVideoFormat; + +typedef void (*UNITY_AR_FRAME_CALLBACK)(UnityARCamera camera); +typedef void (*UNITY_AR_ANCHOR_CALLBACK)(UnityARAnchorData anchorData); +typedef void (*UNITY_AR_USER_ANCHOR_CALLBACK)(UnityARUserAnchorData anchorData); +typedef void (*UNITY_AR_FACE_ANCHOR_CALLBACK)(UnityARFaceAnchorData anchorData); +typedef void (*UNITY_AR_IMAGE_ANCHOR_CALLBACK)(UnityARImageAnchorData anchorData); +typedef void (*UNITY_AR_SESSION_FAILED_CALLBACK)(const void* error); +typedef void (*UNITY_AR_SESSION_VOID_CALLBACK)(void); +typedef bool (*UNITY_AR_SESSION_RELOCALIZE_CALLBACK)(void); +typedef void (*UNITY_AR_SESSION_TRACKING_CHANGED)(UnityARCamera camera); +typedef void (*UNITY_AR_VIDEOFORMAT_CALLBACK)(UnityARVideoFormat format); +typedef void (*UNITY_AR_SESSION_WORLD_MAP_COMPLETION_CALLBACK)(const void*, void*); +typedef void (*UNITY_AR_SESSION_REF_OBJ_EXTRACT_COMPLETION_CALLBACK)(const void*, void*); + +@protocol UnityARAnchorEventDispatcher +@required + -(void)sendAnchorAddedEvent:(ARAnchor*)anchor; + -(void)sendAnchorRemovedEvent:(ARAnchor*)anchor; + -(void)sendAnchorUpdatedEvent:(ARAnchor*)anchor; +@end + +@interface UnityARSession : NSObject +{ +@public + ARSession* _session; + UNITY_AR_FRAME_CALLBACK _frameCallback; + UNITY_AR_SESSION_FAILED_CALLBACK _arSessionFailedCallback; + UNITY_AR_SESSION_VOID_CALLBACK _arSessionInterrupted; + UNITY_AR_SESSION_VOID_CALLBACK _arSessionInterruptionEnded; + UNITY_AR_SESSION_RELOCALIZE_CALLBACK _arSessionShouldRelocalize; + UNITY_AR_SESSION_TRACKING_CHANGED _arSessionTrackingChanged; + UNITY_AR_SESSION_WORLD_MAP_COMPLETION_CALLBACK _arSessionWorldMapCompletionHandler; + UNITY_AR_SESSION_REF_OBJ_EXTRACT_COMPLETION_CALLBACK _arSessionRefObjExtractCompletionHandler; + + NSMutableDictionary* _classToCallbackMap; + + id _device; + CVMetalTextureCacheRef _textureCache; + BOOL _getPointCloudData; + BOOL _getLightEstimation; +} +- (void) setupMetal; +@end + + +static inline bool UnityIsARKit_1_5_Supported() +{ + if (@available(iOS 11.3, *)) + { + return [ARImageAnchor class]; + } + else + { + return false; + } +} + +static inline bool UnityAreFeaturesSupported(int features) +{ + bool featuresSupported = true; + if (features & kUnityARKitSupportedFeaturesWorldMap) + { + if (@available(iOS 12.0, *)) + { + featuresSupported &= (bool)[ARWorldMap class]; + } + else + { + featuresSupported = false; + } + } + if (features & kUnityARKitSupportedFeaturesReferenceObject) + { + if (@available(iOS 12.0, *)) + { + featuresSupported &= (bool)[ARReferenceObject class]; + } + else + { + featuresSupported = false; + } + } + + return featuresSupported; +} + +static inline bool UnityIsARKit_2_0_Supported() +{ + if (@available(iOS 12.0, *)) + { + if ([ARReferenceObject class]) + { + return true; + } + else + { + return false; + } + } + else + { + return false; + } +} + +inline void ARKitMatrixToUnityARMatrix4x4(const matrix_float4x4& matrixIn, UnityARMatrix4x4* matrixOut) +{ + vector_float4 c0 = matrixIn.columns[0]; + matrixOut->column0.x = c0.x; + matrixOut->column0.y = c0.y; + matrixOut->column0.z = c0.z; + matrixOut->column0.w = c0.w; + + vector_float4 c1 = matrixIn.columns[1]; + matrixOut->column1.x = c1.x; + matrixOut->column1.y = c1.y; + matrixOut->column1.z = c1.z; + matrixOut->column1.w = c1.w; + + vector_float4 c2 = matrixIn.columns[2]; + matrixOut->column2.x = c2.x; + matrixOut->column2.y = c2.y; + matrixOut->column2.z = c2.z; + matrixOut->column2.w = c2.w; + + vector_float4 c3 = matrixIn.columns[3]; + matrixOut->column3.x = c3.x; + matrixOut->column3.y = c3.y; + matrixOut->column3.z = c3.z; + matrixOut->column3.w = c3.w; +} + +inline void UnityARMatrix4x4ToARKitMatrix(const UnityARMatrix4x4& matrixIn, matrix_float4x4* matrixOut) +{ + matrixOut->columns[0].x = matrixIn.column0.x; + matrixOut->columns[0].y = matrixIn.column0.y; + matrixOut->columns[0].z = matrixIn.column0.z; + matrixOut->columns[0].w = matrixIn.column0.w; + + matrixOut->columns[1].x = matrixIn.column1.x; + matrixOut->columns[1].y = matrixIn.column1.y; + matrixOut->columns[1].z = matrixIn.column1.z; + matrixOut->columns[1].w = matrixIn.column1.w; + + matrixOut->columns[2].x = matrixIn.column2.x; + matrixOut->columns[2].y = matrixIn.column2.y; + matrixOut->columns[2].z = matrixIn.column2.z; + matrixOut->columns[2].w = matrixIn.column2.w; + + matrixOut->columns[3].x = matrixIn.column3.x; + matrixOut->columns[3].y = matrixIn.column3.y; + matrixOut->columns[3].z = matrixIn.column3.z; + matrixOut->columns[3].w = matrixIn.column3.w; +} + +inline ARSessionRunOptions GetARSessionRunOptionsFromUnityARSessionRunOptions(UnityARSessionRunOptions runOptions) +{ + ARSessionRunOptions ret = 0; + if ((runOptions & UnityARSessionRunOptionResetTracking) != 0) + ret |= ARSessionRunOptionResetTracking; + if ((runOptions & UnityARSessionRunOptionRemoveExistingAnchors) != 0) + ret |= ARSessionRunOptionRemoveExistingAnchors; + return ret; +} + +static inline ARWorldAlignment GetARWorldAlignmentFromUnityARAlignment(UnityARAlignment& unityAlignment) +{ + switch (unityAlignment) + { + case UnityARAlignmentGravity: + return ARWorldAlignmentGravity; + case UnityARAlignmentGravityAndHeading: + return ARWorldAlignmentGravityAndHeading; + case UnityARAlignmentCamera: + return ARWorldAlignmentCamera; + } +} + +static inline ARPlaneDetection GetARPlaneDetectionFromUnityARPlaneDetection(UnityARPlaneDetection planeDetection) +{ + ARPlaneDetection ret = ARPlaneDetectionNone; + if ((planeDetection & UnityARPlaneDetectionNone) != 0) + ret |= ARPlaneDetectionNone; + if ((planeDetection & UnityARPlaneDetectionHorizontal) != 0) + ret |= ARPlaneDetectionHorizontal; + if ((planeDetection & UnityARPlaneDetectionVertical) != 0) + { + if (@available(iOS 11.3, *)) { + ret |= ARPlaneDetectionVertical; + } + } + return ret; +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitDefines.h.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitDefines.h.meta new file mode 100644 index 00000000..7c1a4900 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitDefines.h.meta @@ -0,0 +1,26 @@ +fileFormatVersion: 2 +guid: cb098dfd51a5146d186aa9e1dbf3b436 +timeCreated: 1523480290 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitNativeObjectDetection.mm b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitNativeObjectDetection.mm new file mode 100644 index 00000000..f5a76777 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitNativeObjectDetection.mm @@ -0,0 +1,427 @@ +// Unity Technologies Inc (c) 2018 +// ARKitNativeObjectDetection.mm +// Main implementation of ARKit plugin object detection + + +#include "ARKitDefines.h" + + +bool referenceObject_GetSupported() +{ + return UnityAreFeaturesSupported(kUnityARKitSupportedFeaturesReferenceObject); +} + +typedef struct +{ + void* identifier; + UnityARMatrix4x4 transform; + void* referenceObjectName; + void* referenceObjectPtr; +} UnityARObjectAnchorData; + +typedef struct +{ + UnityARAlignment alignment; + UnityARPlaneDetection planeDetection; + uint32_t enableLightEstimation; + uint32_t enableAutoFocus; + uint32_t getPointCloudData; +} ARKitObjectScanningSessionConfiguration; + +API_AVAILABLE(ios(12.0)) +inline void UnityARObjectAnchorDataFromARObjectAnchorPtr(UnityARObjectAnchorData& anchorData, ARObjectAnchor* nativeAnchor) +{ + anchorData.identifier = (void*)[nativeAnchor.identifier.UUIDString UTF8String]; + ARKitMatrixToUnityARMatrix4x4(nativeAnchor.transform, &anchorData.transform); + anchorData.referenceObjectName = (void*)[nativeAnchor.referenceObject.name UTF8String]; + anchorData.referenceObjectPtr = (__bridge void*) nativeAnchor.referenceObject; +} + +API_AVAILABLE(ios(12.0)) +inline void GetARSessionConfigurationFromARKitObjectScanningSessionConfiguration(ARKitObjectScanningSessionConfiguration& unityConfig, ARObjectScanningConfiguration* appleConfig) +{ + appleConfig.planeDetection = GetARPlaneDetectionFromUnityARPlaneDetection(unityConfig.planeDetection); + appleConfig.worldAlignment = GetARWorldAlignmentFromUnityARAlignment(unityConfig.alignment); + appleConfig.lightEstimationEnabled = (BOOL)unityConfig.enableLightEstimation; + + if (UnityIsARKit_2_0_Supported()) + { + appleConfig.autoFocusEnabled = (BOOL) unityConfig.enableAutoFocus; + } +} + +typedef void (*UNITY_AR_OBJECT_ANCHOR_CALLBACK)(UnityARObjectAnchorData anchorData); + + +@interface UnityARObjectAnchorCallbackWrapper : NSObject +{ +@public + UNITY_AR_OBJECT_ANCHOR_CALLBACK _anchorAddedCallback; + UNITY_AR_OBJECT_ANCHOR_CALLBACK _anchorUpdatedCallback; + UNITY_AR_OBJECT_ANCHOR_CALLBACK _anchorRemovedCallback; +} +@end + +@implementation UnityARObjectAnchorCallbackWrapper + +-(void)sendAnchorAddedEvent:(ARAnchor*)anchor +{ + UnityARObjectAnchorData data; + if (@available(iOS 12.0, *)) + { + UnityARObjectAnchorDataFromARObjectAnchorPtr(data, (ARObjectAnchor*)anchor); + } + _anchorAddedCallback(data); +} + +-(void)sendAnchorRemovedEvent:(ARAnchor*)anchor +{ + UnityARObjectAnchorData data; + if (@available(iOS 12.0, *)) + { + UnityARObjectAnchorDataFromARObjectAnchorPtr(data, (ARObjectAnchor*)anchor); + } + _anchorRemovedCallback(data); +} + +-(void)sendAnchorUpdatedEvent:(ARAnchor*)anchor +{ + UnityARObjectAnchorData data; + if (@available(iOS 12.0, *)) + { + UnityARObjectAnchorDataFromARObjectAnchorPtr(data, (ARObjectAnchor*)anchor); + } + _anchorUpdatedCallback(data); +} + +@end + +extern "C" void session_SetObjectAnchorCallbacks(const void* session, UNITY_AR_OBJECT_ANCHOR_CALLBACK objectAnchorAddedCallback, + UNITY_AR_OBJECT_ANCHOR_CALLBACK objectAnchorUpdatedCallback, + UNITY_AR_OBJECT_ANCHOR_CALLBACK objectAnchorRemovedCallback) +{ + if (UnityIsARKit_2_0_Supported()) + { + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + UnityARObjectAnchorCallbackWrapper* objectAnchorCallbacks = [[UnityARObjectAnchorCallbackWrapper alloc] init]; + objectAnchorCallbacks->_anchorAddedCallback = objectAnchorAddedCallback; + objectAnchorCallbacks->_anchorUpdatedCallback = objectAnchorUpdatedCallback; + objectAnchorCallbacks->_anchorRemovedCallback = objectAnchorRemovedCallback; + if (@available(iOS 12.0, *)) + { + [nativeSession->_classToCallbackMap setObject:objectAnchorCallbacks forKey:[ARObjectAnchor class]]; + } + } +} + +#ifdef __cplusplus +extern "C" { +#endif + +bool IsARKitObjectScanningConfigurationSupported() +{ + if (@available(iOS 12.0, *)) + { + return ARObjectScanningConfiguration.isSupported; + } + else + { + // Fallback on earlier versions + return false; + } +} + +void StartObjectScanningSessionWithOptions(void* nativeSession, ARKitObjectScanningSessionConfiguration unityConfig, UnityARSessionRunOptions runOptions) +{ + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + ARSessionRunOptions runOpts = GetARSessionRunOptionsFromUnityARSessionRunOptions(runOptions); + session->_getLightEstimation = (BOOL) unityConfig.enableLightEstimation; + session->_getPointCloudData = (BOOL) unityConfig.getPointCloudData; + if (@available(iOS 12.0, *)) + { + ARObjectScanningConfiguration* config = [ARObjectScanningConfiguration new]; + GetARSessionConfigurationFromARKitObjectScanningSessionConfiguration(unityConfig, config); + if (runOptions == UnityARSessionRunOptionsNone) + [session->_session runWithConfiguration:config]; + else + [session->_session runWithConfiguration:config options:runOpts]; + } + else + { + // Fallback on earlier versions + NSLog(@"ARKit error: your device does not support ARKit 2.0"); + return; + } + + [session setupMetal]; +} + + + + +bool referenceObject_ExportObjectToURL(const void* ptr, const char* path) +{ + if (ptr == nullptr || path == nullptr) + return false; + + if (@available(iOS 12.0, *)) + { + NSError* error = nil; + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)ptr; + NSURL* url = [[NSURL alloc] initFileURLWithPath:[NSString stringWithUTF8String:path] isDirectory:false]; + [referenceObject exportObjectToURL:url previewImage:nil error:&error]; + + if (error) + NSLog(@"%@", error); + + return (error == nil); + } + else + { + // Fallback on earlier versions + return false; + } +} + +bool referenceObject_Save(const void* referenceObjectPtr, const char* path) +{ + if (referenceObjectPtr == nullptr || path == nullptr || !referenceObject_GetSupported()) + return false; + + if (@available(iOS 12.0, *)) + { + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)referenceObjectPtr; + NSError* writeError = nil; + NSURL* url = [[NSURL alloc] initFileURLWithPath:[NSString stringWithUTF8String:path] isDirectory:false]; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:referenceObject]; + [data writeToURL:url options:(NSDataWritingAtomic) error:&writeError]; + + if (writeError) + NSLog(@"%@", writeError); + + return (writeError == nil); + } + else + { + // Fallback on earlier versions + return false; + } +} + +void* referenceObject_Load(const char* path) +{ + if (!referenceObject_GetSupported()) + return nullptr; + + if (@available(iOS 12.0, *)) + { + NSError* error = nil; + NSURL* url = [[NSURL alloc] initFileURLWithPath:[NSString stringWithUTF8String:path] isDirectory:false]; + NSData *rodata = [NSData dataWithContentsOfURL:url options:NSDataReadingMappedAlways error:&error]; + + if (error) + NSLog(@"%@", error); + + ARReferenceObject* referenceObject = [NSKeyedUnarchiver unarchiveObjectWithData:rodata]; + + return (__bridge_retained void*)referenceObject; + } + else + { + // Fallback on earlier versions + return nullptr; + } +} + +void* referenceObject_InitWithArchiveUrl(const char* path) +{ + if (!referenceObject_GetSupported()) + return nullptr; + + if (@available(iOS 12.0, *)) + { + NSError* error = nil; + NSURL* url = [[NSURL alloc] initFileURLWithPath:[NSString stringWithUTF8String:path] isDirectory:false]; + + ARReferenceObject* referenceObject = [[ARReferenceObject alloc] initWithArchiveURL:url error:&error]; + + if (error) + NSLog(@"%@", error); + + return (__bridge_retained void*)referenceObject; + } + else + { + // Fallback on earlier versions + return nullptr; + } +} + +long referenceObject_SerializedLength(const void* referenceObjectPtr) +{ + if (@available(iOS 12.0, *)) + { + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)referenceObjectPtr; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:referenceObject]; + return data.length; + } + else + { + // Fallback on earlier versions + return 0; + } +} + +void referenceObject_SerializeToByteArray(const void* referenceObjectPtr, void* pinnedArray) +{ + if (@available(iOS 12.0, *)) + { + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)referenceObjectPtr; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:referenceObject]; + memcpy(pinnedArray, data.bytes, data.length); + } +} + +void* referenceObject_SerializeFromByteArray(const void* pinnedArray, long lengthBytes) +{ + + if (@available(iOS 12.0, *)) + { + NSData *rodata = [NSData dataWithBytes:pinnedArray length:lengthBytes]; + ARReferenceObject* referenceObject = [NSKeyedUnarchiver unarchiveObjectWithData:rodata]; + return (__bridge_retained void*)referenceObject; + } + else + { + // Fallback on earlier versions + return nullptr; + } + +} + +UnityARVector3 referenceObject_GetCenter(const void* ptr) +{ + if (ptr == nullptr) + return UnityARVector3{0, 0, 0}; + + if (@available(iOS 12.0, *)) + { + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)ptr; + return UnityARVector3 + { + referenceObject.center.x, + referenceObject.center.y, + referenceObject.center.z + }; + } + else + { + // Fallback on earlier versions + return UnityARVector3{0, 0, 0}; + } +} + +UnityARVector3 referenceObject_GetExtent(const void* ptr) +{ + if (ptr == nullptr) + return UnityARVector3{0, 0, 0}; + + if (@available(iOS 12.0, *)) + { + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)ptr; + return UnityARVector3 + { + referenceObject.extent.x, + referenceObject.extent.y, + referenceObject.extent.z + }; + } + else + { + // Fallback on earlier versions + return UnityARVector3{0, 0, 0}; + } +} + +void referenceObject_SetName(void* ptr, const char* name) +{ + if (ptr == nullptr) + return; + + if (@available(iOS 12.0, *)) + { + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)ptr; + referenceObject.name = [[NSString alloc] initWithUTF8String:name]; + } +} + +const char* referenceObject_GetName(void* ptr) +{ + if (ptr == nullptr) + return nullptr; + + if (@available(iOS 12.0, *)) + { + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)ptr; + const char* nameAsCStr = [referenceObject.name UTF8String]; + // Make a copy because IL2CPP is going to try to free what we return + const size_t length = strlen(nameAsCStr); + char* retVal = (char*)malloc(length + 1); + strcpy(retVal, nameAsCStr); + + return retVal; + } + else + { + // Fallback on earlier versions + return nullptr; + } +} + +void* referenceObject_GetPointCloud(const void* referenceObjectPtr) +{ + if (referenceObjectPtr == nullptr || !UnityAreFeaturesSupported(kUnityARKitSupportedFeaturesReferenceObject)) + return nullptr; + + if (@available(iOS 12.0, *)) + { + ARReferenceObject* referenceObject = (__bridge ARReferenceObject*)referenceObjectPtr; + ARPointCloud *pointCloud = [referenceObject rawFeaturePoints]; + + return (__bridge_retained void*)pointCloud; + } + else + { + // Fallback on earlier versions + return nullptr; + } + +} + +void* referenceObjectsSet_Create() +{ + if (@available(iOS 12.0, *)) + { + NSMutableSet *referenceObjectsSet = [[NSMutableSet alloc] init]; + return (__bridge_retained void*) referenceObjectsSet; + } + else + { + // Fallback on earlier versions + return nullptr; + } +} + +void referenceObjectsSet_AddReferenceObject(void* roSet, void* referenceObject) +{ + if (@available(iOS 12.0, *)) + { + NSMutableSet *referenceObjectsSet = (__bridge NSMutableSet *)roSet; + ARReferenceObject* refObject = (__bridge ARReferenceObject*)referenceObject; + [referenceObjectsSet addObject:refObject]; + } +} + +#ifdef __cplusplus +} +#endif diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitNativeObjectDetection.mm.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitNativeObjectDetection.mm.meta new file mode 100644 index 00000000..642a2cb2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARKitNativeObjectDetection.mm.meta @@ -0,0 +1,36 @@ +fileFormatVersion: 2 +guid: 67437c6ef9878443fad06dce00c3ee2d +timeCreated: 1523480290 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + - first: + tvOS: tvOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARLightEstimate.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARLightEstimate.cs new file mode 100644 index 00000000..3cf9a7ee --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARLightEstimate.cs @@ -0,0 +1,142 @@ +using System; +using System.Runtime.InteropServices; + +namespace UnityEngine.XR.iOS +{ + public struct ARLightEstimate + { + public float ambientIntensity; + } + + [Serializable] + public struct UnityARLightEstimate + { + public float ambientIntensity; + public float ambientColorTemperature; + + public UnityARLightEstimate(float intensity, float temperature) + { + ambientIntensity = intensity; + ambientColorTemperature = temperature; + } + }; + + + public struct MarshalDirectionalLightEstimate + { + public Vector4 primaryDirAndIntensity; + public IntPtr sphericalHarmonicCoefficientsPtr; + + public float [] SphericalHarmonicCoefficients { get { return MarshalCoefficients(sphericalHarmonicCoefficientsPtr); } } + + float [] MarshalCoefficients(IntPtr ptrFloats) + { + int numFloats = 27; + float [] workCoefficients = new float[numFloats]; + Marshal.Copy (ptrFloats, workCoefficients, 0, (int)(numFloats)); + RotateForUnity (ref workCoefficients, 0); + RotateForUnity (ref workCoefficients, 9); + RotateForUnity (ref workCoefficients, 18); + return workCoefficients; + + } + + void RotateForUnity(ref float[] shc, int startIndex) + { + //from observation, it looks like top, bottom and left,right are flipped (x,y) + + // we got this info: + // Lets assume Unity uses the same convention for spherical harmonics (yzx) wrt its own coordinate system as scenekit. + // (This could be another source of error). + // To tackle a constant transform between the unity and scenekit world coordinate system conventions: + + // Axis flips work as follows for the 9 components of the sh vector: + + // 0-component: no change + + // 1-component: negate if y is supposed to be flipped + // 2-component: negate if z is supposed to be flipped + // 3-component: negate if x is supposed to be flipped + + // 4-component: negate if x or y are supposed to be flipped, but not both! + // 5-component: negate if y or z are supposed to be flipped, but not both! + // 6-component: no change + // 7-component: negate if x or z are supposed to be flipped, but not both! + // 8-component: no change + + shc [startIndex+1] = -shc [startIndex+1]; + shc [startIndex+3] = -shc [startIndex+3]; + + shc [startIndex + 5] = -shc [startIndex + 5]; + shc [startIndex + 7] = -shc [startIndex + 7]; + + + } + } + + public class UnityARDirectionalLightEstimate + { + public Vector3 primaryLightDirection; + public float primaryLightIntensity; + public float [] sphericalHarmonicsCoefficients; + + public UnityARDirectionalLightEstimate (float [] SHC, Vector3 direction, float intensity) + { + sphericalHarmonicsCoefficients = SHC; + primaryLightDirection = direction; + primaryLightIntensity = intensity; + } + }; + + public enum LightDataType + { + LightEstimate, + DirectionalLightEstimate + } + + public struct UnityMarshalLightData + { + public LightDataType arLightingType; + public UnityARLightEstimate arLightEstimate; + public MarshalDirectionalLightEstimate arDirectonalLightEstimate; + + public UnityMarshalLightData(LightDataType ldt, UnityARLightEstimate ule, MarshalDirectionalLightEstimate mdle) + { + arLightingType = ldt; + arLightEstimate = ule; + arDirectonalLightEstimate = mdle; + } + + public static implicit operator UnityARLightData(UnityMarshalLightData rValue) + { + UnityARDirectionalLightEstimate udle = null; + if (rValue.arLightingType == LightDataType.DirectionalLightEstimate) { + Vector4 lightDirAndIntensity = rValue.arDirectonalLightEstimate.primaryDirAndIntensity; + Vector3 lightDir = new Vector3 (lightDirAndIntensity.x, lightDirAndIntensity.y, lightDirAndIntensity.z); + float[] shc = rValue.arDirectonalLightEstimate.SphericalHarmonicCoefficients; + udle = new UnityARDirectionalLightEstimate (shc, lightDir, lightDirAndIntensity.w); + } + return new UnityARLightData(rValue.arLightingType, rValue.arLightEstimate, udle); + } + + } + + public struct UnityARLightData + { + public LightDataType arLightingType; + public UnityARLightEstimate arLightEstimate; + public UnityARDirectionalLightEstimate arDirectonalLightEstimate; + + public UnityARLightData(LightDataType ldt, UnityARLightEstimate ule, UnityARDirectionalLightEstimate udle) + { + arLightingType = ldt; + arLightEstimate = ule; + arDirectonalLightEstimate = udle; + } + + + } + + +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARLightEstimate.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARLightEstimate.cs.meta new file mode 100644 index 00000000..32eceeb1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARLightEstimate.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c1f2e6c89195544de943f77cd419d81d +timeCreated: 1492118050 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARObjectAnchor.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARObjectAnchor.cs new file mode 100644 index 00000000..eb81656e --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARObjectAnchor.cs @@ -0,0 +1,121 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; +using System.Runtime.InteropServices; +using AOT; + + +namespace UnityEngine.XR.iOS +{ + + public struct UnityARObjectAnchorData + { + + public IntPtr ptrIdentifier; + + /** + The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. + */ + public UnityARMatrix4x4 transform; + + public IntPtr referenceObjectNamePtr; + + public IntPtr referenceObjectPtr; + + }; + + + + public class ARObjectAnchor { + + private UnityARObjectAnchorData objectAnchorData; + + public ARObjectAnchor (UnityARObjectAnchorData uiad) + { + objectAnchorData = uiad; + } + + + public string identifier { get { return Marshal.PtrToStringAuto(objectAnchorData.ptrIdentifier); } } + + public Matrix4x4 transform { + get { + Matrix4x4 matrix = new Matrix4x4 (); + matrix.SetColumn (0, objectAnchorData.transform.column0); + matrix.SetColumn (1, objectAnchorData.transform.column1); + matrix.SetColumn (2, objectAnchorData.transform.column2); + matrix.SetColumn (3, objectAnchorData.transform.column3); + return matrix; + } + } + + public string referenceObjectName { get { return Marshal.PtrToStringAuto(objectAnchorData.referenceObjectNamePtr); } } + + public IntPtr referenceObjectPtr { get { return objectAnchorData.referenceObjectPtr; } } + } + + public partial class UnityARSessionNativeInterface + { + // Object Anchors + public delegate void ARObjectAnchorAdded(ARObjectAnchor anchorData); + public static event ARObjectAnchorAdded ARObjectAnchorAddedEvent; + + public delegate void ARObjectAnchorUpdated(ARObjectAnchor anchorData); + public static event ARObjectAnchorUpdated ARObjectAnchorUpdatedEvent; + + public delegate void ARObjectAnchorRemoved(ARObjectAnchor anchorData); + public static event ARObjectAnchorRemoved ARObjectAnchorRemovedEvent; + + + delegate void internal_ARObjectAnchorAdded(UnityARObjectAnchorData anchorData); + delegate void internal_ARObjectAnchorUpdated(UnityARObjectAnchorData anchorData); + delegate void internal_ARObjectAnchorRemoved(UnityARObjectAnchorData anchorData); + + #if !UNITY_EDITOR && UNITY_IOS + + #region Object Anchors + [MonoPInvokeCallback(typeof(internal_ARObjectAnchorAdded))] + static void _object_anchor_added(UnityARObjectAnchorData anchor) + { + if (ARObjectAnchorAddedEvent != null) + { + ARObjectAnchor arObjectAnchor = new ARObjectAnchor(anchor); + ARObjectAnchorAddedEvent(arObjectAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARObjectAnchorUpdated))] + static void _object_anchor_updated(UnityARObjectAnchorData anchor) + { + if (ARObjectAnchorUpdatedEvent != null) + { + ARObjectAnchor arObjectAnchor = new ARObjectAnchor(anchor); + ARObjectAnchorUpdatedEvent(arObjectAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARObjectAnchorRemoved))] + static void _object_anchor_removed(UnityARObjectAnchorData anchor) + { + if (ARObjectAnchorRemovedEvent != null) + { + ARObjectAnchor arObjectAnchor = new ARObjectAnchor(anchor); + ARObjectAnchorRemovedEvent(arObjectAnchor); + } + } + #endregion + + [DllImport("__Internal")] + private static extern void session_SetObjectAnchorCallbacks(IntPtr nativeSession, internal_ARObjectAnchorAdded objectAnchorAddedCallback, + internal_ARObjectAnchorUpdated objectAnchorUpdatedCallback, + internal_ARObjectAnchorRemoved objectAnchorRemovedCallback); + + #endif //!UNITY_EDITOR && UNITY_IOS + + + + + } + +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARObjectAnchor.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARObjectAnchor.cs.meta new file mode 100644 index 00000000..328677e2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARObjectAnchor.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 20970700c094d433b93c5c92fca49947 +timeCreated: 1523482805 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchor.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchor.cs new file mode 100644 index 00000000..3ead891d --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchor.cs @@ -0,0 +1,177 @@ +using System; +using System.Runtime.InteropServices; + +namespace UnityEngine.XR.iOS +{ + + public struct UnityARPlaneGeometry + { + public int vertexCount; + public IntPtr vertices; + public int textureCoordinateCount; + public IntPtr textureCoordinates; + public int triangleCount; + public IntPtr triangleIndices; + public int boundaryVertexCount; + public IntPtr boundaryVertices; + + } + + public struct UnityARAnchorData + { + public IntPtr ptrIdentifier; + + /** + The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. + */ + public UnityARMatrix4x4 transform; + + /** + The alignment of the plane. + */ + + public ARPlaneAnchorAlignment alignment; + + /** + The center of the plane in the anchor’s coordinate space. + */ + + public Vector4 center; + + /** + The extent of the plane in the anchor’s coordinate space. + */ + public Vector4 extent; + + /** + The geometry that describes more accurately the surface found. + */ + public UnityARPlaneGeometry planeGeometry; + } + + +#if !UNITY_EDITOR + public class ARPlaneGeometry + { + private UnityARPlaneGeometry uPlaneGeometry; + + public ARPlaneGeometry (UnityARPlaneGeometry upg) + { + uPlaneGeometry = upg; + } + + public int vertexCount { get { return uPlaneGeometry.vertexCount; } } + public int triangleCount { get { return uPlaneGeometry.triangleCount; } } + public int textureCoordinateCount { get { return uPlaneGeometry.textureCoordinateCount; } } + public int boundaryVertexCount { get { return uPlaneGeometry.boundaryVertexCount; } } + + public Vector3 [] vertices { get { return MarshalVertices(uPlaneGeometry.vertices,vertexCount); } } + + public Vector3 [] boundaryVertices { get { return MarshalVertices(uPlaneGeometry.boundaryVertices,boundaryVertexCount); } } + + public Vector2 [] textureCoordinates { get { return MarshalTexCoords(uPlaneGeometry.textureCoordinates, textureCoordinateCount); } } + + public int [] triangleIndices { get { return MarshalIndices(uPlaneGeometry.triangleIndices, triangleCount); } } + + Vector3 [] MarshalVertices(IntPtr ptrFloatArray, int vertCount) + { + int numFloats = vertCount * 4; + float [] workVerts = new float[numFloats]; + Marshal.Copy (ptrFloatArray, workVerts, 0, (int)(numFloats)); + + Vector3[] verts = new Vector3[vertCount]; + + for (int count = 0; count < numFloats; count++) + { + verts [count / 4].x = workVerts[count++]; + verts [count / 4].y = workVerts[count++]; + verts [count / 4].z = -workVerts[count++]; + } + + return verts; + } + + int [] MarshalIndices(IntPtr ptrIndices, int triCount) + { + int numIndices = triCount * 3; + short [] workIndices = new short[numIndices]; //since ARKit returns Int16 + Marshal.Copy (ptrIndices, workIndices, 0, numIndices); + + int[] triIndices = new int[numIndices]; + for (int count = 0; count < numIndices; count+=3) { + //reverse winding order + triIndices [count] = workIndices [count]; + triIndices [count + 1] = workIndices [count + 2]; + triIndices [count + 2] = workIndices [count + 1]; + } + + return triIndices; + } + + Vector2 [] MarshalTexCoords(IntPtr ptrTexCoords, int texCoordCount) + { + int numFloats = texCoordCount * 2; + float [] workTexCoords = new float[numFloats]; + Marshal.Copy (ptrTexCoords, workTexCoords, 0, (int)(numFloats)); + + Vector2[] texCoords = new Vector2[texCoordCount]; + + for (int count = 0; count < numFloats; count++) + { + texCoords [count / 2].x = workTexCoords[count++]; + texCoords [count / 2].y = workTexCoords[count]; + } + + return texCoords; + + } + } + + public class ARPlaneAnchor + { + private UnityARAnchorData planeAnchorData; + + public string identifierStr { get; } + public string identifier { get { return identifierStr; } } + + public ARPlaneAnchor (UnityARAnchorData ufad) + { + planeAnchorData = ufad; + identifierStr = Marshal.PtrToStringAuto(planeAnchorData.ptrIdentifier); + } + + public Matrix4x4 transform { + get { + Matrix4x4 matrix = new Matrix4x4 (); + matrix.SetColumn (0, planeAnchorData.transform.column0); + matrix.SetColumn (1, planeAnchorData.transform.column1); + matrix.SetColumn (2, planeAnchorData.transform.column2); + matrix.SetColumn (3, planeAnchorData.transform.column3); + return matrix; + } + } + + public ARPlaneAnchorAlignment alignment { + get { + return planeAnchorData.alignment; + } + } + + public Vector3 extent { + get { + return new Vector3 (planeAnchorData.extent.x, planeAnchorData.extent.y, planeAnchorData.extent.z); + } + } + + public Vector3 center { + get { + return new Vector3 (planeAnchorData.center.x, planeAnchorData.center.y, planeAnchorData.center.z); + } + } + + public ARPlaneGeometry planeGeometry { get { return new ARPlaneGeometry (planeAnchorData.planeGeometry); } } + + } +#endif +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchor.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchor.cs.meta new file mode 100644 index 00000000..52c9c5ac --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4a7917e69c7bc43ad8879cc6d58266fc +timeCreated: 1492119200 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchorAlignment.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchorAlignment.cs new file mode 100644 index 00000000..ab56c1b0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchorAlignment.cs @@ -0,0 +1,14 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public enum ARPlaneAnchorAlignment : long + { + /** A plane that is horizontal with respect to gravity. */ + ARPlaneAnchorAlignmentHorizontal, + + /** A plane that is parallel with respect to gravity. */ + ARPlaneAnchorAlignmentVertical + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchorAlignment.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchorAlignment.cs.meta new file mode 100644 index 00000000..ab62bd4e --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchorAlignment.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f8d5557085c2d4e3e8ac43f5694ea8c8 +timeCreated: 1492119200 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPoint.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPoint.cs new file mode 100644 index 00000000..ddfc9798 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPoint.cs @@ -0,0 +1,11 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public struct ARPoint + { + public double x; + public double y; + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPoint.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPoint.cs.meta new file mode 100644 index 00000000..cb774e09 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPoint.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 91d28e0ba93314b2298e88a73bf448d3 +timeCreated: 1492119200 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.cs new file mode 100644 index 00000000..6d1cd0dc --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.cs @@ -0,0 +1,187 @@ +using System; +using System.Runtime.InteropServices; +using UnityEngine.XR.iOS.Utils; + + +namespace UnityEngine.XR.iOS +{ + public class ARPointCloud + { + IntPtr m_Ptr; + Vector3[] m_Positions; + UInt64[] m_Identifiers; + + internal IntPtr nativePtr { get { return m_Ptr; } } + + public int Count + { + get { return GetCount(); } + } + + public Vector3[] Points + { + get { return GetPoints(); } + } + + public UInt64[] Identifiers + { + get { return GetIdentifiers(); } + } + + internal static ARPointCloud FromPtr(IntPtr ptr) + { + if (ptr == IntPtr.Zero) + return null; + + return new ARPointCloud(ptr); + } + + internal ARPointCloud(IntPtr ptr) + { + if (ptr == IntPtr.Zero) + throw new ArgumentException("ptr may not be IntPtr.Zero"); + + m_Ptr = ptr; + GetPoints(); + GetIdentifiers(); + } +#if !UNITY_EDITOR && UNITY_IOS + [DllImport("__Internal")] + static extern int pointCloud_GetCount(IntPtr ptr); + + [DllImport("__Internal")] + static extern IntPtr pointCloud_GetPointsPtr(IntPtr ptr); + + [DllImport("__Internal")] + static extern IntPtr pointCloud_GetIdentifiersPtr(IntPtr ptr); + + int GetCount() + { + if (m_Positions != null) + { + return m_Positions.Length; + } + + return pointCloud_GetCount(m_Ptr); + } + + Vector3[] GetPoints() + { + if (m_Positions != null) + { + return m_Positions; + } + + IntPtr pointsPtr = pointCloud_GetPointsPtr (m_Ptr); + int pointCount = Count; + if (pointCount <= 0 || pointsPtr == IntPtr.Zero) + { + return null; + } + + // Load the results into a managed array. + var floatCount = pointCount * 4; + float [] resultVertices = new float[floatCount]; + Marshal.Copy(pointsPtr, resultVertices, 0, floatCount); + + m_Positions = new Vector3[pointCount]; + + for (int count = 0; count < pointCount; count++) + { + //convert to Unity coords system + m_Positions[count].x = resultVertices[count * 4]; + m_Positions[count].y = resultVertices[count * 4 + 1]; + m_Positions[count].z = -resultVertices[count * 4 + 2]; + } + + return m_Positions; + } + + UInt64[] GetIdentifiers() + { + if (m_Identifiers != null) + { + return m_Identifiers; + } + + IntPtr identifiersPtr = pointCloud_GetIdentifiersPtr(m_Ptr); + int identifiersCount = Count; + if (identifiersCount <= 0 || identifiersPtr == IntPtr.Zero) + { + return null; + } + + // Load the results into a managed array. + Int64 [] copyIdentifiers = new Int64[identifiersCount]; + Marshal.Copy(identifiersPtr, copyIdentifiers, 0, identifiersCount); + + m_Identifiers = new UInt64[identifiersCount]; + int index = 0; + foreach (Int64 identifier in copyIdentifiers) + { + //convert to UInt64 + m_Identifiers[index++] = (UInt64) identifier; + } + + return m_Identifiers; + } +#else + + internal ARPointCloud(serializablePointCloud spc) + { + if (spc.pointCloudData != null) + { + int numVectors = spc.pointCloudData.Length / (3 * sizeof(float)); + m_Positions = new Vector3[numVectors]; + for (int i = 0; i < numVectors; i++) + { + int bufferStart = i * 3; + m_Positions[i].x = BitConverter.ToSingle (spc.pointCloudData, (bufferStart) * sizeof(float)); + m_Positions[i].y = BitConverter.ToSingle (spc.pointCloudData, (bufferStart+1) * sizeof(float)); + m_Positions[i].z = BitConverter.ToSingle (spc.pointCloudData, (bufferStart+2) * sizeof(float)); + } + } + else + { + m_Positions = null; + } + + if (spc.pointCloudIds != null) + { + int numIds = spc.pointCloudIds.Length / sizeof(UInt64); + m_Identifiers = new ulong[numIds]; + for (int i = 0; i < numIds; i++) + { + m_Identifiers[i] = BitConverter.ToUInt64(spc.pointCloudIds, i * sizeof(UInt64)); + } + } + else + { + m_Identifiers = null; + } + } + + int GetCount() + { + if (m_Positions == null) + { + return 0; + } + + return m_Positions.Length; + } + + Vector3[] GetPoints() + { + return m_Positions; + } + + UInt64[] GetIdentifiers() + { + return m_Identifiers; + } +#endif + + + } +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.cs.meta new file mode 100644 index 00000000..fd8f061b --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 918654fc7d79746f8804ff2732ba5f5d +timeCreated: 1523909207 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.mm b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.mm new file mode 100644 index 00000000..693b7f35 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.mm @@ -0,0 +1,59 @@ +// Unity Technologies Inc (c) 2018 +// ARPointCloud.mm +// Main implementation of ARKit plugin's ARPointCloud + +#include "ARKitDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int pointCloud_GetCount(const void* pointCloudPtr) +{ + if (pointCloudPtr == nullptr) + return 0; + + ARPointCloud* pointCloud = (__bridge ARPointCloud*)pointCloudPtr; + + return [pointCloud count]; +} + +void* pointCloud_GetPointsPtr(const void* pointCloudPtr) +{ + if (pointCloudPtr == nullptr) + { + return 0; + } + + if (@available(iOS 11.0, *)) + { + ARPointCloud* pointCloud = (__bridge ARPointCloud*)pointCloudPtr; + if (![pointCloud isKindOfClass:[ARPointCloud class]]) + { + return 0; + } + const vector_float3 *pointsPtr = [pointCloud points]; + return (void*) pointsPtr; + } + else + { + // Fallback on earlier versions + return 0; + } +} + +void* pointCloud_GetIdentifiersPtr(const void* pointCloudPtr) +{ + if (pointCloudPtr == nullptr) + return 0; + + ARPointCloud* pointCloud = (__bridge ARPointCloud*)pointCloudPtr; + + const UInt64 *identifiersPtr = [pointCloud identifiers]; + + return (void*) identifiersPtr; +} +#ifdef __cplusplus +} +#endif + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.mm.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.mm.meta new file mode 100644 index 00000000..26930cde --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARPointCloud.mm.meta @@ -0,0 +1,36 @@ +fileFormatVersion: 2 +guid: b2ebc344d4f0c4c7a9c449e01d9e8e2f +timeCreated: 1523567805 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + - first: + tvOS: tvOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARRect.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARRect.cs new file mode 100644 index 00000000..4a744a4a --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARRect.cs @@ -0,0 +1,11 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public struct ARRect + { + public ARPoint origin; + public ARSize size; + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARRect.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARRect.cs.meta new file mode 100644 index 00000000..7f4af1fc --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARRect.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1b78ac1873b934b6497aa4404b460655 +timeCreated: 1492120116 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARReferenceObject.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARReferenceObject.cs new file mode 100644 index 00000000..14d97c37 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARReferenceObject.cs @@ -0,0 +1,256 @@ +using System.Runtime.InteropServices; +using System; +using System.Collections.Generic; + +namespace UnityEngine.XR.iOS +{ + public class ARReferenceObject + { + IntPtr m_Ptr; + + internal IntPtr nativePtr { get { return m_Ptr; } } + + public bool Save(string path) + { + return referenceObject_ExportObjectToURL(m_Ptr, path); + } + + public static ARReferenceObject Load(string path) + { + var ptr = referenceObject_InitWithArchiveUrl(path); + if (ptr == IntPtr.Zero) + return null; + + return new ARReferenceObject(ptr); + } + + public static ARReferenceObject SerializeFromByteArray(byte[] mapByteArray) + { + long lengthBytes = mapByteArray.LongLength; + GCHandle handle = GCHandle.Alloc (mapByteArray, GCHandleType.Pinned); + IntPtr newMapPtr = referenceObject_SerializeFromByteArray(handle.AddrOfPinnedObject(), lengthBytes); + handle.Free (); + return new ARReferenceObject (newMapPtr); + } + + public byte [] SerializeToByteArray() + { + byte[] referenceObjectByteArray = new byte[referenceObject_SerializedLength(m_Ptr)]; + GCHandle handle = GCHandle.Alloc (referenceObjectByteArray, GCHandleType.Pinned); + referenceObject_SerializeToByteArray(m_Ptr,handle.AddrOfPinnedObject()); + handle.Free (); + return referenceObjectByteArray; + } + + public Vector3 center + { + get { return UnityARMatrixOps.GetPosition(referenceObject_GetCenter(m_Ptr)); } + } + + public Vector3 extent + { + get { return referenceObject_GetExtent(m_Ptr); } + } + + public string name + { + get { return referenceObject_GetName(m_Ptr); } + set { referenceObject_SetName(m_Ptr, value); } + } + + public ARPointCloud pointCloud + { + get + { + return ARPointCloud.FromPtr (referenceObject_GetPointCloud (m_Ptr)); + } + } + + internal static ARReferenceObject FromPtr(IntPtr ptr) + { + if (ptr == IntPtr.Zero) + return null; + + return new ARReferenceObject(ptr); + } + + internal ARReferenceObject(IntPtr ptr) + { + if (ptr == IntPtr.Zero) + throw new ArgumentException("ptr may not be IntPtr.Zero"); + + m_Ptr = ptr; + } + +#if !UNITY_EDITOR && UNITY_IOS + [DllImport("__Internal")] + static extern bool referenceObject_ExportObjectToURL(IntPtr ptr, string path); + + [DllImport("__Internal")] + static extern IntPtr referenceObject_InitWithArchiveUrl(string path); + + [DllImport("__Internal")] + static extern bool referenceObject_Save(IntPtr referenceObjectPtr, string path); + + [DllImport("__Internal")] + static extern IntPtr referenceObject_Load(string path); + + [DllImport("__Internal")] + static extern Vector3 referenceObject_GetCenter(IntPtr ptr); + + [DllImport("__Internal")] + static extern Vector3 referenceObject_GetExtent(IntPtr ptr); + + [DllImport("__Internal")] + static extern string referenceObject_GetName(IntPtr ptr); + + [DllImport("__Internal")] + static extern void referenceObject_SetName(IntPtr ptr, string name); + + [DllImport("__Internal")] + static extern IntPtr referenceObject_GetPointCloud(IntPtr ptr); + + [DllImport("__Internal")] + static extern long referenceObject_SerializedLength(IntPtr worldMapPtr); + + [DllImport("__Internal")] + static extern void referenceObject_SerializeToByteArray(IntPtr worldMapPtr, IntPtr serByteArray); + + [DllImport("__Internal")] + static extern IntPtr referenceObject_SerializeFromByteArray(IntPtr serByteArray, long lengthBytes); + +#else + static bool referenceObject_ExportObjectToURL(IntPtr ptr, string path) { return false; } + static bool referenceObject_Save(IntPtr referenceObjectPtr, string path) { return false; } + static IntPtr referenceObject_Load(string path) { return IntPtr.Zero; } + static IntPtr referenceObject_InitWithArchiveUrl(string path) { return IntPtr.Zero; } + static Vector3 referenceObject_GetCenter(IntPtr ptr) { return Vector3.zero; } + static Vector3 referenceObject_GetExtent(IntPtr ptr) { return Vector3.zero; } + static string referenceObject_GetName(IntPtr ptr) { return ""; } + static void referenceObject_SetName(IntPtr ptr, string name) {} + static IntPtr referenceObject_GetPointCloud(IntPtr ptr) { return IntPtr.Zero; } + static long referenceObject_SerializedLength(IntPtr worldMapPtr) { return 0; } + static void referenceObject_SerializeToByteArray(IntPtr worldMapPtr, IntPtr serByteArray) { } + static IntPtr referenceObject_SerializeFromByteArray(IntPtr serByteArray, long lengthBytes) { return IntPtr.Zero; } +#endif + } + + + + public struct ARKitObjectScanningSessionConfiguration + { + public UnityARAlignment alignment; + public UnityARPlaneDetection planeDetection; + public bool getPointCloudData; + public bool enableLightEstimation; + public bool enableAutoFocus; + public bool IsSupported { get { return IsARKitObjectScanningConfigurationSupported(); } private set { } } + + public ARKitObjectScanningSessionConfiguration(UnityARAlignment alignment = UnityARAlignment.UnityARAlignmentGravity, + UnityARPlaneDetection planeDetection = UnityARPlaneDetection.None, bool getPointCloudData = false, + bool enableLightEstimation = false, bool enableAutoFocus = false) + { + this.alignment = alignment; + this.planeDetection = planeDetection; + this.getPointCloudData = getPointCloudData; + this.enableLightEstimation = enableLightEstimation; + this.enableAutoFocus = enableAutoFocus; + } + + #if UNITY_EDITOR || !UNITY_IOS + private bool IsARKitObjectScanningConfigurationSupported() + { + return true; + } + #else + [DllImport("__Internal")] + private static extern bool IsARKitObjectScanningConfigurationSupported(); + #endif + + } + +/// +/// Unity AR session native interface. +/// + + public partial class UnityARSessionNativeInterface + { + public void RunWithConfigAndOptions(ARKitObjectScanningSessionConfiguration config, UnityARSessionRunOption runOptions) + { + #if !UNITY_EDITOR && UNITY_IOS + StartObjectScanningSessionWithOptions (m_NativeARSession, config, runOptions); + #endif + } + + public void RunWithConfig(ARKitObjectScanningSessionConfiguration config) + { + RunWithConfigAndOptions (config, 0); + } + + public IntPtr CreateNativeReferenceObjectsSet(List refObjects) + { + if (IsARKit_2_0_Supported() == false) return IntPtr.Zero; + + IntPtr refObjectsSet = referenceObjectsSet_Create (); + foreach (ARReferenceObject arro in refObjects) + { + referenceObjectsSet_AddReferenceObject (refObjectsSet, arro.nativePtr); + } + return refObjectsSet; + } + +#if !UNITY_EDITOR && UNITY_IOS + [DllImport("__Internal")] + private static extern void StartObjectScanningSessionWithOptions(IntPtr nativeSession, ARKitObjectScanningSessionConfiguration configuration, UnityARSessionRunOption runOptions); + + [DllImport("__Internal")] + static extern IntPtr referenceObjectsSet_Create(); + + [DllImport("__Internal")] + static extern void referenceObjectsSet_AddReferenceObject(IntPtr roSet, IntPtr referenceObject); +#else + static IntPtr referenceObjectsSet_Create() { return IntPtr.Zero; } + static void referenceObjectsSet_AddReferenceObject(IntPtr roSet, IntPtr referenceObject) {} +#endif + } + + [Serializable] + public class serializableARReferenceObject + { + byte [] arReferenceObjectData; + + public serializableARReferenceObject(byte [] inputObjectData) + { + arReferenceObjectData = inputObjectData; + } + + public static implicit operator serializableARReferenceObject(ARReferenceObject arReferenceObject) + { + if (arReferenceObject != null) + { + return new serializableARReferenceObject (arReferenceObject.SerializeToByteArray ()); + + } + else + { + return new serializableARReferenceObject (null); + } + } + + public static implicit operator ARReferenceObject(serializableARReferenceObject serReferenceObject) + { + if (serReferenceObject != null) + { + return ARReferenceObject.SerializeFromByteArray (serReferenceObject.arReferenceObjectData); + } + else + { + return null; + } + } + + } + + + +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARReferenceObject.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARReferenceObject.cs.meta new file mode 100644 index 00000000..3fd85c5f --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARReferenceObject.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: dff1e0a9aa6954cb1b2200e58010f164 +timeCreated: 1523905774 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSessionNative.mm b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSessionNative.mm new file mode 100644 index 00000000..98e936d6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSessionNative.mm @@ -0,0 +1,1287 @@ +// Unity Technologies Inc (c) 2017 +// ARSessionNative.mm +// Main implementation of ARKit plugin native parts + +#import +#include "stdlib.h" +#include "UnityAppController.h" +#include "ARKitDefines.h" + +// These don't all need to be static data, but no other better place for them at the moment. +static id s_CapturedImageTextureY = NULL; +static id s_CapturedImageTextureCbCr = NULL; +static UnityARMatrix4x4 s_CameraProjectionMatrix; + +static float s_AmbientIntensity; +static int s_TrackingQuality; +static float s_ShaderScale; + +static float unityCameraNearZ; +static float unityCameraFarZ; + + + + +static inline UnityARTrackingState GetUnityARTrackingStateFromARTrackingState(ARTrackingState trackingState) +{ + switch (trackingState) { + case ARTrackingStateNormal: + return UnityARTrackingStateNormal; + case ARTrackingStateLimited: + return UnityARTrackingStateLimited; + case ARTrackingStateNotAvailable: + return UnityARTrackingStateNotAvailable; + default: + [NSException raise:@"UnrecognizedARTrackingState" format:@"Unrecognized ARTrackingState: %ld", (long)trackingState]; + break; + } +} + +static inline UnityARTrackingReason GetUnityARTrackingReasonFromARTrackingReason(ARTrackingStateReason trackingReason) +{ + switch (trackingReason) + { + case ARTrackingStateReasonNone: + return UnityARTrackingStateReasonNone; + case ARTrackingStateReasonInitializing: + return UnityARTrackingStateReasonInitializing; + case ARTrackingStateReasonExcessiveMotion: + return UnityARTrackingStateReasonExcessiveMotion; + case ARTrackingStateReasonInsufficientFeatures: + return UnityARTrackingStateReasonInsufficientFeatures; + case ARTrackingStateReasonRelocalizing: + return UnityARTrackingStateReasonRelocalizing; + default: + [NSException raise:@"UnrecognizedARTrackingStateReason" format:@"Unrecognized ARTrackingStateReason: %ld", (long)trackingReason]; + break; + } +} + +API_AVAILABLE(ios(12.0)) +static inline UnityARWorldMappingStatus GetUnityARWorldMappingStatusFromARWorldMappingStatus(ARWorldMappingStatus worldMappingStatus) +{ + switch (worldMappingStatus) { + case ARWorldMappingStatusNotAvailable: + return UnityARWorldMappingStatusNotAvailable; + case ARWorldMappingStatusLimited: + return UnityARWorldMappingStatusLimited; + case ARWorldMappingStatusExtending: + return UnityARWorldMappingStatusExtending; + case ARWorldMappingStatusMapped: + return UnityARWorldMappingStatusMapped; + default: + [NSException raise:@"UnrecognizedARWorldMappingStatus" format:@"Unrecognized ARWorldMappingStatus: %ld", (long)worldMappingStatus]; + break; + } +} + + +API_AVAILABLE(ios(12.0)) +static inline AREnvironmentTexturing GetAREnvironmentTexturingFromUnityAREnvironmentTexturing(UnityAREnvironmentTexturing& unityEnvTexturing) +{ + switch (unityEnvTexturing) + { + case UnityAREnvironmentTexturingNone: + return AREnvironmentTexturingNone; + case UnityAREnvironmentTexturingManual: + return AREnvironmentTexturingManual; + case UnityAREnvironmentTexturingAutomatic: + return AREnvironmentTexturingAutomatic; + } +} + + + +inline void GetARSessionConfigurationFromARKitWorldTrackingSessionConfiguration(ARKitWorldTrackingSessionConfiguration& unityConfig, ARWorldTrackingConfiguration* appleConfig) +{ + appleConfig.planeDetection = GetARPlaneDetectionFromUnityARPlaneDetection(unityConfig.planeDetection); + appleConfig.worldAlignment = GetARWorldAlignmentFromUnityARAlignment(unityConfig.alignment); + appleConfig.lightEstimationEnabled = (BOOL)unityConfig.enableLightEstimation; + + if (@available(iOS 12.0, *)) + { + appleConfig.maximumNumberOfTrackedImages = unityConfig.maximumNumberOfTrackedImages; + } + + if (@available(iOS 11.3, *)) + { + appleConfig.autoFocusEnabled = (BOOL) unityConfig.enableAutoFocus; + + if (unityConfig.ptrVideoFormat != NULL) + { + appleConfig.videoFormat = (__bridge ARVideoFormat*) unityConfig.ptrVideoFormat; + } + } + + if (UnityIsARKit_2_0_Supported()) + { + if (@available(iOS 12.0, *)) { + appleConfig.initialWorldMap = (__bridge ARWorldMap*)unityConfig.ptrWorldMap; + appleConfig.environmentTexturing = GetAREnvironmentTexturingFromUnityAREnvironmentTexturing(unityConfig.environmentTexturing); + } + } +} + +inline void GetARSessionConfigurationFromARKitSessionConfiguration(ARKitSessionConfiguration& unityConfig, ARConfiguration* appleConfig) +{ + appleConfig.worldAlignment = GetARWorldAlignmentFromUnityARAlignment(unityConfig.alignment); + appleConfig.lightEstimationEnabled = (BOOL)unityConfig.enableLightEstimation; +} + +#if ARKIT_USES_FACETRACKING +inline void GetARFaceConfigurationFromARKitFaceConfiguration(ARKitFaceTrackingConfiguration& unityConfig, ARConfiguration* appleConfig) +{ + appleConfig.worldAlignment = GetARWorldAlignmentFromUnityARAlignment(unityConfig.alignment); + appleConfig.lightEstimationEnabled = (BOOL)unityConfig.enableLightEstimation; + + if (@available(iOS 11.3, *)) + { + if (unityConfig.ptrVideoFormat != NULL) + { + appleConfig.videoFormat = (__bridge ARVideoFormat*) unityConfig.ptrVideoFormat; + } + } +} +#endif + +static inline void GetUnityARCameraDataFromCamera(UnityARCamera& unityARCamera, ARCamera* camera) +{ + CGSize nativeSize = GetAppController().rootView.bounds.size; + matrix_float4x4 projectionMatrix = [camera projectionMatrixForOrientation:[[UIApplication sharedApplication] statusBarOrientation] viewportSize:nativeSize zNear:(CGFloat)unityCameraNearZ zFar:(CGFloat)unityCameraFarZ]; + + ARKitMatrixToUnityARMatrix4x4(projectionMatrix, &s_CameraProjectionMatrix); + ARKitMatrixToUnityARMatrix4x4(projectionMatrix, &unityARCamera.projectionMatrix); + + unityARCamera.trackingState = GetUnityARTrackingStateFromARTrackingState(camera.trackingState); + unityARCamera.trackingReason = GetUnityARTrackingReasonFromARTrackingReason(camera.trackingStateReason); +} + +API_AVAILABLE(ios(11.3)) +inline void UnityARPlaneGeometryFromARPlaneGeometry(UnityARPlaneGeometry& planeGeometry, ARPlaneGeometry *arPlaneGeometry) +{ + planeGeometry.vertexCount = arPlaneGeometry.vertexCount; + planeGeometry.triangleCount = arPlaneGeometry.triangleCount; + planeGeometry.textureCoordinateCount = arPlaneGeometry.textureCoordinateCount; + planeGeometry.boundaryVertexCount = arPlaneGeometry.boundaryVertexCount; + planeGeometry.vertices = (float *) arPlaneGeometry.vertices; + planeGeometry.triangleIndices = (int *) arPlaneGeometry.triangleIndices; + planeGeometry.textureCoordinates = (float *) arPlaneGeometry.textureCoordinates; + planeGeometry.boundaryVertices = (float *) arPlaneGeometry.boundaryVertices; + +} + +inline void UnityARAnchorDataFromARAnchorPtr(UnityARAnchorData& anchorData, ARPlaneAnchor* nativeAnchor) +{ + anchorData.identifier = (void*)[nativeAnchor.identifier.UUIDString UTF8String]; + ARKitMatrixToUnityARMatrix4x4(nativeAnchor.transform, &anchorData.transform); + anchorData.alignment = nativeAnchor.alignment; + anchorData.center.x = nativeAnchor.center.x; + anchorData.center.y = nativeAnchor.center.y; + anchorData.center.z = nativeAnchor.center.z; + anchorData.extent.x = nativeAnchor.extent.x; + anchorData.extent.y = nativeAnchor.extent.y; + anchorData.extent.z = nativeAnchor.extent.z; + + if (@available(iOS 11.3, *)) + { + UnityARPlaneGeometryFromARPlaneGeometry(anchorData.planeGeometry, nativeAnchor.geometry); + } +} + +inline void UnityARMatrix4x4FromCGAffineTransform(UnityARMatrix4x4& outMatrix, CGAffineTransform displayTransform, BOOL isLandscape) +{ + if (isLandscape) + { + outMatrix.column0.x = displayTransform.a; + outMatrix.column0.y = displayTransform.c; + outMatrix.column0.z = displayTransform.tx; + outMatrix.column1.x = displayTransform.b; + outMatrix.column1.y = -displayTransform.d; + outMatrix.column1.z = 1.0f - displayTransform.ty; + outMatrix.column2.z = 1.0f; + outMatrix.column3.w = 1.0f; + } + else + { + outMatrix.column0.x = displayTransform.a; + outMatrix.column0.y = -displayTransform.c; + outMatrix.column0.z = 1.0f - displayTransform.tx; + outMatrix.column1.x = displayTransform.b; + outMatrix.column1.y = displayTransform.d; + outMatrix.column1.z = displayTransform.ty; + outMatrix.column2.z = 1.0f; + outMatrix.column3.w = 1.0f; + } +} + +inline void UnityARUserAnchorDataFromARAnchorPtr(UnityARUserAnchorData& anchorData, ARAnchor* nativeAnchor) +{ + anchorData.identifier = (void*)[nativeAnchor.identifier.UUIDString UTF8String]; + ARKitMatrixToUnityARMatrix4x4(nativeAnchor.transform, &anchorData.transform); +} + + +#if ARKIT_USES_FACETRACKING +inline void UnityARFaceGeometryFromARFaceGeometry(UnityARFaceGeometry& faceGeometry, ARFaceGeometry *arFaceGeometry) +{ + faceGeometry.vertexCount = arFaceGeometry.vertexCount; + faceGeometry.triangleCount = arFaceGeometry.triangleCount; + faceGeometry.textureCoordinateCount = arFaceGeometry.textureCoordinateCount; + faceGeometry.vertices = (float *) arFaceGeometry.vertices; + faceGeometry.triangleIndices = (int *) arFaceGeometry.triangleIndices; + faceGeometry.textureCoordinates = (float *) arFaceGeometry.textureCoordinates; +} + +inline void UnityARFaceAnchorDataFromARFaceAnchorPtr(UnityARFaceAnchorData& anchorData, ARFaceAnchor* nativeAnchor) +{ + anchorData.identifier = (void*)[nativeAnchor.identifier.UUIDString UTF8String]; + ARKitMatrixToUnityARMatrix4x4(nativeAnchor.transform, &anchorData.transform); + if (UnityIsARKit_2_0_Supported()) + { + ARKitMatrixToUnityARMatrix4x4(nativeAnchor.leftEyeTransform, &anchorData.leftEyeTransform); + ARKitMatrixToUnityARMatrix4x4(nativeAnchor.rightEyeTransform, &anchorData.rightEyeTransform); + anchorData.lookAtPoint = UnityARVector3{nativeAnchor.lookAtPoint.x, nativeAnchor.lookAtPoint.y, nativeAnchor.lookAtPoint.z}; + } + + UnityARFaceGeometryFromARFaceGeometry(anchorData.faceGeometry, nativeAnchor.geometry); + anchorData.blendShapes = (__bridge void *) nativeAnchor.blendShapes; + anchorData.isTracked = (uint32_t) nativeAnchor.isTracked; +} +#endif + +API_AVAILABLE(ios(11.3)) +inline void UnityARImageAnchorDataFromARImageAnchorPtr(UnityARImageAnchorData& anchorData, ARImageAnchor* nativeAnchor) +{ + anchorData.identifier = (void*)[nativeAnchor.identifier.UUIDString UTF8String]; + ARKitMatrixToUnityARMatrix4x4(nativeAnchor.transform, &anchorData.transform); + anchorData.referenceImageName = (void*)[nativeAnchor.referenceImage.name UTF8String]; + anchorData.referenceImageSize = nativeAnchor.referenceImage.physicalSize.width; + anchorData.isTracked = [nativeAnchor isTracked] ? 1 : 0; +} + +inline void UnityLightDataFromARFrame(UnityLightData& lightData, ARFrame *arFrame) +{ + if (arFrame.lightEstimate != NULL) + { +#if ARKIT_USES_FACETRACKING + if ([arFrame.lightEstimate class] == [ARDirectionalLightEstimate class]) + { + lightData.arLightingType = DirectionalLightEstimate; + ARDirectionalLightEstimate *dirLightEst = (ARDirectionalLightEstimate *) arFrame.lightEstimate; + lightData.arDirectionalLightEstimate.sphericalHarmonicsCoefficients = (float *) dirLightEst.sphericalHarmonicsCoefficients.bytes; + + //[dirLightEst.sphericalHarmonicsCoefficients getBytes:lightData.arDirectionalLightEstimate.sphericalHarmonicsCoefficients length:sizeof(float)*27 ]; + + UnityARVector4 dirAndIntensity; + dirAndIntensity.x = dirLightEst.primaryLightDirection.x; + dirAndIntensity.y = dirLightEst.primaryLightDirection.y; + dirAndIntensity.z = dirLightEst.primaryLightDirection.z; + dirAndIntensity.w = dirLightEst.primaryLightIntensity; + lightData.arDirectionalLightEstimate.primaryLightDirectionAndIntensity = dirAndIntensity; + } + else +#endif + { + lightData.arLightingType = LightEstimate; + lightData.arLightEstimate.ambientIntensity = arFrame.lightEstimate.ambientIntensity; + lightData.arLightEstimate.ambientColorTemperature = arFrame.lightEstimate.ambientColorTemperature; + } + } + +} + + +@interface UnityARAnchorCallbackWrapper : NSObject +{ +@public + UNITY_AR_ANCHOR_CALLBACK _anchorAddedCallback; + UNITY_AR_ANCHOR_CALLBACK _anchorUpdatedCallback; + UNITY_AR_ANCHOR_CALLBACK _anchorRemovedCallback; +} +@end + +@implementation UnityARAnchorCallbackWrapper + + -(void)sendAnchorAddedEvent:(ARAnchor*)anchor + { + UnityARAnchorData data; + UnityARAnchorDataFromARAnchorPtr(data, (ARPlaneAnchor*)anchor); + _anchorAddedCallback(data); + } + + -(void)sendAnchorRemovedEvent:(ARAnchor*)anchor + { + UnityARAnchorData data; + UnityARAnchorDataFromARAnchorPtr(data, (ARPlaneAnchor*)anchor); + _anchorRemovedCallback(data); + } + + -(void)sendAnchorUpdatedEvent:(ARAnchor*)anchor + { + UnityARAnchorData data; + UnityARAnchorDataFromARAnchorPtr(data, (ARPlaneAnchor*)anchor); + _anchorUpdatedCallback(data); + } + +@end + +@interface UnityARUserAnchorCallbackWrapper : NSObject +{ +@public + UNITY_AR_USER_ANCHOR_CALLBACK _anchorAddedCallback; + UNITY_AR_USER_ANCHOR_CALLBACK _anchorUpdatedCallback; + UNITY_AR_USER_ANCHOR_CALLBACK _anchorRemovedCallback; +} +@end + +@implementation UnityARUserAnchorCallbackWrapper + + -(void)sendAnchorAddedEvent:(ARAnchor*)anchor + { + UnityARUserAnchorData data; + UnityARUserAnchorDataFromARAnchorPtr(data, anchor); + _anchorAddedCallback(data); + } + + -(void)sendAnchorRemovedEvent:(ARAnchor*)anchor + { + UnityARUserAnchorData data; + UnityARUserAnchorDataFromARAnchorPtr(data, anchor); + _anchorRemovedCallback(data); + } + + -(void)sendAnchorUpdatedEvent:(ARAnchor*)anchor + { + UnityARUserAnchorData data; + UnityARUserAnchorDataFromARAnchorPtr(data, anchor); + _anchorUpdatedCallback(data); + } + +@end + +@interface UnityARFaceAnchorCallbackWrapper : NSObject +{ +@public + UNITY_AR_FACE_ANCHOR_CALLBACK _anchorAddedCallback; + UNITY_AR_FACE_ANCHOR_CALLBACK _anchorUpdatedCallback; + UNITY_AR_FACE_ANCHOR_CALLBACK _anchorRemovedCallback; +} +@end + +@implementation UnityARFaceAnchorCallbackWrapper + +-(void)sendAnchorAddedEvent:(ARAnchor*)anchor +{ +#if ARKIT_USES_FACETRACKING + UnityARFaceAnchorData data; + UnityARFaceAnchorDataFromARFaceAnchorPtr(data, (ARFaceAnchor*)anchor); + _anchorAddedCallback(data); +#endif +} + +-(void)sendAnchorRemovedEvent:(ARAnchor*)anchor +{ +#if ARKIT_USES_FACETRACKING + UnityARFaceAnchorData data; + UnityARFaceAnchorDataFromARFaceAnchorPtr(data, (ARFaceAnchor*)anchor); + _anchorRemovedCallback(data); +#endif +} + +-(void)sendAnchorUpdatedEvent:(ARAnchor*)anchor +{ +#if ARKIT_USES_FACETRACKING + UnityARFaceAnchorData data; + UnityARFaceAnchorDataFromARFaceAnchorPtr(data, (ARFaceAnchor*)anchor); + _anchorUpdatedCallback(data); +#endif +} + +@end + +@interface UnityARImageAnchorCallbackWrapper : NSObject +{ +@public + UNITY_AR_IMAGE_ANCHOR_CALLBACK _anchorAddedCallback; + UNITY_AR_IMAGE_ANCHOR_CALLBACK _anchorUpdatedCallback; + UNITY_AR_IMAGE_ANCHOR_CALLBACK _anchorRemovedCallback; +} +@end + +@implementation UnityARImageAnchorCallbackWrapper + +-(void)sendAnchorAddedEvent:(ARAnchor*)anchor +{ + UnityARImageAnchorData data; + if (@available(iOS 11.3, *)) { + UnityARImageAnchorDataFromARImageAnchorPtr(data, (ARImageAnchor*)anchor); + } + _anchorAddedCallback(data); +} + +-(void)sendAnchorRemovedEvent:(ARAnchor*)anchor +{ + UnityARImageAnchorData data; + if (@available(iOS 11.3, *)) { + UnityARImageAnchorDataFromARImageAnchorPtr(data, (ARImageAnchor*)anchor); + } + _anchorRemovedCallback(data); +} + +-(void)sendAnchorUpdatedEvent:(ARAnchor*)anchor +{ + UnityARImageAnchorData data; + if (@available(iOS 11.3, *)) { + UnityARImageAnchorDataFromARImageAnchorPtr(data, (ARImageAnchor*)anchor); + } + _anchorUpdatedCallback(data); +} + +@end + +static UnityPixelBuffer s_UnityPixelBuffers; + + +@implementation UnityARSession + +- (id)init +{ + if (self = [super init]) + { + _textureCache = NULL; + _classToCallbackMap = [[NSMutableDictionary alloc] init]; + } + return self; +} + +- (void)setupMetal +{ + if (_textureCache != NULL) + { + return; + } + _device = MTLCreateSystemDefaultDevice(); + CVMetalTextureCacheCreate(NULL, NULL, _device, NULL, &_textureCache); +} + +- (void)teardownMetal +{ + if (_textureCache != NULL) { + CFRelease(_textureCache); + _textureCache = NULL; + } +} + +static CGAffineTransform s_CurAffineTransform; + +- (void)session:(ARSession *)session didUpdateFrame:(ARFrame *)frame +{ + s_AmbientIntensity = frame.lightEstimate.ambientIntensity; + s_TrackingQuality = (int)frame.camera.trackingState; + + UIInterfaceOrientation orient = [[UIApplication sharedApplication] statusBarOrientation]; + + CGRect nativeBounds = [[UIScreen mainScreen] nativeBounds]; + CGSize nativeSize = GetAppController().rootView.bounds.size; + UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; + s_CurAffineTransform = CGAffineTransformInvert([frame displayTransformForOrientation:orientation viewportSize:nativeSize]); + + UnityARCamera unityARCamera; + + GetUnityARCameraDataFromCamera(unityARCamera, frame.camera); + + if (_getPointCloudData && frame.rawFeaturePoints != nullptr) + { + unityARCamera.ptrPointCloud = (__bridge_retained void *) frame.rawFeaturePoints; + } + else + { + unityARCamera.ptrPointCloud = nullptr; + } + + CVPixelBufferRef pixelBuffer = frame.capturedImage; + + size_t imageWidth = CVPixelBufferGetWidth(pixelBuffer); + size_t imageHeight = CVPixelBufferGetHeight(pixelBuffer); + + float imageAspect = (float)imageWidth / (float)imageHeight; + float screenAspect = nativeBounds.size.height / nativeBounds.size.width; + unityARCamera.videoParams.texCoordScale = screenAspect / imageAspect; + s_ShaderScale = screenAspect / imageAspect; + + unityARCamera.getLightEstimation = _getLightEstimation; + if (_getLightEstimation) + { + UnityLightDataFromARFrame(unityARCamera.lightData, frame); + } + + unityARCamera.videoParams.yWidth = (uint32_t)imageWidth; + unityARCamera.videoParams.yHeight = (uint32_t)imageHeight; + unityARCamera.videoParams.cvPixelBufferPtr = (void *) pixelBuffer; + UnityARMatrix4x4 displayTransform; + memset(&displayTransform, 0, sizeof(UnityARMatrix4x4)); + UnityARMatrix4x4FromCGAffineTransform(displayTransform, s_CurAffineTransform, UIInterfaceOrientationIsLandscape(orientation)); + unityARCamera.displayTransform = displayTransform; + + if (UnityIsARKit_2_0_Supported()) + { + if (@available(iOS 12.0, *)) + { + unityARCamera.worldMappingStatus = GetUnityARWorldMappingStatusFromARWorldMappingStatus(frame.worldMappingStatus); + } + } + + if (_frameCallback != NULL) + { + + matrix_float4x4 rotatedMatrix = matrix_identity_float4x4; + unityARCamera.videoParams.screenOrientation = 3; + + // rotation matrix + // [ cos -sin] + // [ sin cos] + switch (orient) { + case UIInterfaceOrientationPortrait: + rotatedMatrix.columns[0][0] = 0; + rotatedMatrix.columns[0][1] = 1; + rotatedMatrix.columns[1][0] = -1; + rotatedMatrix.columns[1][1] = 0; + unityARCamera.videoParams.screenOrientation = 1; + break; + case UIInterfaceOrientationLandscapeLeft: + rotatedMatrix.columns[0][0] = -1; + rotatedMatrix.columns[0][1] = 0; + rotatedMatrix.columns[1][0] = 0; + rotatedMatrix.columns[1][1] = -1; + unityARCamera.videoParams.screenOrientation = 4; + break; + case UIInterfaceOrientationPortraitUpsideDown: + rotatedMatrix.columns[0][0] = 0; + rotatedMatrix.columns[0][1] = -1; + rotatedMatrix.columns[1][0] = 1; + rotatedMatrix.columns[1][1] = 0; + unityARCamera.videoParams.screenOrientation = 2; + break; + default: + break; + } + + matrix_float4x4 matrix = matrix_multiply(frame.camera.transform, rotatedMatrix); + + ARKitMatrixToUnityARMatrix4x4(matrix, &unityARCamera.worldTransform); + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + _frameCallback(unityARCamera); + if (unityARCamera.ptrPointCloud != nullptr) + { + CFRelease(unityARCamera.ptrPointCloud); + } + }); + } + + + if (CVPixelBufferGetPlaneCount(pixelBuffer) < 2 || CVPixelBufferGetPixelFormatType(pixelBuffer) != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) { + return; + } + + if (s_UnityPixelBuffers.bEnable) + { + + CVPixelBufferLockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly); + + if (s_UnityPixelBuffers.pYPixelBytes) + { + unsigned long numBytes = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0) * CVPixelBufferGetHeightOfPlane(pixelBuffer,0); + void* baseAddress = CVPixelBufferGetBaseAddressOfPlane(pixelBuffer,0); + memcpy(s_UnityPixelBuffers.pYPixelBytes, baseAddress, numBytes); + } + if (s_UnityPixelBuffers.pUVPixelBytes) + { + unsigned long numBytes = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 1) * CVPixelBufferGetHeightOfPlane(pixelBuffer,1); + void* baseAddress = CVPixelBufferGetBaseAddressOfPlane(pixelBuffer,1); + memcpy(s_UnityPixelBuffers.pUVPixelBytes, baseAddress, numBytes); + } + + CVPixelBufferUnlockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly); + } + + id textureY = nil; + id textureCbCr = nil; + + // textureY + { + const size_t width = CVPixelBufferGetWidthOfPlane(pixelBuffer, 0); + const size_t height = CVPixelBufferGetHeightOfPlane(pixelBuffer, 0); + MTLPixelFormat pixelFormat = MTLPixelFormatR8Unorm; + + + CVMetalTextureRef texture = NULL; + CVReturn status = CVMetalTextureCacheCreateTextureFromImage(NULL, _textureCache, pixelBuffer, NULL, pixelFormat, width, height, 0, &texture); + if(status == kCVReturnSuccess) + { + textureY = CVMetalTextureGetTexture(texture); + } + if (texture != NULL) + { + CFRelease(texture); + } + } + + // textureCbCr + { + const size_t width = CVPixelBufferGetWidthOfPlane(pixelBuffer, 1); + const size_t height = CVPixelBufferGetHeightOfPlane(pixelBuffer, 1); + MTLPixelFormat pixelFormat = MTLPixelFormatRG8Unorm; + + CVMetalTextureRef texture = NULL; + CVReturn status = CVMetalTextureCacheCreateTextureFromImage(NULL, _textureCache, pixelBuffer, NULL, pixelFormat, width, height, 1, &texture); + if(status == kCVReturnSuccess) + { + textureCbCr = CVMetalTextureGetTexture(texture); + } + if (texture != NULL) + { + CFRelease(texture); + } + } + + if (textureY != nil && textureCbCr != nil) { + dispatch_async(dispatch_get_main_queue(), ^{ + // always assign the textures atomic + s_CapturedImageTextureY = textureY; + s_CapturedImageTextureCbCr = textureCbCr; + }); + } +} + +- (void)session:(ARSession *)session didFailWithError:(NSError *)error +{ + if (_arSessionFailedCallback != NULL) + { + _arSessionFailedCallback(static_cast([[error localizedDescription] UTF8String])); + } +} + +- (void)session:(ARSession *)session didAddAnchors:(NSArray*)anchors +{ + [self sendAnchorAddedEventToUnity:anchors]; +} + +- (void)session:(ARSession *)session didUpdateAnchors:(NSArray*)anchors +{ + [self sendAnchorUpdatedEventToUnity:anchors]; +} + +- (void)session:(ARSession *)session didRemoveAnchors:(NSArray*)anchors +{ + [self sendAnchorRemovedEventToUnity:anchors]; +} + +- (void) sendAnchorAddedEventToUnity:(NSArray*)anchors +{ + for (ARAnchor* anchorPtr in anchors) + { + id dispatcher = [_classToCallbackMap objectForKey:[anchorPtr class]]; + [dispatcher sendAnchorAddedEvent:anchorPtr]; + } +} + +- (void)session:(ARSession *)session cameraDidChangeTrackingState:(ARCamera *)camera +{ + if (_arSessionTrackingChanged != NULL) + { + UnityARCamera unityCamera; + GetUnityARCameraDataFromCamera(unityCamera, camera); + _arSessionTrackingChanged(unityCamera); + } +} + +- (void)sessionWasInterrupted:(ARSession *)session +{ + if (_arSessionInterrupted != NULL) + { + _arSessionInterrupted(); + + } +} + +- (void)sessionInterruptionEnded:(ARSession *)session +{ + if (_arSessionInterruptionEnded != NULL) + { + _arSessionInterruptionEnded(); + } +} + +- (BOOL)sessionShouldAttemptRelocalization:(ARSession *)session +{ + if (_arSessionShouldRelocalize != NULL) + { + return _arSessionShouldRelocalize(); + } + return NO; +} + +- (void) sendAnchorRemovedEventToUnity:(NSArray*)anchors +{ + for (ARAnchor* anchorPtr in anchors) + { + id dispatcher = [_classToCallbackMap objectForKey:[anchorPtr class]]; + [dispatcher sendAnchorRemovedEvent:anchorPtr]; + } +} + +- (void) sendAnchorUpdatedEventToUnity:(NSArray*)anchors +{ + for (ARAnchor* anchorPtr in anchors) + { + id dispatcher = [_classToCallbackMap objectForKey:[anchorPtr class]]; + [dispatcher sendAnchorUpdatedEvent:anchorPtr]; + } +} + +@end + +/// Create the native mirror to the C# ARSession object + +extern "C" void* unity_CreateNativeARSession() +{ + UnityARSession *nativeSession = [[UnityARSession alloc] init]; + nativeSession->_session = [ARSession new]; + nativeSession->_session.delegate = nativeSession; + unityCameraNearZ = .01; + unityCameraFarZ = 30; + s_UnityPixelBuffers.bEnable = false; + return (__bridge_retained void*)nativeSession; +} + +extern "C" void session_SetSessionCallbacks(const void* session, UNITY_AR_FRAME_CALLBACK frameCallback, + UNITY_AR_SESSION_FAILED_CALLBACK sessionFailed, + UNITY_AR_SESSION_VOID_CALLBACK sessionInterrupted, + UNITY_AR_SESSION_VOID_CALLBACK sessionInterruptionEnded, + UNITY_AR_SESSION_RELOCALIZE_CALLBACK sessionShouldRelocalize, + UNITY_AR_SESSION_TRACKING_CHANGED trackingChanged, + UNITY_AR_SESSION_WORLD_MAP_COMPLETION_CALLBACK worldMapCompletionHandler, + UNITY_AR_SESSION_REF_OBJ_EXTRACT_COMPLETION_CALLBACK refObjExtractCompletionHandler) +{ + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + nativeSession->_frameCallback = frameCallback; + nativeSession->_arSessionFailedCallback = sessionFailed; + nativeSession->_arSessionInterrupted = sessionInterrupted; + nativeSession->_arSessionInterruptionEnded = sessionInterruptionEnded; + nativeSession->_arSessionShouldRelocalize = sessionShouldRelocalize; + nativeSession->_arSessionTrackingChanged = trackingChanged; + nativeSession->_arSessionWorldMapCompletionHandler = worldMapCompletionHandler; + nativeSession->_arSessionRefObjExtractCompletionHandler = refObjExtractCompletionHandler; +} + +extern "C" void session_SetPlaneAnchorCallbacks(const void* session, UNITY_AR_ANCHOR_CALLBACK anchorAddedCallback, + UNITY_AR_ANCHOR_CALLBACK anchorUpdatedCallback, + UNITY_AR_ANCHOR_CALLBACK anchorRemovedCallback) +{ + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + UnityARAnchorCallbackWrapper* anchorCallbacks = [[UnityARAnchorCallbackWrapper alloc] init]; + anchorCallbacks->_anchorAddedCallback = anchorAddedCallback; + anchorCallbacks->_anchorUpdatedCallback = anchorUpdatedCallback; + anchorCallbacks->_anchorRemovedCallback = anchorRemovedCallback; + [nativeSession->_classToCallbackMap setObject:anchorCallbacks forKey:[ARPlaneAnchor class]]; +} + +extern "C" void session_SetUserAnchorCallbacks(const void* session, UNITY_AR_USER_ANCHOR_CALLBACK userAnchorAddedCallback, + UNITY_AR_USER_ANCHOR_CALLBACK userAnchorUpdatedCallback, + UNITY_AR_USER_ANCHOR_CALLBACK userAnchorRemovedCallback) +{ + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + UnityARUserAnchorCallbackWrapper* userAnchorCallbacks = [[UnityARUserAnchorCallbackWrapper alloc] init]; + userAnchorCallbacks->_anchorAddedCallback = userAnchorAddedCallback; + userAnchorCallbacks->_anchorUpdatedCallback = userAnchorUpdatedCallback; + userAnchorCallbacks->_anchorRemovedCallback = userAnchorRemovedCallback; + [nativeSession->_classToCallbackMap setObject:userAnchorCallbacks forKey:[ARAnchor class]]; +} + +extern "C" void session_SetFaceAnchorCallbacks(const void* session, UNITY_AR_FACE_ANCHOR_CALLBACK faceAnchorAddedCallback, + UNITY_AR_FACE_ANCHOR_CALLBACK faceAnchorUpdatedCallback, + UNITY_AR_FACE_ANCHOR_CALLBACK faceAnchorRemovedCallback) +{ +#if ARKIT_USES_FACETRACKING + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + UnityARFaceAnchorCallbackWrapper* faceAnchorCallbacks = [[UnityARFaceAnchorCallbackWrapper alloc] init]; + faceAnchorCallbacks->_anchorAddedCallback = faceAnchorAddedCallback; + faceAnchorCallbacks->_anchorUpdatedCallback = faceAnchorUpdatedCallback; + faceAnchorCallbacks->_anchorRemovedCallback = faceAnchorRemovedCallback; + [nativeSession->_classToCallbackMap setObject:faceAnchorCallbacks forKey:[ARFaceAnchor class]]; +#endif +} + +extern "C" void session_SetImageAnchorCallbacks(const void* session, UNITY_AR_IMAGE_ANCHOR_CALLBACK imageAnchorAddedCallback, + UNITY_AR_IMAGE_ANCHOR_CALLBACK imageAnchorUpdatedCallback, + UNITY_AR_IMAGE_ANCHOR_CALLBACK imageAnchorRemovedCallback) +{ + if (@available(iOS 11.3, *)) + { + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + UnityARImageAnchorCallbackWrapper* imageAnchorCallbacks = [[UnityARImageAnchorCallbackWrapper alloc] init]; + imageAnchorCallbacks->_anchorAddedCallback = imageAnchorAddedCallback; + imageAnchorCallbacks->_anchorUpdatedCallback = imageAnchorUpdatedCallback; + imageAnchorCallbacks->_anchorRemovedCallback = imageAnchorRemovedCallback; + [nativeSession->_classToCallbackMap setObject:imageAnchorCallbacks forKey:[ARImageAnchor class]]; + } +} + +extern "C" void* session_GetARKitSessionPtr(const void* session) +{ + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + return (__bridge void*)nativeSession->_session; +} + +extern "C" void* session_GetARKitFramePtr(const void* session) +{ + UnityARSession* nativeSession = (__bridge UnityARSession*)session; + return (__bridge void*)nativeSession->_session.currentFrame; +} + +extern "C" void StartWorldTrackingSessionWithOptions(void* nativeSession, ARKitWorldTrackingSessionConfiguration unityConfig, UnityARSessionRunOptions runOptions) +{ + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + ARWorldTrackingConfiguration* config = [ARWorldTrackingConfiguration new]; + ARSessionRunOptions runOpts = GetARSessionRunOptionsFromUnityARSessionRunOptions(runOptions); + GetARSessionConfigurationFromARKitWorldTrackingSessionConfiguration(unityConfig, config); + session->_getPointCloudData = (BOOL) unityConfig.getPointCloudData; + session->_getLightEstimation = (BOOL) unityConfig.enableLightEstimation; + + if(UnityIsARKit_1_5_Supported() && unityConfig.referenceImagesResourceGroup != NULL && strlen(unityConfig.referenceImagesResourceGroup) > 0) + { + NSString *strResourceGroup = [[NSString alloc] initWithUTF8String:unityConfig.referenceImagesResourceGroup]; + if (@available(iOS 11.3, *)) { + NSSet *referenceImages = [ARReferenceImage referenceImagesInGroupNamed:strResourceGroup bundle:nil]; + config.detectionImages = referenceImages; + } + } + + if(UnityIsARKit_2_0_Supported()) + { + if (@available(iOS 12.0, *)) + { + NSMutableSet *referenceObjects = nullptr; + if (unityConfig.referenceObjectsResourceGroup != NULL && strlen(unityConfig.referenceObjectsResourceGroup) > 0) + { + NSString *strResourceGroup = [[NSString alloc] initWithUTF8String:unityConfig.referenceObjectsResourceGroup]; + [referenceObjects setByAddingObjectsFromSet:[ARReferenceObject referenceObjectsInGroupNamed:strResourceGroup bundle:nil]]; + } + + if (unityConfig.ptrDynamicReferenceObjects != nullptr) + { + NSSet *dynamicReferenceObjects = (__bridge NSSet *)unityConfig.ptrDynamicReferenceObjects; + if (referenceObjects != nullptr) + { + [referenceObjects setByAddingObjectsFromSet:dynamicReferenceObjects]; + } + else + { + referenceObjects = dynamicReferenceObjects; + } + } + + config.detectionObjects = referenceObjects; + } + } + + if (runOptions == UnityARSessionRunOptionsNone) + [session->_session runWithConfiguration:config]; + else + [session->_session runWithConfiguration:config options:runOpts]; + + [session setupMetal]; +} + + +extern "C" void StartWorldTrackingSession(void* nativeSession, ARKitWorldTrackingSessionConfiguration unityConfig) +{ + StartWorldTrackingSessionWithOptions(nativeSession, unityConfig, UnityARSessionRunOptionsNone); +} + +extern "C" void StartSessionWithOptions(void* nativeSession, ARKitSessionConfiguration unityConfig, UnityARSessionRunOptions runOptions) +{ + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + ARConfiguration* config = [AROrientationTrackingConfiguration new]; + ARSessionRunOptions runOpts = GetARSessionRunOptionsFromUnityARSessionRunOptions(runOptions); + GetARSessionConfigurationFromARKitSessionConfiguration(unityConfig, config); + session->_getPointCloudData = (BOOL) unityConfig.getPointCloudData; + session->_getLightEstimation = (BOOL) unityConfig.enableLightEstimation; + [session->_session runWithConfiguration:config options:runOpts ]; + [session setupMetal]; +} + +extern "C" void StartSession(void* nativeSession, ARKitSessionConfiguration unityConfig) +{ + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + ARConfiguration* config = [AROrientationTrackingConfiguration new]; + GetARSessionConfigurationFromARKitSessionConfiguration(unityConfig, config); + session->_getPointCloudData = (BOOL) unityConfig.getPointCloudData; + session->_getLightEstimation = (BOOL) unityConfig.enableLightEstimation; + [session->_session runWithConfiguration:config]; + [session setupMetal]; +} + +extern "C" void StartFaceTrackingSessionWithOptions(void* nativeSession, ARKitFaceTrackingConfiguration unityConfig, UnityARSessionRunOptions runOptions) +{ +#if ARKIT_USES_FACETRACKING + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + ARConfiguration* config = [ARFaceTrackingConfiguration new]; + ARSessionRunOptions runOpts = GetARSessionRunOptionsFromUnityARSessionRunOptions(runOptions); + GetARFaceConfigurationFromARKitFaceConfiguration(unityConfig, config); + session->_getLightEstimation = (BOOL) unityConfig.enableLightEstimation; + [session->_session runWithConfiguration:config options:runOpts ]; + [session setupMetal]; +#else + [NSException raise:@"UnityARKitPluginFaceTrackingNotEnabled" format:@"UnityARKitPlugin: Trying to start FaceTracking session without enabling it in settings."]; +#endif +} + +extern "C" void StartFaceTrackingSession(void* nativeSession, ARKitFaceTrackingConfiguration unityConfig) +{ + StartFaceTrackingSessionWithOptions(nativeSession, unityConfig, UnityARSessionRunOptionsNone); +} + +extern "C" void PauseSession(void* nativeSession) +{ + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + [session->_session pause]; + [session teardownMetal]; +} + +extern "C" void StopSession(void* nativeSession) +{ + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + [session teardownMetal]; +} + +extern "C" UnityARUserAnchorData SessionAddUserAnchor(void* nativeSession, UnityARUserAnchorData anchorData) +{ + // create a native ARAnchor and add it to the session + // then return the data back to the user that they will + // need in case they want to remove it + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + + matrix_float4x4 anchor_transform = matrix_identity_float4x4; + UnityARMatrix4x4ToARKitMatrix(anchorData.transform, &anchor_transform); + ARAnchor *newAnchor = [[ARAnchor alloc] initWithTransform:anchor_transform]; + + [session->_session addAnchor:newAnchor]; + UnityARUserAnchorData returnAnchorData; + UnityARUserAnchorDataFromARAnchorPtr(returnAnchorData, newAnchor); + return returnAnchorData; +} + +extern "C" void SessionRemoveUserAnchor(void* nativeSession, const char * anchorIdentifier) +{ + // go through anchors and find the right one + // then remove it from the session + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + for (ARAnchor* a in session->_session.currentFrame.anchors) + { + if ([[a.identifier UUIDString] isEqualToString:[NSString stringWithUTF8String:anchorIdentifier]]) + { + [session->_session removeAnchor:a]; + return; + } + } +} + +extern "C" void SessionSetWorldOrigin(void* nativeSession, UnityARMatrix4x4 worldMatrix) +{ + if (@available(iOS 11.3, *)) + { + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + matrix_float4x4 arWorldMatrix; + UnityARMatrix4x4ToARKitMatrix(worldMatrix, &arWorldMatrix); + [session->_session setWorldOrigin:arWorldMatrix]; + } +} + +extern "C" void SetCameraNearFar (float nearZ, float farZ) +{ + unityCameraNearZ = nearZ; + unityCameraFarZ = farZ; +} + +extern "C" void CapturePixelData (uint32_t enable, void* pYPixelBytes, void *pUVPixelBytes) +{ + s_UnityPixelBuffers.bEnable = (BOOL) enable; + if (s_UnityPixelBuffers.bEnable) + { + s_UnityPixelBuffers.pYPixelBytes = pYPixelBytes; + s_UnityPixelBuffers.pUVPixelBytes = pUVPixelBytes; + } else { + s_UnityPixelBuffers.pYPixelBytes = NULL; + s_UnityPixelBuffers.pUVPixelBytes = NULL; + } +} + +extern "C" struct HitTestResult +{ + void* ptr; + int count; +}; + +// Must match ARHitTestResult in ARHitTestResult.cs +extern "C" struct UnityARHitTestResult +{ + ARHitTestResultType type; + double distance; + UnityARMatrix4x4 localTransform; + UnityARMatrix4x4 worldTransform; + void* anchorPtr; + bool isValid; +}; + +// Must match ARTextureHandles in UnityARSession.cs +extern "C" struct UnityARTextureHandles +{ + void* textureY; + void* textureCbCr; +}; + +// Cache results locally +static NSArray* s_LastHitTestResults; + +// Returns the number of hits and caches the results internally +extern "C" int HitTest(void* nativeSession, CGPoint point, ARHitTestResultType types) +{ + UnityARSession* session = (__bridge UnityARSession*)nativeSession; + point = CGPointApplyAffineTransform(CGPointMake(point.x, 1.0f - point.y), CGAffineTransformInvert(CGAffineTransformInvert(s_CurAffineTransform))); + s_LastHitTestResults = [session->_session.currentFrame hitTest:point types:types]; + + return (int)[s_LastHitTestResults count]; +} +extern "C" UnityARHitTestResult GetLastHitTestResult(int index) +{ + UnityARHitTestResult unityResult; + memset(&unityResult, 0, sizeof(UnityARHitTestResult)); + + if (s_LastHitTestResults != nil && index >= 0 && index < [s_LastHitTestResults count]) + { + ARHitTestResult* hitResult = s_LastHitTestResults[index]; + unityResult.type = hitResult.type; + unityResult.distance = hitResult.distance; + ARKitMatrixToUnityARMatrix4x4(hitResult.localTransform, &unityResult.localTransform); + ARKitMatrixToUnityARMatrix4x4(hitResult.worldTransform, &unityResult.worldTransform); + unityResult.anchorPtr = (void*)[hitResult.anchor.identifier.UUIDString UTF8String]; + unityResult.isValid = true; + } + + return unityResult; +} + +extern "C" UnityARTextureHandles GetVideoTextureHandles() +{ + UnityARTextureHandles handles; + handles.textureY = (__bridge_retained void*)s_CapturedImageTextureY; + handles.textureCbCr = (__bridge_retained void*)s_CapturedImageTextureCbCr; + + return handles; +} + +extern "C" void ReleaseVideoTextureHandles(UnityARTextureHandles handles) +{ + if (handles.textureY != NULL) + { + CFRelease(handles.textureY); + } + if (handles.textureCbCr != NULL) + { + CFRelease(handles.textureCbCr); + } +} + +extern "C" UnityARMatrix4x4 GetCameraProjectionMatrix() +{ + return s_CameraProjectionMatrix; +} + +extern "C" float GetAmbientIntensity() +{ + return s_AmbientIntensity; +} + +extern "C" int GetTrackingQuality() +{ + return s_TrackingQuality; +} + +extern "C" bool IsARKitWorldTrackingSessionConfigurationSupported() +{ + return ARWorldTrackingConfiguration.isSupported; +} + +extern "C" bool IsARKitSessionConfigurationSupported() +{ + return AROrientationTrackingConfiguration.isSupported; +} + +extern "C" void EnumerateVideoFormats(UNITY_AR_VIDEOFORMAT_CALLBACK videoFormatCallback) +{ + if (@available(iOS 11.3, *)) + { + for(ARVideoFormat* arVideoFormat in ARWorldTrackingConfiguration.supportedVideoFormats) + { + UnityARVideoFormat videoFormat; + videoFormat.ptrVideoFormat = (__bridge void *)arVideoFormat; + videoFormat.imageResolutionWidth = arVideoFormat.imageResolution.width; + videoFormat.imageResolutionHeight = arVideoFormat.imageResolution.height; + videoFormat.framesPerSecond = arVideoFormat.framesPerSecond; + videoFormatCallback(videoFormat); + } + } +} + +extern "C" void EnumerateFaceTrackingVideoFormats(UNITY_AR_VIDEOFORMAT_CALLBACK videoFormatCallback) +{ +#if ARKIT_USES_FACETRACKING + if (@available(iOS 11.3, *)) + { + for(ARVideoFormat* arVideoFormat in ARFaceTrackingConfiguration.supportedVideoFormats) + { + UnityARVideoFormat videoFormat; + videoFormat.ptrVideoFormat = (__bridge void *)arVideoFormat; + videoFormat.imageResolutionWidth = arVideoFormat.imageResolution.width; + videoFormat.imageResolutionHeight = arVideoFormat.imageResolution.height; + videoFormat.framesPerSecond = arVideoFormat.framesPerSecond; + videoFormatCallback(videoFormat); + } + } +#else + [NSException raise:@"UnityARKitPluginFaceTrackingNotEnabled" format:@"UnityARKitPlugin: Checking FaceTracking video formats without enabling it in settings."]; +#endif +} + +extern "C" bool Native_IsARKit_1_5_Supported() +{ + return UnityIsARKit_1_5_Supported(); +} + +extern "C" bool Native_IsARKit_2_0_Supported() +{ + return UnityIsARKit_2_0_Supported(); +} + +extern "C" bool IsARKitFaceTrackingConfigurationSupported() +{ +#if ARKIT_USES_FACETRACKING + return ARFaceTrackingConfiguration.isSupported; +#else + [NSException raise:@"UnityARKitPluginFaceTrackingNotEnabled" format:@"UnityARKitPlugin: Checking FaceTracking device support without enabling it in settings."]; + return false; +#endif +} + +extern "C" void GetBlendShapesInfo(void* ptrDictionary, void (*visitorFn)(const char* key, const float value)) +{ +#if ARKIT_USES_FACETRACKING + // Get your NSDictionary + NSDictionary * dictionary = (__bridge NSDictionary *) ptrDictionary; + + for(NSString* key in dictionary) + { + NSNumber* value = [dictionary objectForKey:key]; + visitorFn([key UTF8String], [value floatValue]); + } +#endif +} + +#ifdef __cplusplus +extern "C" { +#endif + +void session_GetCurrentWorldMap(void* sessionPtr, const void* callbackPtr) +{ + if (sessionPtr == nullptr) + return; + + UnityARSession* nativeSession = (__bridge UnityARSession*)sessionPtr; + if (!UnityAreFeaturesSupported(kUnityARKitSupportedFeaturesWorldMap)) + { + // If 2.0 is not supported, then invoke callback immediately with a null world map + nativeSession->_arSessionWorldMapCompletionHandler(callbackPtr, nullptr); + return; + } + + if (@available(iOS 12.0, *)) + { + [nativeSession->_session getCurrentWorldMapWithCompletionHandler:^(ARWorldMap* worldMap, NSError* error) + { + if (error) + NSLog(@"%@", error); + + nativeSession->_arSessionWorldMapCompletionHandler(callbackPtr, (__bridge_retained void*)worldMap); + }]; + } + else + { + // Fallback on earlier versions + nativeSession->_arSessionWorldMapCompletionHandler(callbackPtr, nullptr); + return; + } +} + +void session_ExtractReferenceObject(void * sessionPtr, UnityARMatrix4x4 unityTransform, UnityARVector3 unityCenter, UnityARVector3 unityExtent, const void* callbackPtr) +{ + if (sessionPtr == nullptr) + return; + + UnityARSession* nativeSession = (__bridge UnityARSession*)sessionPtr; + + if (!UnityAreFeaturesSupported(kUnityARKitSupportedFeaturesReferenceObject)) + { + // If 2.0 is not supported, then invoke callback immediately with a null reference object + nativeSession->_arSessionRefObjExtractCompletionHandler(callbackPtr, nullptr); + return; + } + + matrix_float4x4 transform; + UnityARMatrix4x4ToARKitMatrix(unityTransform, &transform); + + const vector_float3 center{unityCenter.x, unityCenter.y, unityCenter.z}; + const vector_float3 extent{unityExtent.x, unityExtent.y, unityExtent.z}; + + if (@available(iOS 12.0, *)) + { + [nativeSession->_session createReferenceObjectWithTransform:transform center:center extent:extent completionHandler:^(ARReferenceObject * referenceObject, NSError * error) + { + if (error) + NSLog(@"%@", error); + nativeSession->_arSessionRefObjExtractCompletionHandler(callbackPtr, (__bridge_retained void*)referenceObject); + + }]; + } + else + { + // Fallback on earlier versions + nativeSession->_arSessionRefObjExtractCompletionHandler(callbackPtr, nullptr); + return; + } +} + +bool sessionConfig_IsEnvironmentTexturingSupported() +{ + if (@available(iOS 12.0, *)) { + if ([AREnvironmentProbeAnchor class]) + { + return true; + } + else + { + return false; + } + } + else + { + // Fallback on earlier versions + return false; + } +} + + +#ifdef __cplusplus +} +#endif diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSessionNative.mm.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSessionNative.mm.meta new file mode 100644 index 00000000..3feac222 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSessionNative.mm.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 9ecd21425b31a46ef9abc90a0516e9a1 +timeCreated: 1492108287 +licenseType: Pro +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + data: + first: + iPhone: iOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSize.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSize.cs new file mode 100644 index 00000000..bf48f237 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSize.cs @@ -0,0 +1,11 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public struct ARSize + { + public double width; + public double height; + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSize.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSize.cs.meta new file mode 100644 index 00000000..ba4081b7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARSize.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c72e6d3d39c0b495ba3d40c3cbd3a8ca +timeCreated: 1492114222 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTextureHandles.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTextureHandles.cs new file mode 100644 index 00000000..1a01f7b2 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTextureHandles.cs @@ -0,0 +1,59 @@ +using System; +using UnityEngine.XR.iOS; + +namespace UnityEngine.XR.iOS +{ + + public class ARTextureHandles + { + public struct ARTextureHandlesStruct + { + // Native (Metal) texture handles for the device camera buffer + public IntPtr textureY; + public IntPtr textureCbCr; + } + + private ARTextureHandlesStruct m_ARTextureHandlesStruct; + public IntPtr TextureY + { + get { return m_ARTextureHandlesStruct.textureY; } + } + public IntPtr TextureCbCr + { + get { return m_ARTextureHandlesStruct.textureCbCr; } + } + + public ARTextureHandles(ARTextureHandlesStruct arTextureHandlesStruct) + { + m_ARTextureHandlesStruct = arTextureHandlesStruct; + } + +#if !UNITY_EDITOR && UNITY_IOS + ~ARTextureHandles() + { + UnityARSessionNativeInterface.ReleaseVideoTextureHandles(m_ARTextureHandlesStruct); + } +#endif + public bool IsNull() + { + return (m_ARTextureHandlesStruct.textureY == IntPtr.Zero) || (m_ARTextureHandlesStruct.textureCbCr == IntPtr.Zero); + } + + + // Disable the default and copy constructors because we are not currently tracking references of the Objective C handles in this case. + private ARTextureHandles() + { + // This + Debug.Assert(false, "should not call the default constructor for ARTextureHandles"); + m_ARTextureHandlesStruct = new ARTextureHandlesStruct { textureY = IntPtr.Zero, textureCbCr = IntPtr.Zero }; + } + + private ARTextureHandles(ARTextureHandles arTextureHandles) + { + Debug.Assert(false, "should not call the copy constructor for ARTextureHandles"); + m_ARTextureHandlesStruct = new ARTextureHandlesStruct { textureY = IntPtr.Zero, textureCbCr = IntPtr.Zero }; + } + + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTextureHandles.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTextureHandles.cs.meta new file mode 100644 index 00000000..03f61df4 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTextureHandles.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 223ca11cf486046fe9c3740ee69b7a27 +timeCreated: 1493064086 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingQuality.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingQuality.cs new file mode 100644 index 00000000..31dde33c --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingQuality.cs @@ -0,0 +1,21 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public enum ARTrackingQuality : long + { + /** The tracking quality is not available. */ + ARTrackingQualityNotAvailable, + + /** The tracking quality is limited, relying only on the device's motion. */ + ARTrackingQualityLimited, + + /** The tracking quality is poor. */ + ARTrackingQualityPoor, + + /** The tracking quality is good. */ + ARTrackingQualityGood + + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingQuality.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingQuality.cs.meta new file mode 100644 index 00000000..4d12088e --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingQuality.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 70419166c9be04782bc37a66aa7ead0a +timeCreated: 1492114222 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingState.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingState.cs new file mode 100644 index 00000000..d1b309e6 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingState.cs @@ -0,0 +1,17 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public enum ARTrackingState + { + /** Tracking is not available. */ + ARTrackingStateNotAvailable, + + /** Tracking is limited. See tracking reason for details. */ + ARTrackingStateLimited, + + /** Tracking is Normal. */ + ARTrackingStateNormal, + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingState.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingState.cs.meta new file mode 100644 index 00000000..781522e7 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingState.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3c8e21e94c4944a7eb5202db41d4bce0 +timeCreated: 1493767524 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingStateReason.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingStateReason.cs new file mode 100644 index 00000000..4fa43f95 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingStateReason.cs @@ -0,0 +1,23 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public enum ARTrackingStateReason + { + /** Tracking is not limited. */ + ARTrackingStateReasonNone, + + /** Tracking is limited due to initialization in progress. */ + ARTrackingStateReasonInitializing, + + /** Tracking is limited due to a excessive motion of the camera. */ + ARTrackingStateReasonExcessiveMotion, + + /** Tracking is limited due to a lack of features visible to the camera. */ + ARTrackingStateReasonInsufficientFeatures, + + /** Tracking is limited due to a relocalization in progress. */ + ARTrackingStateReasonRelocalizing, + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingStateReason.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingStateReason.cs.meta new file mode 100644 index 00000000..70d28423 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingStateReason.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b76c532f89f25411ca5c1d82cd7a5367 +timeCreated: 1493767524 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARUserAnchor.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARUserAnchor.cs new file mode 100644 index 00000000..15cd01ed --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARUserAnchor.cs @@ -0,0 +1,16 @@ +using System; + +namespace UnityEngine.XR.iOS +{ + public struct ARUserAnchor + { + + public string identifier; + + /** + The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. + */ + public Matrix4x4 transform; + } +} + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARUserAnchor.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARUserAnchor.cs.meta new file mode 100644 index 00000000..99ec493a --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARUserAnchor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e8271a80f6d6245a4bf920bbe514bbc0 +timeCreated: 1500325731 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARVideoFormat.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARVideoFormat.cs new file mode 100644 index 00000000..08cd1d26 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARVideoFormat.cs @@ -0,0 +1,62 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; +using System.Runtime.InteropServices; +using AOT; + + +namespace UnityEngine.XR.iOS +{ + + public struct UnityARVideoFormat { + public IntPtr videoFormatPtr; + public float imageResolutionWidth; + public float imageResolutionHeight; + public int framesPerSecond; + + #if UNITY_EDITOR + private static void EnumerateVideoFormats(VideoFormatEnumerator videoFormatEnumerator) + { + } + private static void EnumerateFaceTrackingVideoFormats(VideoFormatEnumerator videoFormatEnumerator) + { + } + #else + [DllImport("__Internal")] + private static extern void EnumerateVideoFormats(VideoFormatEnumerator videoFormatEnumerator); + [DllImport("__Internal")] + private static extern void EnumerateFaceTrackingVideoFormats(VideoFormatEnumerator videoFormatEnumerator); + #endif + + static List videoFormatsList; + + public static List SupportedVideoFormats() + { + videoFormatsList = new List (); + EnumerateVideoFormats (AddToVFList); + + return videoFormatsList; + } + + public static List SupportedFaceTrackingVideoFormats() + { + videoFormatsList = new List (); + EnumerateFaceTrackingVideoFormats(AddToVFList); + + return videoFormatsList; + } + + [MonoPInvokeCallback(typeof(VideoFormatEnumerator))] + private static void AddToVFList(UnityARVideoFormat newFormat) + { + Debug.Log ("New Format returned"); + videoFormatsList.Add (newFormat); + } + + } + + public delegate void VideoFormatEnumerator(UnityARVideoFormat videoFormat); + + +} \ No newline at end of file diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARVideoFormat.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARVideoFormat.cs.meta new file mode 100644 index 00000000..4451046e --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARVideoFormat.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d63d797765c124eb59e9ed66561bd129 +timeCreated: 1518217135 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.cs new file mode 100644 index 00000000..b1ecca25 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.cs @@ -0,0 +1,193 @@ +using UnityEngine; +using System.Collections; +using System.Runtime.InteropServices; +using System; +using System.Collections.Generic; +using AOT; +using System.Text; + +namespace UnityEngine.XR.iOS +{ + public enum ARWorldMappingStatus + { + /** World mapping is not available. */ + ARWorldMappingStatusNotAvailable, + + /** World mapping is available but has limited features. + For the device's current position, the session’s world map is not recommended for relocalization. */ + ARWorldMappingStatusLimited, + + /** World mapping is actively extending the map with the user's motion. + The world map will be relocalizable for previously visited areas but is still being updated for the current space. */ + ARWorldMappingStatusExtending, + + /** World mapping has adequately mapped the visible area. + The map can be used to relocalize for the device's current position. */ + ARWorldMappingStatusMapped + + } + + public class ARWorldMap + { + IntPtr m_Ptr; + + public static bool supported + { + get + { + return worldMap_GetSupported(); + } + } + + public bool Save(string path) + { + return worldMap_Save(m_Ptr, path); + } + + public static ARWorldMap Load(string path) + { + var ptr = worldMap_Load(path); + if (ptr == IntPtr.Zero) + return null; + + return new ARWorldMap(ptr); + } + + public static ARWorldMap SerializeFromByteArray(byte[] mapByteArray) + { + long lengthBytes = mapByteArray.LongLength; + GCHandle handle = GCHandle.Alloc (mapByteArray, GCHandleType.Pinned); + IntPtr newMapPtr = worldMap_SerializeFromByteArray(handle.AddrOfPinnedObject(), lengthBytes); + handle.Free (); + return new ARWorldMap (newMapPtr); + } + + public byte [] SerializeToByteArray() + { + byte[] worldMapByteArray = new byte[worldMap_SerializedLength(m_Ptr)]; + GCHandle handle = GCHandle.Alloc (worldMapByteArray, GCHandleType.Pinned); + worldMap_SerializeToByteArray(m_Ptr,handle.AddrOfPinnedObject()); + handle.Free (); + return worldMapByteArray; + } + + public Vector3 center + { + get + { + return UnityARMatrixOps.GetPosition(worldMap_GetCenter(m_Ptr)); + } + } + + public Vector3 extent + { + get + { + return worldMap_GetExtent(m_Ptr); + } + } + + public ARPointCloud pointCloud + { + get + { + return ARPointCloud.FromPtr (worldMap_GetPointCloud (m_Ptr)); + } + } + + internal IntPtr nativePtr { get { return m_Ptr; } } + + internal static ARWorldMap FromPtr(IntPtr ptr) + { + if (ptr == IntPtr.Zero) + return null; + + return new ARWorldMap(ptr); + } + + internal ARWorldMap(IntPtr ptr) + { + if (ptr == IntPtr.Zero) + throw new ArgumentException("ptr may not be IntPtr.Zero"); + + m_Ptr = ptr; + } + +#if !UNITY_EDITOR && UNITY_IOS + [DllImport("__Internal")] + static extern bool worldMap_Save(IntPtr worldMapPtr, string path); + + [DllImport("__Internal")] + static extern IntPtr worldMap_Load(string path); + + [DllImport("__Internal")] + static extern Vector3 worldMap_GetCenter(IntPtr worldMapPtr); + + [DllImport("__Internal")] + static extern Vector3 worldMap_GetExtent(IntPtr worldMapPtr); + + [DllImport("__Internal")] + static extern IntPtr worldMap_GetPointCloud(IntPtr worldMapPtr); + + [DllImport("__Internal")] + static extern bool worldMap_GetSupported(); + + [DllImport("__Internal")] + static extern long worldMap_SerializedLength(IntPtr worldMapPtr); + + [DllImport("__Internal")] + static extern void worldMap_SerializeToByteArray(IntPtr worldMapPtr, IntPtr serByteArray); + + [DllImport("__Internal")] + static extern IntPtr worldMap_SerializeFromByteArray(IntPtr serByteArray, long lengthBytes); +#else + static bool worldMap_Save(IntPtr worldMapPtr, string path) { return false; } + static IntPtr worldMap_Load(string path) { return IntPtr.Zero; } + static Vector3 worldMap_GetCenter(IntPtr worldMapPtr) { return Vector3.zero; } + static Vector3 worldMap_GetExtent(IntPtr worldMapPtr) { return Vector3.zero; } + static IntPtr worldMap_GetPointCloud(IntPtr worldMapPtr) { return IntPtr.Zero; } + static bool worldMap_GetSupported() { return false; } + static long worldMap_SerializedLength(IntPtr worldMapPtr) { return 0; } + static void worldMap_SerializeToByteArray(IntPtr worldMapPtr, IntPtr serByteArray) { } + static IntPtr worldMap_SerializeFromByteArray(IntPtr serByteArray, long lengthBytes) { return IntPtr.Zero; } +#endif + } + + + [Serializable] + public class serializableARWorldMap + { + byte [] arWorldMapData; + + public serializableARWorldMap(byte [] inputMapData) + { + arWorldMapData = inputMapData; + } + + public static implicit operator serializableARWorldMap(ARWorldMap arWorldMap) + { + if (arWorldMap != null) + { + return new serializableARWorldMap (arWorldMap.SerializeToByteArray ()); + + } + else + { + return new serializableARWorldMap (null); + } + } + + public static implicit operator ARWorldMap(serializableARWorldMap serWorldMap) + { + if (serWorldMap != null) + { + return ARWorldMap.SerializeFromByteArray (serWorldMap.arWorldMapData); + } + else + { + return null; + } + } + + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.cs.meta new file mode 100644 index 00000000..8dd1610c --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: d6ccdb980d3cc426fa6b8cd27bc9b963 +timeCreated: 1523481779 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.mm b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.mm new file mode 100644 index 00000000..1a631c2a --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.mm @@ -0,0 +1,170 @@ +// Unity Technologies Inc (c) 2018 +// ARWorldMap.mm +// Main implementation of ARKit plugin's ARWorldMap + +#include "ARKitDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +bool worldMap_GetSupported() +{ + return UnityAreFeaturesSupported(kUnityARKitSupportedFeaturesWorldMap); +} + +bool worldMap_Save(const void* worldMapPtr, const char* path) +{ + if (worldMapPtr == nullptr || path == nullptr || !worldMap_GetSupported()) + return false; + + if (@available(iOS 12.0, *)) + { + ARWorldMap* worldMap = (__bridge ARWorldMap*)worldMapPtr; + NSError* writeError = nil; + NSURL* url = [[NSURL alloc] initFileURLWithPath:[NSString stringWithUTF8String:path] isDirectory:false]; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:worldMap]; + [data writeToURL:url options:(NSDataWritingAtomic) error:&writeError]; + + if (writeError) + NSLog(@"%@", writeError); + + return (writeError == nil); + } + else + { + // Fallback on earlier versions without ARWorldMap + return false; + } +} + +void* worldMap_Load(const char* path) +{ + if (!worldMap_GetSupported()) + return nullptr; + + NSError* error = nil; + NSURL* url = [[NSURL alloc] initFileURLWithPath:[NSString stringWithUTF8String:path] isDirectory:false]; + NSData *wmdata = [NSData dataWithContentsOfURL:url options:NSDataReadingMappedAlways error:&error]; + + if (error) + NSLog(@"%@", error); + + if (@available(iOS 12.0, *)) + { + ARWorldMap* worldMap = [NSKeyedUnarchiver unarchiveObjectWithData:wmdata]; + return (__bridge_retained void*)worldMap; + } + else + { + // Fallback on earlier versions of iOS without ARWorldMap + return nullptr; + } +} + +long worldMap_SerializedLength(const void* worldMapPtr) +{ + if (@available(iOS 12.0, *)) + { + ARWorldMap* worldMap = (__bridge ARWorldMap*)worldMapPtr; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:worldMap]; + return data.length; + } + else + { + // Fallback on earlier versions + return 0; + } +} + +void worldMap_SerializeToByteArray(const void* worldMapPtr, void* pinnedArray) +{ + if (@available(iOS 12.0, *)) + { + ARWorldMap* worldMap = (__bridge ARWorldMap*)worldMapPtr; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:worldMap]; + memcpy(pinnedArray, data.bytes, data.length); + } +} + +void* worldMap_SerializeFromByteArray(const void* pinnedArray, long lengthBytes) +{ + + if (@available(iOS 12.0, *)) + { + NSData *wmdata = [NSData dataWithBytes:pinnedArray length:lengthBytes]; + ARWorldMap* worldMap = [NSKeyedUnarchiver unarchiveObjectWithData:wmdata]; + return (__bridge_retained void*)worldMap; + } + else + { + // Fallback on earlier versions + return nullptr; + } +} + +UnityARVector3 worldMap_GetCenter(const void* worldMapPtr) +{ + if (worldMapPtr == nullptr || !worldMap_GetSupported()) + return UnityARVector3{0, 0, 0}; + + if (@available(iOS 12.0, *)) + { + ARWorldMap* worldMap = (__bridge ARWorldMap*)worldMapPtr; + return UnityARVector3 + { + worldMap.center.x, + worldMap.center.y, + worldMap.center.z + }; + } + else + { + // Fallback on earlier versions + return UnityARVector3{0, 0, 0}; + } +} + +UnityARVector3 worldMap_GetExtent(const void* worldMapPtr) +{ + if (worldMapPtr == nullptr || !worldMap_GetSupported()) + return UnityARVector3{0, 0, 0}; + + if (@available(iOS 12.0, *)) { + ARWorldMap* worldMap = (__bridge ARWorldMap*)worldMapPtr; + return UnityARVector3 + { + worldMap.extent.x, + worldMap.extent.y, + worldMap.extent.z + }; + } + else + { + // Fallback on earlier versions + return UnityARVector3{0, 0, 0}; + } +} + +void* worldMap_GetPointCloud(const void* worldMapPtr) +{ + if (worldMapPtr == nullptr || !worldMap_GetSupported()) + return nullptr; + + if (@available(iOS 12.0, *)) + { + ARWorldMap* worldMap = (__bridge ARWorldMap*)worldMapPtr; + ARPointCloud *pointCloud = [worldMap rawFeaturePoints]; + return (__bridge_retained void*)pointCloud; + } + else + { + // Fallback on earlier versions + return nullptr; + } +} + +#ifdef __cplusplus +} +#endif + diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.mm.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.mm.meta new file mode 100644 index 00000000..c48900e0 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/ARWorldMap.mm.meta @@ -0,0 +1,36 @@ +fileFormatVersion: 2 +guid: e83709c0997c14c27964ea8736f5cbf1 +timeCreated: 1523567805 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + - first: + tvOS: tvOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/UnityARSessionNativeInterface.cs b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/UnityARSessionNativeInterface.cs new file mode 100644 index 00000000..0097e3ac --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/UnityARSessionNativeInterface.cs @@ -0,0 +1,1137 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; +using System.Runtime.InteropServices; +using AOT; + +namespace UnityEngine.XR.iOS +{ + + /// + /// A struct that allows us go from native Matrix4x4 to managed + /// + public struct UnityARMatrix4x4 + { + public Vector4 column0; + public Vector4 column1; + public Vector4 column2; + public Vector4 column3; + + public UnityARMatrix4x4(Vector4 c0, Vector4 c1, Vector4 c2, Vector4 c3) + { + column0 = c0; column1 = c1; column2 = c2; column3 = c3; + } + } + + [Serializable] + public struct UnityVideoParams + { + public int yWidth; + public int yHeight; + public int screenOrientation; + public float texCoordScale; + public IntPtr cvPixelBufferPtr; + } + + struct internal_UnityARCamera + { + public UnityARMatrix4x4 worldTransform; + public UnityARMatrix4x4 projectionMatrix; + public ARTrackingState trackingState; + public ARTrackingStateReason trackingReason; + public UnityVideoParams videoParams; + public UnityMarshalLightData lightData; + public UnityARMatrix4x4 displayTransform; + public IntPtr pointCloud; + public uint getLightEstimation; + public ARWorldMappingStatus worldMappngStatus; + } + + public struct UnityARCamera + { + public UnityARMatrix4x4 worldTransform; + public UnityARMatrix4x4 projectionMatrix; + public ARTrackingState trackingState; + public ARTrackingStateReason trackingReason; + public UnityVideoParams videoParams; + public UnityARLightData lightData; + public UnityARMatrix4x4 displayTransform; + public ARPointCloud pointCloud; + public ARWorldMappingStatus worldMappingStatus; + + public UnityARCamera(UnityARMatrix4x4 wt, UnityARMatrix4x4 pm, ARTrackingState ats, ARTrackingStateReason atsr, UnityVideoParams uvp, UnityARLightData lightDat, UnityARMatrix4x4 dt, ARPointCloud ptCloud, ARWorldMappingStatus awms) + { + worldTransform = wt; + projectionMatrix = pm; + trackingState = ats; + trackingReason = atsr; + videoParams = uvp; + lightData = lightDat; + displayTransform = dt; + pointCloud = ptCloud; + worldMappingStatus = awms; + } + } + + + + public struct UnityARUserAnchorData + { + + public IntPtr ptrIdentifier; + + /** + The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. + */ + public UnityARMatrix4x4 transform; + + public string identifierStr { get { return Marshal.PtrToStringAuto(this.ptrIdentifier); } } + + public static UnityARUserAnchorData UnityARUserAnchorDataFromGameObject(GameObject go) + { + // create an anchor data struct from a game object transform + Matrix4x4 arkitTransform = UnityARMatrixOps.UnityToARKitCoordChange(go.transform.position, go.transform.rotation); + UnityARUserAnchorData ad = new UnityARUserAnchorData(); + ad.transform.column0 = arkitTransform.GetColumn(0); + ad.transform.column1 = arkitTransform.GetColumn(1); + ad.transform.column2 = arkitTransform.GetColumn(2); + ad.transform.column3 = arkitTransform.GetColumn(3); + return ad; + } + } + + + public struct UnityARHitTestResult + { + /** + The type of the hit-test result. + */ + public ARHitTestResultType type; + + /** + The distance from the camera to the intersection in meters. + */ + public double distance; + + /** + The transformation matrix that defines the intersection's rotation, translation and scale + relative to the anchor or nearest feature point. + */ + public Matrix4x4 localTransform; + + /** + The transformation matrix that defines the intersection's rotation, translation and scale + relative to the world. + */ + public Matrix4x4 worldTransform; + + /** + The anchor that the hit-test intersected. + */ + public IntPtr anchor; + + /** + True if the test represents a valid hit test. Data is undefined otherwise. + */ + public bool isValid; + + } + + public enum UnityARAlignment + { + UnityARAlignmentGravity, + UnityARAlignmentGravityAndHeading, + UnityARAlignmentCamera + } + + public enum UnityARPlaneDetection + { + None = 0, + Horizontal = (1 << 0), + Vertical = (1 << 1), + HorizontalAndVertical = (1 << 1) | (1 << 0) + } + + public struct ARKitSessionConfiguration + { + public UnityARAlignment alignment; + public bool getPointCloudData; + public bool enableLightEstimation; + public bool IsSupported { get { return IsARKitSessionConfigurationSupported(); } private set { } } + + public ARKitSessionConfiguration(UnityARAlignment alignment = UnityARAlignment.UnityARAlignmentGravity, + bool getPointCloudData = false, + bool enableLightEstimation = false) + { + this.getPointCloudData = getPointCloudData; + this.alignment = alignment; + this.enableLightEstimation = enableLightEstimation; + } + +#if UNITY_EDITOR || !UNITY_IOS + private bool IsARKitSessionConfigurationSupported() + { + return true; + } +#else + [DllImport("__Internal")] + private static extern bool IsARKitSessionConfigurationSupported(); +#endif + } + + + + public struct ARKitWorldTrackingSessionConfiguration + { + public UnityARAlignment alignment; + public UnityARPlaneDetection planeDetection; + public bool getPointCloudData; + public bool enableLightEstimation; + public bool enableAutoFocus; + public UnityAREnvironmentTexturing environmentTexturing; + public int maximumNumberOfTrackedImages; + public IntPtr videoFormat; + public string referenceImagesGroupName; + public string referenceObjectsGroupName; + public bool IsSupported { get { return IsARKitWorldTrackingSessionConfigurationSupported(); } private set { } } + public IntPtr dynamicReferenceObjectsPtr; +#pragma warning disable CS0414 // Unused private variable + private IntPtr m_worldMapPtr; +#pragma warning restore CS0414 + public ARWorldMap worldMap + { + set { m_worldMapPtr = (value == null) ? IntPtr.Zero : value.nativePtr; } + } + + public static bool environmentTexturingSupported + { + get + { + return sessionConfig_IsEnvironmentTexturingSupported(); + } + } + + public ARKitWorldTrackingSessionConfiguration( + UnityARAlignment alignment = UnityARAlignment.UnityARAlignmentGravity, + UnityARPlaneDetection planeDetection = UnityARPlaneDetection.Horizontal, + bool getPointCloudData = false, + bool enableLightEstimation = false, + bool enableAutoFocus = true, + UnityAREnvironmentTexturing environmentTexturing = UnityAREnvironmentTexturing.UnityAREnvironmentTexturingNone, + int maximumNumberOfTrackedImages = 0, + IntPtr vidFormat = default(IntPtr), + string refImageGroup = null, + string refObjectGroup = null, + ARWorldMap worldMap = null) + { + this.getPointCloudData = getPointCloudData; + this.alignment = alignment; + this.planeDetection = planeDetection; + this.enableLightEstimation = enableLightEstimation; + this.enableAutoFocus = enableAutoFocus; + this.environmentTexturing = environmentTexturing; + this.videoFormat = vidFormat; + this.referenceImagesGroupName = refImageGroup; + this.referenceObjectsGroupName = refObjectGroup; + this.dynamicReferenceObjectsPtr = IntPtr.Zero; + this.m_worldMapPtr = (worldMap == null) ? IntPtr.Zero : worldMap.nativePtr; + this.maximumNumberOfTrackedImages = maximumNumberOfTrackedImages; + } + +#if UNITY_EDITOR || !UNITY_IOS + static bool IsARKitWorldTrackingSessionConfigurationSupported() { return true; } + static bool sessionConfig_IsEnvironmentTexturingSupported() { return false; } +#else + [DllImport("__Internal")] + static extern bool IsARKitWorldTrackingSessionConfigurationSupported(); + + [DllImport("__Internal")] + static extern bool sessionConfig_IsEnvironmentTexturingSupported(); +#endif + } + + public struct ARKitFaceTrackingConfiguration + { + public UnityARAlignment alignment; + public bool enableLightEstimation; + public IntPtr videoFormat; + public bool IsSupported { get { return IsARKitFaceTrackingConfigurationSupported(); } private set { } } + + public ARKitFaceTrackingConfiguration(UnityARAlignment alignment = UnityARAlignment.UnityARAlignmentGravity, + bool enableLightEstimation = false, + IntPtr vidFormat = default(IntPtr)) + { + this.alignment = alignment; + this.enableLightEstimation = enableLightEstimation; + videoFormat = vidFormat; + } + +#if UNITY_EDITOR || !UNITY_IOS + private bool IsARKitFaceTrackingConfigurationSupported() + { + return true; + } +#else + [DllImport("__Internal")] + private static extern bool IsARKitFaceTrackingConfigurationSupported(); +#endif + + } + + public enum UnityARSessionRunOption + { + /** The session will reset tracking. */ + ARSessionRunOptionResetTracking = (1 << 0), + + /** The session will remove existing anchors. */ + ARSessionRunOptionRemoveExistingAnchors = (1 << 1) + } + + public partial class UnityARSessionNativeInterface + { + + // public delegate void ARFrameUpdate(UnityARMatrix4x4 cameraPos, UnityARMatrix4x4 projection); + // public static event ARFrameUpdate ARFrameUpdatedEvent; + + // Plane Anchors + public delegate void ARFrameUpdate(UnityARCamera camera); + public static event ARFrameUpdate ARFrameUpdatedEvent; + + public delegate void ARAnchorAdded(ARPlaneAnchor anchorData); + public static event ARAnchorAdded ARAnchorAddedEvent; + + public delegate void ARAnchorUpdated(ARPlaneAnchor anchorData); + public static event ARAnchorUpdated ARAnchorUpdatedEvent; + + public delegate void ARAnchorRemoved(ARPlaneAnchor anchorData); + public static event ARAnchorRemoved ARAnchorRemovedEvent; + + // User Anchors + public delegate void ARUserAnchorAdded(ARUserAnchor anchorData); + public static event ARUserAnchorAdded ARUserAnchorAddedEvent; + + public delegate void ARUserAnchorUpdated(ARUserAnchor anchorData); + public static event ARUserAnchorUpdated ARUserAnchorUpdatedEvent; + + public delegate void ARUserAnchorRemoved(ARUserAnchor anchorData); + public static event ARUserAnchorRemoved ARUserAnchorRemovedEvent; + + // Face Anchors + public delegate void ARFaceAnchorAdded(ARFaceAnchor anchorData); + public static event ARFaceAnchorAdded ARFaceAnchorAddedEvent; + + public delegate void ARFaceAnchorUpdated(ARFaceAnchor anchorData); + public static event ARFaceAnchorUpdated ARFaceAnchorUpdatedEvent; + + public delegate void ARFaceAnchorRemoved(ARFaceAnchor anchorData); + public static event ARFaceAnchorRemoved ARFaceAnchorRemovedEvent; + + // Image Anchors + public delegate void ARImageAnchorAdded(ARImageAnchor anchorData); + public static event ARImageAnchorAdded ARImageAnchorAddedEvent; + + public delegate void ARImageAnchorUpdated(ARImageAnchor anchorData); + public static event ARImageAnchorUpdated ARImageAnchorUpdatedEvent; + + public delegate void ARImageAnchorRemoved(ARImageAnchor anchorData); + public static event ARImageAnchorRemoved ARImageAnchorRemovedEvent; + + public delegate void ARSessionFailed(string error); + public static event ARSessionFailed ARSessionFailedEvent; + + public delegate void ARSessionCallback(); + public delegate bool ARSessionLocalizeCallback(); + public static event ARSessionCallback ARSessionInterruptedEvent; + public static event ARSessionCallback ARSessioninterruptionEndedEvent; + public delegate void ARSessionTrackingChanged(UnityARCamera camera); + public static event ARSessionTrackingChanged ARSessionTrackingChangedEvent; + + public static bool ARSessionShouldAttemptRelocalization { get; set; } + + delegate void internal_ARFrameUpdate(internal_UnityARCamera camera); + public delegate void internal_ARAnchorAdded(UnityARAnchorData anchorData); + public delegate void internal_ARAnchorUpdated(UnityARAnchorData anchorData); + public delegate void internal_ARAnchorRemoved(UnityARAnchorData anchorData); + public delegate void internal_ARUserAnchorAdded(UnityARUserAnchorData anchorData); + public delegate void internal_ARUserAnchorUpdated(UnityARUserAnchorData anchorData); + public delegate void internal_ARUserAnchorRemoved(UnityARUserAnchorData anchorData); + public delegate void internal_ARFaceAnchorAdded(UnityARFaceAnchorData anchorData); + public delegate void internal_ARFaceAnchorUpdated(UnityARFaceAnchorData anchorData); + public delegate void internal_ARFaceAnchorRemoved(UnityARFaceAnchorData anchorData); + public delegate void internal_ARImageAnchorAdded(UnityARImageAnchorData anchorData); + public delegate void internal_ARImageAnchorUpdated(UnityARImageAnchorData anchorData); + public delegate void internal_ARImageAnchorRemoved(UnityARImageAnchorData anchorData); + delegate void internal_ARSessionTrackingChanged(internal_UnityARCamera camera); + + private static UnityARCamera s_Camera; + +#if !UNITY_EDITOR && UNITY_IOS + private IntPtr m_NativeARSession; + + + [DllImport("__Internal")] + private static extern IntPtr unity_CreateNativeARSession(); + + [DllImport("__Internal")] + private static extern void session_SetSessionCallbacks( + IntPtr nativeSession, + internal_ARFrameUpdate frameCallback, + ARSessionFailed sessionFailed, + ARSessionCallback sessionInterrupted, + ARSessionCallback sessionInterruptionEnded, + ARSessionLocalizeCallback sessionShouldRelocalize, + internal_ARSessionTrackingChanged trackingChanged, + Action sessionWorldMapCompletionHandler, + Action sessionRefObjExtractCompletionHandler); + + [DllImport("__Internal")] + private static extern void session_SetPlaneAnchorCallbacks(IntPtr nativeSession, internal_ARAnchorAdded anchorAddedCallback, + internal_ARAnchorUpdated anchorUpdatedCallback, + internal_ARAnchorRemoved anchorRemovedCallback); + + [DllImport("__Internal")] + private static extern void session_SetUserAnchorCallbacks(IntPtr nativeSession, internal_ARUserAnchorAdded userAnchorAddedCallback, + internal_ARUserAnchorUpdated userAnchorUpdatedCallback, + internal_ARUserAnchorRemoved userAnchorRemovedCallback); + + [DllImport("__Internal")] + private static extern void session_SetImageAnchorCallbacks(IntPtr nativeSession, internal_ARImageAnchorAdded imageAnchorAddedCallback, + internal_ARImageAnchorUpdated imageAnchorUpdatedCallback, + internal_ARImageAnchorRemoved imageAnchorRemovedCallback); + + [DllImport("__Internal")] + private static extern void session_SetFaceAnchorCallbacks(IntPtr nativeSession, internal_ARFaceAnchorAdded faceAnchorAddedCallback, + internal_ARFaceAnchorUpdated faceAnchorUpdatedCallback, + internal_ARFaceAnchorRemoved faceAnchorRemovedCallback); + + [DllImport("__Internal")] + private static extern IntPtr session_GetARKitSessionPtr(IntPtr nativeSession); + + [DllImport("__Internal")] + private static extern IntPtr session_GetARKitFramePtr(IntPtr nativeSession); + + [DllImport("__Internal")] + private static extern void StartWorldTrackingSession(IntPtr nativeSession, ARKitWorldTrackingSessionConfiguration configuration); + + [DllImport("__Internal")] + private static extern void StartWorldTrackingSessionWithOptions(IntPtr nativeSession, ARKitWorldTrackingSessionConfiguration configuration, UnityARSessionRunOption runOptions); + + [DllImport("__Internal")] + private static extern void StartSession(IntPtr nativeSession, ARKitSessionConfiguration configuration); + + [DllImport("__Internal")] + private static extern void StartSessionWithOptions(IntPtr nativeSession, ARKitSessionConfiguration configuration, UnityARSessionRunOption runOptions); + + [DllImport("__Internal")] + private static extern void StartFaceTrackingSession(IntPtr nativeSession, ARKitFaceTrackingConfiguration configuration); + + [DllImport("__Internal")] + private static extern void StartFaceTrackingSessionWithOptions(IntPtr nativeSession, ARKitFaceTrackingConfiguration configuration, UnityARSessionRunOption runOptions); + + [DllImport("__Internal")] + private static extern void PauseSession(IntPtr nativeSession); + + [DllImport("__Internal")] + private static extern int HitTest(IntPtr nativeSession, ARPoint point, ARHitTestResultType types); + + [DllImport("__Internal")] + private static extern UnityARHitTestResult GetLastHitTestResult(int index); + + [DllImport("__Internal")] + private static extern ARTextureHandles.ARTextureHandlesStruct GetVideoTextureHandles(); + + [DllImport("__Internal")] + public static extern void ReleaseVideoTextureHandles(ARTextureHandles.ARTextureHandlesStruct handles); + + [DllImport("__Internal")] + private static extern float GetAmbientIntensity(); + + [DllImport("__Internal")] + private static extern int GetTrackingQuality(); + + [DllImport("__Internal")] + private static extern void SetCameraNearFar (float nearZ, float farZ); + + [DllImport("__Internal")] + private static extern void CapturePixelData (int enable, IntPtr pYPixelBytes, IntPtr pUVPixelBytes); + + [DllImport("__Internal")] + private static extern UnityARUserAnchorData SessionAddUserAnchor (IntPtr nativeSession, UnityARUserAnchorData anchorData); + + [DllImport("__Internal")] + private static extern void SessionRemoveUserAnchor (IntPtr nativeSession, [MarshalAs(UnmanagedType.LPStr)] string anchorIdentifier); + + [DllImport("__Internal")] + private static extern void SessionSetWorldOrigin (IntPtr nativeSession, Matrix4x4 worldMatrix); + + [DllImport("__Internal")] + private static extern bool Native_IsARKit_1_5_Supported(); + + [DllImport("__Internal")] + private static extern bool Native_IsARKit_2_0_Supported(); + + [DllImport("__Internal")] + private static extern void session_GetCurrentWorldMap(IntPtr nativeSession, IntPtr callbackPtr); + + [DllImport("__Internal")] + private static extern void session_ExtractReferenceObject(IntPtr nativeSession, Matrix4x4 unityTransform, Vector3 center, Vector3 extent, IntPtr callbackPtr); + +#else + private static void session_GetCurrentWorldMap(IntPtr nativeSession, IntPtr callbackPtr) + { + _ar_session_get_world_map_completion_handler(callbackPtr, IntPtr.Zero); + } + + private static void session_ExtractReferenceObject(IntPtr nativeSession, Matrix4x4 unityTransform, Vector3 center, Vector3 extent, IntPtr callbackPtr) + { + _ar_session_ref_obj_extract_completion_handler(callbackPtr, IntPtr.Zero); + } + +#endif + + public static bool IsARKit_1_5_Supported() + { +#if !UNITY_EDITOR && UNITY_IOS + return Native_IsARKit_1_5_Supported(); +#else + return true; //since we might need to do some editor shenanigans +#endif + } + + public static bool IsARKit_2_0_Supported() + { +#if !UNITY_EDITOR && UNITY_IOS + return Native_IsARKit_2_0_Supported(); +#else + return true; //since we might need to do some editor shenanigans +#endif + } + + public UnityARSessionNativeInterface() + { +#if !UNITY_EDITOR && UNITY_IOS + m_NativeARSession = unity_CreateNativeARSession(); + session_SetSessionCallbacks(m_NativeARSession, _frame_update, _ar_session_failed, _ar_session_interrupted, + _ar_session_interruption_ended, _ar_session_should_relocalize, _ar_tracking_changed, _ar_session_get_world_map_completion_handler, + _ar_session_ref_obj_extract_completion_handler); + session_SetPlaneAnchorCallbacks(m_NativeARSession, _anchor_added, _anchor_updated, _anchor_removed); + session_SetUserAnchorCallbacks(m_NativeARSession, _user_anchor_added, _user_anchor_updated, _user_anchor_removed); + session_SetFaceAnchorCallbacks(m_NativeARSession, _face_anchor_added, _face_anchor_updated, _face_anchor_removed); + session_SetImageAnchorCallbacks(m_NativeARSession, _image_anchor_added, _image_anchor_updated, _image_anchor_removed); + session_SetObjectAnchorCallbacks(m_NativeARSession, _object_anchor_added, _object_anchor_updated, _object_anchor_removed); + session_SetEnvironmentProbeAnchorCallbacks(m_NativeARSession, _envprobe_anchor_added, _envprobe_anchor_updated, _envprobe_anchor_removed); +#endif + } + + static UnityARSessionNativeInterface s_UnityARSessionNativeInterface = null; + + /// + /// Gets the current session's ARWorldMap, or null if the map could not be retrieved + /// + public void GetCurrentWorldMapAsync(Action completionCallback) + { + if (completionCallback == null) + return; + +#if !UNITY_EDITOR && UNITY_IOS + GCHandle handle = GCHandle.Alloc(completionCallback); + session_GetCurrentWorldMap(m_NativeARSession, GCHandle.ToIntPtr(handle)); +#else + // Not supported: Invoke user callback immediately with null ARWorldMap + completionCallback(null); +#endif + } + + /// + /// Gets the current session's ARWorldMap, or null if the map could not be retrieved + /// + public void ExtractReferenceObjectAsync(Transform objectTransform, Vector3 center, Vector3 extent, Action completionCallback) + { + if (completionCallback == null) + return; + +#if !UNITY_EDITOR && UNITY_IOS + Matrix4x4 arkitTransform = UnityARMatrixOps.UnityToARKitCoordChange(objectTransform.position, objectTransform.rotation); + Vector3 arkitCenter = new Vector3(center.x, center.y, -center.z); + GCHandle handle = GCHandle.Alloc(completionCallback); + session_ExtractReferenceObject(m_NativeARSession, arkitTransform, arkitCenter, extent, GCHandle.ToIntPtr(handle)); +#else + // Not supported: Invoke user callback immediately with null ARReferenceObject + completionCallback(null); +#endif + } + + public static UnityARSessionNativeInterface GetARSessionNativeInterface() + { + if (s_UnityARSessionNativeInterface == null) + { + s_UnityARSessionNativeInterface = new UnityARSessionNativeInterface(); + } + return s_UnityARSessionNativeInterface; + } + + public IntPtr GetNativeSessionPtr() + { +#if !UNITY_EDITOR && UNITY_IOS + return session_GetARKitSessionPtr(m_NativeARSession); +#else + return IntPtr.Zero; +#endif + } + + public IntPtr GetNativeFramePtr() + { +#if !UNITY_EDITOR && UNITY_IOS + return session_GetARKitFramePtr(m_NativeARSession); +#else + return IntPtr.Zero; +#endif + } + +#if UNITY_EDITOR + public static void SetStaticCamera(UnityARCamera scamera) + { + s_Camera = scamera; + } + + public static void RunFrameUpdateCallbacks() + { + if (ARFrameUpdatedEvent != null) + { + ARFrameUpdatedEvent(s_Camera); + } + } + + public static void RunAddAnchorCallbacks(ARPlaneAnchor arPlaneAnchor) + { + if (ARAnchorAddedEvent != null) + { + ARAnchorAddedEvent(arPlaneAnchor); + } + } + + public static void RunUpdateAnchorCallbacks(ARPlaneAnchor arPlaneAnchor) + { + if (ARAnchorUpdatedEvent != null) + { + ARAnchorUpdatedEvent(arPlaneAnchor); + } + } + + public static void RunRemoveAnchorCallbacks(ARPlaneAnchor arPlaneAnchor) + { + if (ARAnchorRemovedEvent != null) + { + ARAnchorRemovedEvent(arPlaneAnchor); + } + } + + public static void RunAddAnchorCallbacks(ARFaceAnchor arFaceAnchor) + { + if (ARFaceAnchorAddedEvent != null) + { + ARFaceAnchorAddedEvent(arFaceAnchor); + } + } + + public static void RunUpdateAnchorCallbacks(ARFaceAnchor arFaceAnchor) + { + if (ARFaceAnchorUpdatedEvent != null) + { + ARFaceAnchorUpdatedEvent(arFaceAnchor); + } + } + + public static void RunRemoveAnchorCallbacks(ARFaceAnchor arFaceAnchor) + { + if (ARFaceAnchorRemovedEvent != null) + { + ARFaceAnchorRemovedEvent(arFaceAnchor); + } + } + + private static void CreateRemoteFaceTrackingConnection(ARKitFaceTrackingConfiguration config, UnityARSessionRunOption runOptions) + { + GameObject go = new GameObject("ARKitFaceTrackingRemoteConnection"); + ARKitFaceTrackingRemoteConnection addComp = go.AddComponent(); + addComp.enableLightEstimation = config.enableLightEstimation; + addComp.resetTracking = (runOptions & UnityARSessionRunOption.ARSessionRunOptionResetTracking) != 0; + addComp.removeExistingAnchors = (runOptions & UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors) != 0; + } + + private static void CreateRemoteWorldTrackingConnection(ARKitWorldTrackingSessionConfiguration config, UnityARSessionRunOption runOptions) + { + GameObject go = new GameObject("ARKitWorldTrackingRemoteConnection"); + ARKitRemoteConnection addComp = go.AddComponent(); + addComp.planeDetection = config.planeDetection; + addComp.startAlignment = config.alignment; + addComp.getPointCloud = config.getPointCloudData; + addComp.enableLightEstimation = config.enableLightEstimation; + addComp.resetTracking = (runOptions & UnityARSessionRunOption.ARSessionRunOptionResetTracking) != 0; + addComp.removeExistingAnchors = (runOptions & UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors) != 0; + } + +#endif + + public Matrix4x4 GetCameraPose() + { + Matrix4x4 matrix = new Matrix4x4(); + matrix.SetColumn(0, s_Camera.worldTransform.column0); + matrix.SetColumn(1, s_Camera.worldTransform.column1); + matrix.SetColumn(2, s_Camera.worldTransform.column2); + matrix.SetColumn(3, s_Camera.worldTransform.column3); + return matrix; + } + + public Matrix4x4 GetCameraProjection() + { + Matrix4x4 matrix = new Matrix4x4(); + matrix.SetColumn(0, s_Camera.projectionMatrix.column0); + matrix.SetColumn(1, s_Camera.projectionMatrix.column1); + matrix.SetColumn(2, s_Camera.projectionMatrix.column2); + matrix.SetColumn(3, s_Camera.projectionMatrix.column3); + return matrix; + } + + public void SetCameraClipPlanes(float nearZ, float farZ) + { +#if !UNITY_EDITOR && UNITY_IOS + SetCameraNearFar (nearZ, farZ); +#endif + } + + public void SetCapturePixelData(bool enable, IntPtr pYByteArray, IntPtr pUVByteArray) + { +#if !UNITY_EDITOR && UNITY_IOS + int iEnable = enable ? 1 : 0; + CapturePixelData (iEnable,pYByteArray, pUVByteArray); +#endif + } + + [MonoPInvokeCallback(typeof(Action))] + static void _ar_session_ref_obj_extract_completion_handler(IntPtr callbackPtr, IntPtr referenceObjectPtr) + { + GCHandle handle = GCHandle.FromIntPtr(callbackPtr); + Action completionCallback = (Action)handle.Target; + completionCallback(ARReferenceObject.FromPtr(referenceObjectPtr)); + handle.Free(); + } + + [MonoPInvokeCallback(typeof(Action))] + static void _ar_session_get_world_map_completion_handler(IntPtr callbackPtr, IntPtr worldMapPtr) + { + GCHandle handle = GCHandle.FromIntPtr(callbackPtr); + Action completionCallback = (Action)handle.Target; + completionCallback(ARWorldMap.FromPtr(worldMapPtr)); + handle.Free(); + } + + [MonoPInvokeCallback(typeof(Action))] + static void _ar_session_get_environment_texture_completion_handler(IntPtr callbackPtr, IntPtr texturePtr) + { + GCHandle handle = GCHandle.FromIntPtr(callbackPtr); + var completionCallback = (Action)handle.Target; + + if (texturePtr == IntPtr.Zero) + { + completionCallback(null); + } + else + { + completionCallback(Cubemap.CreateExternalTexture(0, TextureFormat.R8, false, texturePtr)); + } + + handle.Free(); + } + + [MonoPInvokeCallback(typeof(internal_ARFrameUpdate))] + static void _frame_update(internal_UnityARCamera camera) + { + UnityARCamera pubCamera = new UnityARCamera(); + pubCamera.projectionMatrix = camera.projectionMatrix; + pubCamera.worldTransform = camera.worldTransform; + pubCamera.trackingState = camera.trackingState; + pubCamera.trackingReason = camera.trackingReason; + pubCamera.videoParams = camera.videoParams; + pubCamera.worldMappingStatus = camera.worldMappngStatus; + pubCamera.pointCloud = ARPointCloud.FromPtr(camera.pointCloud); + + if (camera.getLightEstimation == 1) + { + pubCamera.lightData = camera.lightData; + } + + pubCamera.displayTransform = camera.displayTransform; + s_Camera = pubCamera; + + if (ARFrameUpdatedEvent != null) + { + ARFrameUpdatedEvent(s_Camera); + } + } + + [MonoPInvokeCallback(typeof(internal_ARSessionTrackingChanged))] + static void _ar_tracking_changed(internal_UnityARCamera camera) + { + // we only update the current camera's tracking state since that's all + // this cllback is for + s_Camera.trackingState = camera.trackingState; + s_Camera.trackingReason = camera.trackingReason; + if (ARSessionTrackingChangedEvent != null) + { + ARSessionTrackingChangedEvent(s_Camera); + } + } + + static ARUserAnchor GetUserAnchorFromAnchorData(UnityARUserAnchorData anchor) + { + //get the identifier for this anchor from the pointer + ARUserAnchor arUserAnchor = new ARUserAnchor(); + arUserAnchor.identifier = Marshal.PtrToStringAuto(anchor.ptrIdentifier); + + Matrix4x4 matrix = new Matrix4x4(); + matrix.SetColumn(0, anchor.transform.column0); + matrix.SetColumn(1, anchor.transform.column1); + matrix.SetColumn(2, anchor.transform.column2); + matrix.SetColumn(3, anchor.transform.column3); + + arUserAnchor.transform = matrix; + return arUserAnchor; + } + + static ARHitTestResult GetHitTestResultFromResultData(UnityARHitTestResult resultData) + { + ARHitTestResult arHitTestResult = new ARHitTestResult(); + arHitTestResult.type = resultData.type; + arHitTestResult.distance = resultData.distance; + arHitTestResult.localTransform = resultData.localTransform; + arHitTestResult.worldTransform = resultData.worldTransform; + arHitTestResult.isValid = resultData.isValid; + if (resultData.anchor != IntPtr.Zero) + { + arHitTestResult.anchorIdentifier = Marshal.PtrToStringAuto(resultData.anchor); + } + return arHitTestResult; + } + + #region Plane Anchors +#if !UNITY_EDITOR && UNITY_IOS + [MonoPInvokeCallback(typeof(internal_ARAnchorAdded))] + static void _anchor_added(UnityARAnchorData anchor) + { + if (ARAnchorAddedEvent != null) + { + ARPlaneAnchor arPlaneAnchor = new ARPlaneAnchor(anchor); + ARAnchorAddedEvent(arPlaneAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARAnchorUpdated))] + static void _anchor_updated(UnityARAnchorData anchor) + { + if (ARAnchorUpdatedEvent != null) + { + ARPlaneAnchor arPlaneAnchor = new ARPlaneAnchor(anchor); + ARAnchorUpdatedEvent(arPlaneAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARAnchorRemoved))] + static void _anchor_removed(UnityARAnchorData anchor) + { + if (ARAnchorRemovedEvent != null) + { + ARPlaneAnchor arPlaneAnchor = new ARPlaneAnchor(anchor); + ARAnchorRemovedEvent(arPlaneAnchor); + } + } +#endif + #endregion + + #region User Anchors + [MonoPInvokeCallback(typeof(internal_ARUserAnchorAdded))] + static void _user_anchor_added(UnityARUserAnchorData anchor) + { + if (ARUserAnchorAddedEvent != null) + { + ARUserAnchor arUserAnchor = GetUserAnchorFromAnchorData(anchor); + ARUserAnchorAddedEvent(arUserAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARUserAnchorUpdated))] + static void _user_anchor_updated(UnityARUserAnchorData anchor) + { + if (ARUserAnchorUpdatedEvent != null) + { + ARUserAnchor arUserAnchor = GetUserAnchorFromAnchorData(anchor); + ARUserAnchorUpdatedEvent(arUserAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARUserAnchorRemoved))] + static void _user_anchor_removed(UnityARUserAnchorData anchor) + { + if (ARUserAnchorRemovedEvent != null) + { + ARUserAnchor arUserAnchor = GetUserAnchorFromAnchorData(anchor); + ARUserAnchorRemovedEvent(arUserAnchor); + } + } + #endregion + + #region Face Anchors +#if !UNITY_EDITOR && UNITY_IOS + static ARFaceAnchor arFaceAnchor; + + [MonoPInvokeCallback(typeof(internal_ARFaceAnchorAdded))] + static void _face_anchor_added(UnityARFaceAnchorData anchor) + { + if (ARFaceAnchorAddedEvent != null) + { + arFaceAnchor = new ARFaceAnchor(anchor); + ARFaceAnchorAddedEvent(arFaceAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARFaceAnchorUpdated))] + static void _face_anchor_updated(UnityARFaceAnchorData anchor) + { + if (ARFaceAnchorUpdatedEvent != null) + { + arFaceAnchor.Update(anchor); + ARFaceAnchorUpdatedEvent(arFaceAnchor); } + } + + [MonoPInvokeCallback(typeof(internal_ARFaceAnchorRemoved))] + static void _face_anchor_removed(UnityARFaceAnchorData anchor) + { + if (ARFaceAnchorRemovedEvent != null) + { + arFaceAnchor.Update(anchor); + ARFaceAnchorRemovedEvent(arFaceAnchor); + } + } +#endif + #endregion + + #region Image Anchors + [MonoPInvokeCallback(typeof(internal_ARImageAnchorAdded))] + static void _image_anchor_added(UnityARImageAnchorData anchor) + { + if (ARImageAnchorAddedEvent != null) + { + ARImageAnchor arImageAnchor = new ARImageAnchor(anchor); + ARImageAnchorAddedEvent(arImageAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARImageAnchorUpdated))] + static void _image_anchor_updated(UnityARImageAnchorData anchor) + { + if (ARImageAnchorUpdatedEvent != null) + { + ARImageAnchor arImageAnchor = new ARImageAnchor(anchor); + ARImageAnchorUpdatedEvent(arImageAnchor); + } + } + + [MonoPInvokeCallback(typeof(internal_ARImageAnchorRemoved))] + static void _image_anchor_removed(UnityARImageAnchorData anchor) + { + if (ARImageAnchorRemovedEvent != null) + { + ARImageAnchor arImageAnchor = new ARImageAnchor(anchor); + ARImageAnchorRemovedEvent(arImageAnchor); + } + } + #endregion + + + [MonoPInvokeCallback(typeof(ARSessionFailed))] + static void _ar_session_failed(string error) + { + if (ARSessionFailedEvent != null) + { + ARSessionFailedEvent(error); + } + } + + [MonoPInvokeCallback(typeof(ARSessionCallback))] + static void _ar_session_interrupted() + { + Debug.Log("ar_session_interrupted"); + if (ARSessionInterruptedEvent != null) + { + ARSessionInterruptedEvent(); + } + + } + + + [MonoPInvokeCallback(typeof(ARSessionCallback))] + static void _ar_session_interruption_ended() + { + Debug.Log("ar_session_interruption_ended"); + if (ARSessioninterruptionEndedEvent != null) + { + ARSessioninterruptionEndedEvent(); + } + } + + [MonoPInvokeCallback(typeof(ARSessionLocalizeCallback))] + static bool _ar_session_should_relocalize() + { + Debug.Log("_ar_session_should_relocalize"); + return ARSessionShouldAttemptRelocalization; + } + + public void RunWithConfigAndOptions(ARKitWorldTrackingSessionConfiguration config, UnityARSessionRunOption runOptions) + { +#if !UNITY_EDITOR && UNITY_IOS + StartWorldTrackingSessionWithOptions (m_NativeARSession, config, runOptions); +#elif UNITY_EDITOR + CreateRemoteWorldTrackingConnection(config, runOptions); +#endif + } + + public void RunWithConfig(ARKitWorldTrackingSessionConfiguration config) + { +#if !UNITY_EDITOR && UNITY_IOS + StartWorldTrackingSession(m_NativeARSession, config); +#elif UNITY_EDITOR + UnityARSessionRunOption runOptions = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking; + CreateRemoteWorldTrackingConnection(config, runOptions); +#endif + } + + public void Run() + { + RunWithConfig(new ARKitWorldTrackingSessionConfiguration(UnityARAlignment.UnityARAlignmentGravity, UnityARPlaneDetection.Horizontal)); + } + + public void RunWithConfigAndOptions(ARKitSessionConfiguration config, UnityARSessionRunOption runOptions) + { +#if !UNITY_EDITOR && UNITY_IOS + StartSessionWithOptions (m_NativeARSession, config, runOptions); +#endif + } + + public void RunWithConfig(ARKitSessionConfiguration config) + { +#if !UNITY_EDITOR && UNITY_IOS + StartSession(m_NativeARSession, config); +#endif + } + + public void RunWithConfigAndOptions(ARKitFaceTrackingConfiguration config, UnityARSessionRunOption runOptions) + { +#if !UNITY_EDITOR && UNITY_IOS + StartFaceTrackingSessionWithOptions (m_NativeARSession, config, runOptions); +#elif UNITY_EDITOR + CreateRemoteFaceTrackingConnection(config, runOptions); +#endif + } + + public void RunWithConfig(ARKitFaceTrackingConfiguration config) + { +#if !UNITY_EDITOR && UNITY_IOS + StartFaceTrackingSession(m_NativeARSession, config); +#elif UNITY_EDITOR + UnityARSessionRunOption runOptions = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking; + CreateRemoteFaceTrackingConnection(config, runOptions); +#endif + } + + + public void Pause() + { +#if !UNITY_EDITOR && UNITY_IOS + PauseSession(m_NativeARSession); +#endif + } + + public List HitTest(ARPoint point, ARHitTestResultType types) + { + List results = new List(); + return HitTest(point, types, results); + } + + public List HitTest(ARPoint point, ARHitTestResultType types, List results) + { + results.Clear(); +#if !UNITY_EDITOR && UNITY_IOS + int numResults = HitTest(m_NativeARSession, point, types); + + for (int i = 0; i < numResults; ++i) + { + var result = GetLastHitTestResult(i); + results.Add(GetHitTestResultFromResultData(result)); + } + + return results; +#else + return results; +#endif + } + +#if !UNITY_EDITOR && UNITY_IOS + public ARTextureHandles GetARVideoTextureHandles() + { +#if !UNITY_EDITOR && UNITY_IOS + return new ARTextureHandles(GetVideoTextureHandles()); +#else + return new ARTextureHandles(new ARTextureHandles.ARTextureHandlesStruct { textureY = IntPtr.Zero, textureCbCr = IntPtr.Zero }); +#endif + } + + [Obsolete("Hook ARFrameUpdatedEvent instead and get UnityARCamera.ambientIntensity")] + public float GetARAmbientIntensity() + { + return GetAmbientIntensity (); + } + + [Obsolete("Hook ARFrameUpdatedEvent instead and get UnityARCamera.trackingState")] + public int GetARTrackingQuality() + { + return GetTrackingQuality(); + } +#endif + + public UnityARUserAnchorData AddUserAnchor(UnityARUserAnchorData anchorData) + { +#if !UNITY_EDITOR && UNITY_IOS + return SessionAddUserAnchor(m_NativeARSession, anchorData); +#else + return new UnityARUserAnchorData(); +#endif + } + + public UnityARUserAnchorData AddUserAnchorFromGameObject(GameObject go) { +#if !UNITY_EDITOR && UNITY_IOS + UnityARUserAnchorData data = AddUserAnchor(UnityARUserAnchorData.UnityARUserAnchorDataFromGameObject(go)); + return data; +#else + return new UnityARUserAnchorData(); +#endif + } + + public void RemoveUserAnchor(string anchorIdentifier) + { +#if !UNITY_EDITOR && UNITY_IOS + + SessionRemoveUserAnchor(m_NativeARSession, anchorIdentifier); +#endif + } + + public void SetWorldOrigin(Transform worldTransform) + { +#if !UNITY_EDITOR && UNITY_IOS + //convert from Unity coord system to ARKit + Matrix4x4 worldMatrix = UnityARMatrixOps.UnityToARKitCoordChange(worldTransform.position, worldTransform.rotation); + SessionSetWorldOrigin (m_NativeARSession, worldMatrix); +#endif + } + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/UnityARSessionNativeInterface.cs.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/UnityARSessionNativeInterface.cs.meta new file mode 100644 index 00000000..6a1f99d9 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/NativeInterface/UnityARSessionNativeInterface.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 43900ad1460304627a359bed956a451d +timeCreated: 1492795428 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders.meta new file mode 100644 index 00000000..8fcc41f1 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f9e3cccf742844401a584fdd294d0607 +folderAsset: yes +timeCreated: 1492634328 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShader.shader b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShader.shader new file mode 100644 index 00000000..dafa0d62 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShader.shader @@ -0,0 +1,74 @@ +Shader "Unlit/ARCameraShader" +{ + Properties + { + _textureY ("TextureY", 2D) = "white" {} + _textureCbCr ("TextureCbCr", 2D) = "black" {} + } + SubShader + { + Cull Off + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + ZWrite Off + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + float4x4 _DisplayTransform; + + struct Vertex + { + float4 position : POSITION; + float2 texcoord : TEXCOORD0; + }; + + struct TexCoordInOut + { + float4 position : SV_POSITION; + float2 texcoord : TEXCOORD0; + }; + + TexCoordInOut vert (Vertex vertex) + { + TexCoordInOut o; + o.position = UnityObjectToClipPos(vertex.position); + + float texX = vertex.texcoord.x; + float texY = vertex.texcoord.y; + + o.texcoord.x = (_DisplayTransform[0].x * texX + _DisplayTransform[1].x * (texY) + _DisplayTransform[2].x); + o.texcoord.y = (_DisplayTransform[0].y * texX + _DisplayTransform[1].y * (texY) + (_DisplayTransform[2].y)); + + return o; + } + + // samplers + sampler2D _textureY; + sampler2D _textureCbCr; + + fixed4 frag (TexCoordInOut i) : SV_Target + { + // sample the texture + float2 texcoord = i.texcoord; + float y = tex2D(_textureY, texcoord).r; + float4 ycbcr = float4(y, tex2D(_textureCbCr, texcoord).rg, 1.0); + + const float4x4 ycbcrToRGBTransform = float4x4( + float4(1.0, +0.0000, +1.4020, -0.7010), + float4(1.0, -0.3441, -0.7141, +0.5291), + float4(1.0, +1.7720, +0.0000, -0.8860), + float4(0.0, +0.0000, +0.0000, +1.0000) + ); + + return mul(ycbcrToRGBTransform, ycbcr); + } + ENDCG + } + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShader.shader.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShader.shader.meta new file mode 100644 index 00000000..d46c0789 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ef7b8eec959eb4f1e9fa97bc86273848 +timeCreated: 1492634375 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShaderLinear.shader b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShaderLinear.shader new file mode 100644 index 00000000..c5a91f2d --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShaderLinear.shader @@ -0,0 +1,75 @@ +Shader "Unlit/ARCameraShader(Linear)" +{ + Properties + { + _textureY ("TextureY", 2D) = "white" {} + _textureCbCr ("TextureCbCr", 2D) = "black" {} + } + SubShader + { + Cull Off + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + ZWrite Off + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + float4x4 _DisplayTransform; + + struct Vertex + { + float4 position : POSITION; + float2 texcoord : TEXCOORD0; + }; + + struct TexCoordInOut + { + float4 position : SV_POSITION; + float2 texcoord : TEXCOORD0; + }; + + TexCoordInOut vert (Vertex vertex) + { + TexCoordInOut o; + o.position = UnityObjectToClipPos(vertex.position); + + float texX = vertex.texcoord.x; + float texY = vertex.texcoord.y; + + o.texcoord.x = (_DisplayTransform[0].x * texX + _DisplayTransform[1].x * (texY) + _DisplayTransform[2].x); + o.texcoord.y = (_DisplayTransform[0].y * texX + _DisplayTransform[1].y * (texY) + (_DisplayTransform[2].y)); + + return o; + } + + // samplers + sampler2D _textureY; + sampler2D _textureCbCr; + + fixed4 frag (TexCoordInOut i) : SV_Target + { + // sample the texture + float2 texcoord = i.texcoord; + float y = tex2D(_textureY, texcoord).r; + float4 ycbcr = float4(y, tex2D(_textureCbCr, texcoord).rg, 1.0); + + const float4x4 ycbcrToRGBTransform = float4x4( + float4(1.0, +0.0000, +1.4020, -0.7010), + float4(1.0, -0.3441, -0.7141, +0.5291), + float4(1.0, +1.7720, +0.0000, -0.8860), + float4(0.0, +0.0000, +0.0000, +1.0000) + ); + + //gamma->linear conversion + return pow(mul(ycbcrToRGBTransform, ycbcr), 2.2); + } + ENDCG + } + } +} diff --git a/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShaderLinear.shader.meta b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShaderLinear.shader.meta new file mode 100644 index 00000000..10066ad8 --- /dev/null +++ b/Assets/UnityARKitPlugin/Plugins/iOS/UnityARKit/Shaders/YUVShaderLinear.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 57c2c07a0719d4fafab7a4f8a84d1767 +timeCreated: 1492634375 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Resources.meta b/Assets/UnityARKitPlugin/Resources.meta new file mode 100644 index 00000000..e086af85 --- /dev/null +++ b/Assets/UnityARKitPlugin/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f6107a01f65b74c0093cf65fc9e9cfcc +folderAsset: yes +timeCreated: 1511229652 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin.meta b/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin.meta new file mode 100644 index 00000000..81e37335 --- /dev/null +++ b/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3872f00b440b04ca98de82d0fca32d68 +folderAsset: yes +timeCreated: 1511229680 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin/ARKitSettings.asset b/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin/ARKitSettings.asset new file mode 100644 index 00000000..97e27733 --- /dev/null +++ b/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin/ARKitSettings.asset @@ -0,0 +1,16 @@ +%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: efa163296ae7840cb80b9e3beb5f0857, type: 3} + m_Name: ARKitSettings + m_EditorClassIdentifier: + m_ARKitUsesFacetracking: 1 + AppRequiresARKit: 0 diff --git a/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin/ARKitSettings.asset.meta b/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin/ARKitSettings.asset.meta new file mode 100644 index 00000000..eaab3a6d --- /dev/null +++ b/Assets/UnityARKitPlugin/Resources/UnityARKitPlugin/ARKitSettings.asset.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: feb5449e416a346aaa320dd0a0188ade +timeCreated: 1511224908 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityARKitPlugin/UnityARKitPluginSettings.cs b/Assets/UnityARKitPlugin/UnityARKitPluginSettings.cs new file mode 100644 index 00000000..22975f3a --- /dev/null +++ b/Assets/UnityARKitPlugin/UnityARKitPluginSettings.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +/// +/// Holds settings that are used to configure the Unity ARKit Plugin. +/// +[CreateAssetMenu(fileName = "ARKitSettings", menuName = "UnityARKitPlugin/Settings", order = 1)] +public class UnityARKitPluginSettings : ScriptableObject { + + /// + /// Toggles whether Facetracking for iPhone X (and later) is used. If enabled, provide a Privacy Policy for submission to AppStore. + /// + [Tooltip("Toggles whether Facetracking for iPhone X (and later) is used. If enabled, provide a Privacy Policy for submission to AppStore.")] + public bool m_ARKitUsesFacetracking = false; + + /// + /// Toggles whether ARKit is required for this app: will make app only downloadable by devices with ARKit support if enabled. + /// + [Tooltip("Toggles whether ARKit is required for this app: will make app only downloadable by devices with ARKit support if enabled.")] + public bool AppRequiresARKit = false; + +} diff --git a/Assets/UnityARKitPlugin/UnityARKitPluginSettings.cs.meta b/Assets/UnityARKitPlugin/UnityARKitPluginSettings.cs.meta new file mode 100644 index 00000000..0d2280ab --- /dev/null +++ b/Assets/UnityARKitPlugin/UnityARKitPluginSettings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: efa163296ae7840cb80b9e3beb5f0857 +timeCreated: 1511215177 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/LICENSE b/LICENSE index f288702d..7a2330b4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,674 +1,4 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 +All contents of this repository except for the contents of the /Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter folder and its subfolders are released under the MIT License, which is listed under /LICENSES/MIT_LICENSE file. - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Contents of the /Assets/UnityARKitPlugin/Examples/FaceTracking/SlothCharacter folder and its subfolders are released under the Unity Companion License, which is listed under /LICENSES/UCL_LICENSE file. - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/LICENSES/MIT_LICENSE b/LICENSES/MIT_LICENSE new file mode 100644 index 00000000..2bb00348 --- /dev/null +++ b/LICENSES/MIT_LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Unity Technologies + +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/LICENSES/UCL_LICENSE b/LICENSES/UCL_LICENSE new file mode 100644 index 00000000..15ed9003 --- /dev/null +++ b/LICENSES/UCL_LICENSE @@ -0,0 +1,30 @@ +Unity Companion License (“License”) +Copyright © 2017 Unity Technologies ApS + +Unity Technologies ApS (“Unity”) grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available under this License (“Software”), subject to the following terms and conditions: + +1. Unity Companion Use Only. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity development engine software license (“Engine License”). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted, and in no event may the Software be used for competitive analysis or to develop a competing product or service. + +2. No Modification of Engine License. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way. + +3. Ownership & Grant Back to You. + +3.1 You own your content. In this License, “derivative works” means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content. + +3.2 Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity. + +3.3 You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License. + +4. Trademarks. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates (“Trademarks”). Descriptive uses of Trademarks are permitted; see, for example, Unity’s Branding Usage Guidelines at https://unity3d.com/public-relations/brand. + +5. Notices & Third-Party Rights. This License, including the copyright notice associated with the Software, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity “third-party notices” or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms. + +6. DISCLAIMER, LIMITATION OF LIABILITY. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +7. USE IS ACCEPTANCE and License Versions. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License. + +8. Use in Compliance with Law and Termination. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License. + +9. Severability. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect. + +10. Governing Law and Venue. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License (“Dispute”). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute. \ No newline at end of file diff --git a/Library/APIUpdater/project-dependencies.graph b/Library/APIUpdater/project-dependencies.graph new file mode 100644 index 00000000..50621eae Binary files /dev/null and b/Library/APIUpdater/project-dependencies.graph differ diff --git a/Library/AnnotationManager b/Library/AnnotationManager new file mode 100644 index 00000000..0a233a7f Binary files /dev/null and b/Library/AnnotationManager differ diff --git a/Library/AssetImportState b/Library/AssetImportState new file mode 100644 index 00000000..0cfc744a --- /dev/null +++ b/Library/AssetImportState @@ -0,0 +1 @@ +9;16777218;65536;0;0 \ No newline at end of file diff --git a/Library/BuildPlayer.prefs b/Library/BuildPlayer.prefs new file mode 100644 index 00000000..e69de29b diff --git a/Library/BuildSettings.asset b/Library/BuildSettings.asset new file mode 100644 index 00000000..5d93dddb Binary files /dev/null and b/Library/BuildSettings.asset differ diff --git a/Library/CurrentLayout.dwlt b/Library/CurrentLayout.dwlt new file mode 100644 index 00000000..f275a8bd --- /dev/null +++ b/Library/CurrentLayout.dwlt @@ -0,0 +1,780 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PixelRect: + serializedVersion: 2 + x: 0 + y: 44 + width: 1680 + height: 934 + m_ShowMode: 4 + m_Title: + m_RootView: {fileID: 8} + m_MinSize: {x: 950, y: 300} + m_MaxSize: {x: 10000, y: 10000} +--- !u!114 &2 +MonoBehaviour: + m_ObjectHideFlags: 52 + 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: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 604 + y: 0 + width: 516 + height: 399 + m_MinSize: {x: 204, y: 222} + m_MaxSize: {x: 4004, y: 4022} + m_ActualView: {fileID: 19} + m_Panes: + - {fileID: 19} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &3 +MonoBehaviour: + m_ObjectHideFlags: 52 + 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: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 7} + - {fileID: 2} + m_Position: + serializedVersion: 2 + x: 0 + y: 485 + width: 1120 + height: 399 + m_MinSize: {x: 436, y: 272} + m_MaxSize: {x: 14006, y: 10022} + vertical: 0 + controlID: 56 +--- !u!114 &4 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 11} + - {fileID: 5} + m_Position: + serializedVersion: 2 + x: 0 + y: 30 + width: 1680 + height: 884 + m_MinSize: {x: 883, y: 494} + m_MaxSize: {x: 18008, y: 14044} + vertical: 0 + controlID: 137 +--- !u!114 &5 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 1120 + y: 0 + width: 560 + height: 884 + m_MinSize: {x: 277, y: 72} + m_MaxSize: {x: 4002, y: 4022} + m_ActualView: {fileID: 16} + m_Panes: + - {fileID: 16} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &6 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 276 + height: 485 + m_MinSize: {x: 202, y: 222} + m_MaxSize: {x: 4002, y: 4022} + m_ActualView: {fileID: 17} + m_Panes: + - {fileID: 17} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &7 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 604 + height: 399 + m_MinSize: {x: 232, y: 272} + m_MaxSize: {x: 10002, y: 10022} + m_ActualView: {fileID: 15} + m_Panes: + - {fileID: 15} + - {fileID: 20} + m_Selected: 0 + m_LastSelected: 1 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 9} + - {fileID: 4} + - {fileID: 10} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1680 + height: 934 + m_MinSize: {x: 950, y: 300} + m_MaxSize: {x: 10000, y: 10000} +--- !u!114 &9 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1680 + height: 30 + m_MinSize: {x: 0, y: 0} + m_MaxSize: {x: 0, y: 0} + m_LastLoadedLayoutName: +--- !u!114 &10 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 914 + width: 1680 + height: 20 + m_MinSize: {x: 0, y: 0} + m_MaxSize: {x: 0, y: 0} +--- !u!114 &11 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 12} + - {fileID: 3} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1120 + height: 884 + m_MinSize: {x: 606, y: 494} + m_MaxSize: {x: 14006, y: 14044} + vertical: 1 + controlID: 131 +--- !u!114 &12 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 6} + - {fileID: 13} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1120 + height: 485 + m_MinSize: {x: 606, y: 222} + m_MaxSize: {x: 6054, y: 4022} + vertical: 0 + controlID: 132 +--- !u!114 &13 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 276 + y: 0 + width: 844 + height: 485 + m_MinSize: {x: 404, y: 122} + m_MaxSize: {x: 2052, y: 2070} + m_ActualView: {fileID: 14} + m_Panes: + - {fileID: 18} + - {fileID: 14} + m_Selected: 1 + m_LastSelected: 0 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12111, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 400, y: 100} + m_MaxSize: {x: 2048, y: 2048} + m_TitleContent: + m_Text: Asset Store + m_Image: {fileID: 357073275683767465, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 276 + y: 75 + width: 842 + height: 466 + m_ViewDataDictionary: {fileID: 0} +--- !u!114 &15 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12014, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 230, y: 250} + m_MaxSize: {x: 10000, y: 10000} + m_TitleContent: + m_Text: Project + m_Image: {fileID: -7501376956915960154, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 560 + width: 604 + height: 380 + m_ViewDataDictionary: {fileID: 0} + m_SearchFilter: + m_NameFilter: + m_ClassNames: [] + m_AssetLabels: [] + m_AssetBundleNames: [] + m_VersionControlStates: [] + m_SoftLockControlStates: [] + m_ReferencingInstanceIDs: + m_SceneHandles: + m_ShowAllHits: 0 + m_SearchArea: 1 + m_Folders: + - Assets/UnityARKitPlugin/Resources/UnityARKitPlugin + m_ViewMode: 1 + m_StartGridSize: 64 + m_LastFolders: + - Assets/UnityARKitPlugin/Resources/UnityARKitPlugin + m_LastFoldersGridSize: -1 + m_LastProjectPath: /Users/frolov/hack/unity-arkit-plugin + m_LockTracker: + m_IsLocked: 0 + m_FolderTreeState: + scrollPos: {x: 0, y: 36} + m_SelectedIDs: 502f0000 + m_LastClickedID: 12112 + m_ExpandedIDs: 00000000f82b0000462c0000da2d0000a62f000078300000 + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 0} + m_SearchString: + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_AssetTreeState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: 00000000f82b0000da2d000078300000 + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 0} + m_SearchString: + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_ListAreaState: + m_SelectedInstanceIDs: + m_LastClickedInstanceID: 0 + m_HadKeyboardFocusLastEvent: 0 + m_ExpandedInstanceIDs: c6230000 + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 0} + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_NewAssetIndexInList: -1 + m_ScrollPosition: {x: 0, y: 0} + m_GridSize: 64 + m_DirectoriesAreaWidth: 114 +--- !u!114 &16 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 275, y: 50} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Inspector + m_Image: {fileID: -6905738622615590433, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 1120 + y: 75 + width: 558 + height: 865 + m_ViewDataDictionary: {fileID: 0} + m_OpenAddComponentMenu: 0 + m_ObjectsLockedBeforeSerialization: [] + m_InstanceIDsLockedBeforeSerialization: + m_LockTracker: + m_IsLocked: 0 + m_PreviewResizer: + m_CachedPref: 160 + m_ControlHash: -371814159 + m_PrefName: Preview_InspectorPreview + m_PreviewWindow: {fileID: 0} +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Hierarchy + m_Image: {fileID: -590624980919486359, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 75 + width: 276 + height: 466 + m_ViewDataDictionary: {fileID: 0} + m_SceneHierarchy: + m_TreeViewState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: 1ef9ffff50f9ffffb0faffff62fbffff + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 0 + m_ClientGUIView: {fileID: 6} + m_SearchString: + m_ExpandedScenes: [] + m_CurrenRootInstanceID: 0 + m_LockTracker: + m_IsLocked: 0 + m_CurrentSortingName: TransformSorting + m_WindowGUID: b4d921980b3f245fea76b582d03bddb7 +--- !u!114 &18 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12013, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Scene + m_Image: {fileID: 2318424515335265636, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 331 + y: 30 + width: 1006 + height: 391 + m_ViewDataDictionary: {fileID: 0} + m_ShowContextualTools: 0 + m_WindowGUID: f1e9c49e6d8494628ba7e76e70610c42 + m_Gizmos: 1 + m_SceneIsLit: 1 + m_SceneLighting: 1 + m_2DMode: 0 + m_isRotationLocked: 0 + m_PlayAudio: 0 + m_AudioPlay: 0 + m_Position: + m_Target: {x: 0, y: 0, z: 0} + speed: 2 + m_Value: {x: 0, y: 0, z: 0} + m_RenderMode: 0 + m_CameraMode: + drawMode: 0 + name: Shaded + section: Shading Mode + m_ValidateTrueMetals: 0 + m_DoValidateTrueMetals: 0 + m_SceneViewState: + showFog: 1 + showMaterialUpdate: 0 + showSkybox: 1 + showFlares: 1 + showImageEffects: 1 + showParticleSystems: 1 + grid: + xGrid: + m_Target: 0 + speed: 2 + m_Value: 0 + yGrid: + m_Target: 1 + speed: 2 + m_Value: 1 + zGrid: + m_Target: 0 + speed: 2 + m_Value: 0 + m_Rotation: + m_Target: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} + speed: 2 + m_Value: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} + m_Size: + m_Target: 10 + speed: 2 + m_Value: 10 + m_Ortho: + m_Target: 0 + speed: 2 + m_Value: 0 + m_CameraSettings: + m_Speed: 1 + m_SpeedNormalized: 0.5 + m_SpeedMin: 0.01 + m_SpeedMax: 2 + m_EasingEnabled: 1 + m_EasingDuration: 0.4 + m_FieldOfView: 90 + m_NearClip: 0.03 + m_FarClip: 10000 + m_DynamicClip: 1 + m_OcclusionCulling: 0 + m_ShowGlobalGrid: 1 + m_LastSceneViewRotation: {x: 0.18639512, y: 0.009433126, z: -0.0017898901, w: 0.9824306} + m_LastSceneViewOrtho: 0 + m_ReplacementShader: {fileID: 0} + m_ReplacementString: + m_SceneVisActive: 1 + m_LastLockedObject: {fileID: 0} + m_ViewIsLockedToObject: 0 +--- !u!114 &19 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Game + m_Image: {fileID: -2087823869225018852, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 604 + y: 560 + width: 514 + height: 380 + m_ViewDataDictionary: {fileID: 0} + m_VSyncEnabled: 0 + m_MaximizeOnPlay: 0 + m_Gizmos: 0 + m_Stats: 0 + m_SelectedSizes: 08000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_TargetDisplay: 0 + m_ZoomArea: + m_HRangeLocked: 0 + m_VRangeLocked: 0 + hZoomLockedByDefault: 0 + vZoomLockedByDefault: 0 + m_HBaseRangeMin: -257 + m_HBaseRangeMax: 257 + m_VBaseRangeMin: -181.5 + m_VBaseRangeMax: 181.5 + m_HAllowExceedBaseRangeMin: 1 + m_HAllowExceedBaseRangeMax: 1 + m_VAllowExceedBaseRangeMin: 1 + m_VAllowExceedBaseRangeMax: 1 + m_ScaleWithWindow: 0 + m_HSlider: 0 + m_VSlider: 0 + m_IgnoreScrollWheelUntilClicked: 0 + m_EnableMouseInput: 1 + m_EnableSliderZoomHorizontal: 0 + m_EnableSliderZoomVertical: 0 + m_UniformScale: 1 + m_UpDirection: 1 + m_DrawArea: + serializedVersion: 2 + x: 0 + y: 17 + width: 514 + height: 363 + m_Scale: {x: 1, y: 1} + m_Translation: {x: 257, y: 181.5} + m_MarginLeft: 0 + m_MarginRight: 0 + m_MarginTop: 0 + m_MarginBottom: 0 + m_LastShownAreaInsideMargins: + serializedVersion: 2 + x: -257 + y: -181.5 + width: 514 + height: 363 + m_MinimalGUI: 1 + m_defaultScale: 1 + m_TargetTexture: {fileID: 0} + m_CurrentColorSpace: 0 + m_LastWindowPixelSize: {x: 1028, y: 760} + m_ClearInEditMode: 1 + m_NoCameraWarning: 1 + m_LowResolutionForAspectRatios: 01000000000100000100 + m_XRRenderMode: 0 +--- !u!114 &20 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 100, y: 100} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Console + m_Image: {fileID: 111653112392082826, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 560 + width: 722 + height: 380 + m_ViewDataDictionary: {fileID: 0} diff --git a/Library/EditorOnlyScriptingUserSettings.json b/Library/EditorOnlyScriptingUserSettings.json new file mode 100644 index 00000000..b26934c6 --- /dev/null +++ b/Library/EditorOnlyScriptingUserSettings.json @@ -0,0 +1 @@ +{"m_ScriptingRuntimeVersion":1} \ No newline at end of file diff --git a/Library/EditorUserBuildSettings.asset b/Library/EditorUserBuildSettings.asset new file mode 100644 index 00000000..b75e46fe Binary files /dev/null and b/Library/EditorUserBuildSettings.asset differ diff --git a/Library/EditorUserSettings.asset b/Library/EditorUserSettings.asset new file mode 100644 index 00000000..5ccabb8b Binary files /dev/null and b/Library/EditorUserSettings.asset differ diff --git a/Library/InspectorExpandedItems.asset b/Library/InspectorExpandedItems.asset new file mode 100644 index 00000000..9283ba5c Binary files /dev/null and b/Library/InspectorExpandedItems.asset differ diff --git a/Library/LastBuild.buildreport b/Library/LastBuild.buildreport new file mode 100644 index 00000000..364dda2f Binary files /dev/null and b/Library/LastBuild.buildreport differ diff --git a/Library/LastSceneManagerSetup.txt b/Library/LastSceneManagerSetup.txt new file mode 100644 index 00000000..07cc21ce --- /dev/null +++ b/Library/LastSceneManagerSetup.txt @@ -0,0 +1,5 @@ +sceneSetups: +- path: Assets/UnityARKitPlugin/Examples/ARKit2.0/UnityARWorldMap/UnityARWorldMap.unity + isLoaded: 1 + isActive: 1 + isSubScene: 0 diff --git a/Library/LibraryFormatVersion.txt b/Library/LibraryFormatVersion.txt new file mode 100644 index 00000000..6185f096 --- /dev/null +++ b/Library/LibraryFormatVersion.txt @@ -0,0 +1,2 @@ +unityRebuildLibraryVersion: 11 +unityForwardCompatibleVersion: 40 diff --git a/Library/MonoManager.asset b/Library/MonoManager.asset new file mode 100644 index 00000000..e4864a75 Binary files /dev/null and b/Library/MonoManager.asset differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md b/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md new file mode 100644 index 00000000..ceaa4264 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md @@ -0,0 +1,37 @@ + +[1.0.1] + +Adding Readme file +Adding local plugin importer callbacks. +Removing Bintray references in package.json + +[2.0.3] + +Fix bug where importing the asset store ads package would cause duiplicate symbols, +and removing the asset store ads package would cause missing symbols. + +[2.0.4] + +Added new description string to package.json +Fixed art assets to use no compression (fixes issue switching between iOS and PC builds) + +[2.0.5] - 2018-03-29 + +Fix for https://fogbugz.unity3d.com/f/cases/1011363 +Fixes an incorrect guid that the importer used to include/exclude the runtime assembly from the build. + +[2.0.6] - 2018-03-29 + +Update changelog for this and 2.0.5 + +[2.0.7] - 2018-04-06 + +Fix editor assembly project file to include the importer script. + +[2.0.8] - 2018-05-01 + +Add call to SetShouldOverridePredicate to exclude package dll when asset store dlls are present. +Update unity version attribute to support 2017.4 LTS + +Fix an issue with the editor assembly to add back in some iOS platform specific code that was removed +via conditionals (which is fine for source packages, but doesn't work with precompiled assemblies) diff --git a/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md.meta b/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md.meta new file mode 100644 index 00000000..5d2eb24c --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 35b4e72ca46f44581b85082c4dc21d13 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor.meta new file mode 100644 index 00000000..575303a2 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a37e18887fa954edf92bc36bc353b879 +folderAsset: yes +timeCreated: 1491945644 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources.meta new file mode 100644 index 00000000..aae7f602 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7c3a5d6e39b874f468b2691537168513 +folderAsset: yes +timeCreated: 1491258568 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android.meta new file mode 100644 index 00000000..45b8bb6e --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 48986928cc2a449dbaecdd1654bc9bf6 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds.meta new file mode 100644 index 00000000..826840ef --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f28fcced5af094cf78eb4e1109a71981 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar new file mode 100644 index 00000000..a05fc299 Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar.meta new file mode 100644 index 00000000..6ba354b6 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar.meta @@ -0,0 +1,21 @@ +fileFormatVersion: 2 +guid: b32abd1c9d73a4cce8389f084ac12b11 +timeCreated: 1491258710 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + data: + enabled: 0 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor.meta new file mode 100644 index 00000000..8defda5c --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 99ddb49592ff84811804420a1910cb89 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg new file mode 100644 index 00000000..4fa7f280 Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg.meta new file mode 100644 index 00000000..ce5a605c --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 10bf81265ad87424d946598c575f45a0 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg new file mode 100644 index 00000000..5d8fb0b9 Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg.meta new file mode 100644 index 00000000..ff78850d --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 1b32bcce201b4494ea8848326290c5d5 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + 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 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS.meta new file mode 100644 index 00000000..a44e61b4 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4f234578336894dc081edf696f2ff5f2 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds.meta new file mode 100644 index 00000000..f37efbe6 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2d4d46c70fdd242668a56e99799e8540 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework.meta new file mode 100644 index 00000000..c83ed20c --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eeed6954b3c264ca0b28a92aa6289bf0 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + data: + enabled: 0 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers.meta new file mode 100644 index 00000000..fab0de2b --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6e7c8cfeedae74eb3a562055e069e441 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h new file mode 100644 index 00000000..8edc8c14 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h @@ -0,0 +1,11 @@ +#import "UADSMetaData.h" + +@interface UADSInAppPurchaseMetaData : UADSMetaData + +- (void)setProductId:(NSString *)productId; +- (void)setPrice:(NSNumber *)price; +- (void)setCurrency:(NSString *)currency; +- (void)setReceiptPurchaseData:(NSString *)receiptPurchaseData; +- (void)setSignature:(NSString *)signature; + +@end diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h.meta new file mode 100644 index 00000000..98aa8391 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7927683d1fc5848b5abfb54ebb1028ec +timeCreated: 1493316657 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h new file mode 100644 index 00000000..1ed3c431 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h @@ -0,0 +1,13 @@ +@interface UADSJsonStorage : NSObject + +@property (nonatomic, strong) NSMutableDictionary *storageContents; + +- (BOOL)set:(NSString *)key value:(id)value; +- (id)getValueForKey:(NSString *)key; +- (BOOL)deleteKey:(NSString *)key; +- (NSArray *)getKeys:(NSString *)key recursive:(BOOL)recursive; +- (void)clearData; +- (BOOL)initData; +- (BOOL)hasData; + +@end diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h.meta new file mode 100644 index 00000000..9b923496 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1322fd896bbb15bb6e335591b766ae62 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h new file mode 100644 index 00000000..5f49a285 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h @@ -0,0 +1,9 @@ +#import "UADSMetaData.h" + +@interface UADSMediationMetaData : UADSMetaData + +- (void)setName:(NSString *)mediationNetworkName; +- (void)setVersion:(NSString *)mediationSdkVersion; +- (void)setOrdinal:(int)mediationOrdinal; + +@end \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h.meta new file mode 100644 index 00000000..cd75153c --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b52e557db2c2b4eebb10444f1d582029 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h new file mode 100644 index 00000000..791d3138 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h @@ -0,0 +1,12 @@ + + +@interface UADSMetaData : NSObject + +@property (nonatomic, strong) NSString *category; +@property (nonatomic, strong) NSMutableDictionary *entries; + +- (instancetype)initWithCategory:(NSString *)category; +- (void)set:(NSString *)key value:(id)value; +- (void)commit; + +@end \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h.meta new file mode 100644 index 00000000..1710ad25 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86c008322e7c647149878156c5b81940 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h new file mode 100644 index 00000000..5d0db483 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h @@ -0,0 +1,7 @@ +#import "UADSMetaData.h" + +@interface UADSPlayerMetaData : UADSMetaData + +- (void)setServerId:(NSString *)serverId; + +@end \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h.meta new file mode 100644 index 00000000..92fe5059 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 453f100e6bdae4dfd9e655927819dc85 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h new file mode 100644 index 00000000..8e1ccfda --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h @@ -0,0 +1,255 @@ +#import + +#import +#import + +/** + * An enumerate that describes the state of `UnityAds` placements. + * @note All placement states, other than `kUnityAdsPlacementStateReady`, indicate that the placement is not currently ready to show ads. + */ +typedef NS_ENUM(NSInteger, UnityAdsPlacementState) { + /** + * A state that indicates that the placement is ready to show an ad. The `show:` selector can be called. + */ + kUnityAdsPlacementStateReady, + /** + * A state that indicates that no state is information is available. + * @warning This state can that UnityAds is not initialized or that the placement is not correctly configured in the Unity Ads admin tool. + */ + kUnityAdsPlacementStateNotAvailable, + /** + * A state that indicates that the placement is currently disabled. The placement can be enabled in the Unity Ads admin tools. + */ + kUnityAdsPlacementStateDisabled, + /** + * A state that indicates that the placement is not currently ready, but will be in the future. + * @note This state most likely indicates that the ad content is currently caching. + */ + kUnityAdsPlacementStateWaiting, + /** + * A state that indicates that the placement is properly configured, but there are currently no ads available for the placement. + */ + kUnityAdsPlacementStateNoFill +}; + +/** + * An enumeration for the completion state of an ad. + */ +typedef NS_ENUM(NSInteger, UnityAdsFinishState) { + /** + * A state that indicates that the ad did not successfully display. + */ + kUnityAdsFinishStateError, + /** + * A state that indicates that the user skipped the ad. + */ + kUnityAdsFinishStateSkipped, + /** + * A state that indicates that the ad was played entirely. + */ + kUnityAdsFinishStateCompleted +}; + +/** + * An enumeration for the various errors that can be emitted through the `UnityAdsDelegate` `unityAdsDidError:withMessage:` method. + */ +typedef NS_ENUM(NSInteger, UnityAdsError) { + /** + * An error that indicates failure due to `UnityAds` currently being uninitialized. + */ + kUnityAdsErrorNotInitialized = 0, + /** + * An error that indicates failure due to a failure in the initialization process. + */ + kUnityAdsErrorInitializedFailed, + /** + * An error that indicates failure due to attempting to initialize `UnityAds` with invalid parameters. + */ + kUnityAdsErrorInvalidArgument, + /** + * An error that indicates failure of the video player. + */ + kUnityAdsErrorVideoPlayerError, + /** + * An error that indicates failure due to having attempted to initialize the `UnityAds` class in an invalid environment. + */ + kUnityAdsErrorInitSanityCheckFail, + /** + * An error that indicates failure due to the presence of an ad blocker. + */ + kUnityAdsErrorAdBlockerDetected, + /** + * An error that indicates failure due to inability to read or write a file. + */ + kUnityAdsErrorFileIoError, + /** + * An error that indicates failure due to a bad device identifier. + */ + kUnityAdsErrorDeviceIdError, + /** + * An error that indicates a failure when attempting to show an ad. + */ + kUnityAdsErrorShowError, + /** + * An error that indicates an internal failure in `UnityAds`. + */ + kUnityAdsErrorInternalError, +}; + +/** + * The `UnityAdsDelegate` protocol defines the required methods for receiving messages from UnityAds. + * Must be implemented by the hosting app. + * The unityAdsReady: method is called when it's possible to show an ad. + * All other methods are used to provide notifications of events of the ad lifecycle. + * @note On initialization, there are ready (or error) callbacks for each placement attached to the game identifier. + */ +NS_ASSUME_NONNULL_BEGIN +@protocol UnityAdsDelegate +/** + * Called when `UnityAds` is ready to show an ad. After this callback you can call the `UnityAds` `show:` method for this placement. + * Note that sometimes placement might no longer be ready due to exceptional reasons. These situations will give no new callbacks. + * + * @warning To avoid error situations, it is always best to check `isReady` method status before calling show. + * @param placementId The ID of the placement that is ready to show, as defined in Unity Ads admin tools. + */ +- (void)unityAdsReady:(NSString *)placementId; +/** + * Called when `UnityAds` encounters an error. All errors will be logged but this method can be used as an additional debugging aid. This callback can also be used for collecting statistics from different error scenarios. + * + * @param error A `UnityAdsError` error enum value indicating the type of error encountered. + * @param message A human readable string indicating the type of error encountered. + */ +- (void)unityAdsDidError:(UnityAdsError)error withMessage:(NSString *)message; +/** + * Called on a successful start of advertisement after calling the `UnityAds` `show:` method. + * + * @warning If there are errors in starting the advertisement, this method may never be called. Unity Ads will directly call `unityAdsDidFinish:withFinishState:` with error status. + * + * @param placementId The ID of the placement that has started, as defined in Unity Ads admin tools. + */ +- (void)unityAdsDidStart:(NSString *)placementId; +/** + * Called after the ad has closed. + * + * @param placementId The ID of the placement that has finished, as defined in Unity Ads admin tools. + * @param state An enum value indicating the finish state of the ad. Possible values are `Completed`, `Skipped`, and `Error`. + */ +- (void)unityAdsDidFinish:(NSString *)placementId + withFinishState:(UnityAdsFinishState)state; +@end + +/** + * `UnityAds` is a static class with methods for preparing and showing ads. + * + * @warning In order to ensure expected behaviour, the delegate must always be set. + */ + +@interface UnityAds : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)initialize NS_UNAVAILABLE; + +/** + * Initializes UnityAds. UnityAds should be initialized when app starts. + * + * @param gameId Unique identifier for a game, given by Unity Ads admin tools or Unity editor. + * @param delegate delegate for UnityAdsDelegate callbacks + */ ++ (void)initialize:(NSString *)gameId + delegate:(nullable id)delegate; +/** + * Initializes UnityAds. UnityAds should be initialized when app starts. + * + * @param gameId Unique identifier for a game, given by Unity Ads admin tools or Unity editor. + * @param delegate delegate for UnityAdsDelegate callbacks + * @param testMode Set this flag to `YES` to indicate test mode and show only test ads. + */ ++ (void)initialize:(NSString *)gameId + delegate:(nullable id)delegate + testMode:(BOOL)testMode; +/** + * Show an ad using the defaul placement. + * + * @param viewController The `UIViewController` that is to present the ad view controller. + */ ++ (void)show:(UIViewController *)viewController; +/** + * Show an ad using the provided placement ID. + * + * @param viewController The `UIViewController` that is to present the ad view controller. + * @param placementId The placement ID, as defined in Unity Ads admin tools. + */ ++ (void)show:(UIViewController *)viewController placementId:(NSString *)placementId; +/** + * Provides the currently assigned `UnityAdsDelegate`. + * + * @return The current `UnityAdsDelegate`. + */ ++ (id)getDelegate; +/** + * Allows the delegate to be reassigned after UnityAds has already been initialized. + * + * @param delegate The new `UnityAdsDelegate' for UnityAds to send callbacks to. + */ ++ (void)setDelegate:(id)delegate; +/** + * Get the current debug status of `UnityAds`. + * + * @return If `YES`, `UnityAds` will provide verbose logs. + */ ++ (BOOL)getDebugMode; +/** + * Set the logging verbosity of `UnityAds`. Debug mode indicates verbose logging. + * @warning Does not relate to test mode for ad content. + * @param enableDebugMode `YES` for verbose logging. + */ ++ (void)setDebugMode:(BOOL)enableDebugMode; +/** + * Check to see if the current device supports using Unity Ads. + * + * @return If `NO`, the current device cannot initialize `UnityAds` or show ads. + */ ++ (BOOL)isSupported; +/** + * Check if the default placement is ready to show an ad. + * + * @return If `YES`, the default placement is ready to show an ad. + */ ++ (BOOL)isReady; +/** + * Check if a particular placement is ready to show an ad. + * + * @param placementId The placement ID being checked. + * + * @return If `YES`, the placement is ready to show an ad. + */ ++ (BOOL)isReady:(NSString *)placementId; +/** + * Check the current state of the default placement. + * + * @return If this is `kUnityAdsPlacementStateReady`, the placement is ready to show ads. Other states represent errors. + */ ++ (UnityAdsPlacementState)getPlacementState; +/** + * Check the current state of a placement. + * + * @param placementId The placement ID, as defined in Unity Ads admin tools. + * + * @return If this is `kUnityAdsPlacementStateReady`, the placement is ready to show ads. Other states represent errors. + */ ++ (UnityAdsPlacementState)getPlacementState:(NSString *)placementId; +/** + * Check the version of this `UnityAds` SDK + * + * @return String representing the current version name. + */ ++ (NSString *)getVersion; +/** + * Check that `UnityAds` has been initialized. This might be useful for debugging initialization problems. + * + * @return If `YES`, Unity Ads has been successfully initialized. + */ ++ (BOOL)isInitialized; + +@end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h.meta new file mode 100644 index 00000000..e4b7c0bc --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c99bfe4fc4e5c4dc3917c14075acd117 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h new file mode 100644 index 00000000..1435037b --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h @@ -0,0 +1,21 @@ +#import "UnityAds.h" + +NS_ASSUME_NONNULL_BEGIN +@protocol UnityAdsExtendedDelegate +/** + * Called when a click event happens. + * + * @param placementId The ID of the placement that was clicked. + */ +- (void)unityAdsDidClick:(NSString *)placementId; + +/** + * Called when a placement changes state. + * + * @param placementId The ID of the placement that changed state. + * @param oldState The state before the change. + * @param newState The state after the change. + */ +- (void)unityAdsPlacementStateChanged:(NSString *)placementId oldState:(UnityAdsPlacementState)oldState newState:(UnityAdsPlacementState)newState; +@end +NS_ASSUME_NONNULL_END diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h.meta new file mode 100644 index 00000000..9840de15 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6842a74831964edc8fefa1c0aed89dc +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h new file mode 100644 index 00000000..0fa6e362 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h @@ -0,0 +1,11 @@ +#import "UnityAds.h" +NS_ASSUME_NONNULL_BEGIN +@protocol UnityAdsUnityDelegate +/** + * Called when an in-app purchase is initiated from an ad. + * + * @param eventString The string provided via the ad. + */ +- (void)unityAdsDidInitiatePurchase:(NSString *)eventString; +@end +NS_ASSUME_NONNULL_END diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h.meta new file mode 100644 index 00000000..19ec6df7 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ce4395ccdb12cf62fca756358be1a892 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist new file mode 100644 index 00000000..31b03797 Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist.meta new file mode 100644 index 00000000..e4e0148d --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc1b50b5501f748da8bec762294d9136 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules.meta new file mode 100644 index 00000000..6ba1dcb9 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3cebe1a96232b44388b30b2f72dde434 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap new file mode 100644 index 00000000..9b448d57 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap @@ -0,0 +1,7 @@ +framework module UnityAds { + umbrella header "UnityAds.h" + header "UnityAdsExtended.h" + + export * + module * { export * } +} diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap.meta new file mode 100644 index 00000000..13ea2e99 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5ba7626a737840ff88a3bd84b100482 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds new file mode 100644 index 00000000..53184164 Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds.meta new file mode 100644 index 00000000..a311b834 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d1c1a2d988f5148fd9ab17b2460d271e +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll b/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll new file mode 100644 index 00000000..77409dde Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.mdb b/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.mdb new file mode 100644 index 00000000..7ee35e88 Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.mdb differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.mdb.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.mdb.meta new file mode 100644 index 00000000..ad74189a --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.mdb.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6597c6ea86d36477081342001145d8d9 +timeCreated: 1492551631 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.meta b/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.meta new file mode 100644 index 00000000..ede66537 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.meta @@ -0,0 +1,25 @@ +fileFormatVersion: 2 +guid: a342381d77833427fa10621e38fbae10 +timeCreated: 1491945648 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + data: + enabled: 0 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/License.md b/Library/PackageCache/com.unity.ads@2.0.8/License.md new file mode 100644 index 00000000..27c17ac4 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/License.md @@ -0,0 +1,32 @@ +**Unity Companion Package License v1.0 ("_License_")** + +Copyright © 2017 Unity Technologies ApS ("**_Unity_**") + +Unity hereby grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available with this License ("**_Software_**"), subject to the following terms and conditions: + +1. *Unity Companion Use Only*. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity development engine software license ("**_Engine License_**"). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted. + +1. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way. + +1. *Ownership & Grant Back to You*. + + 3.1. You own your content. In this License, "derivative works" means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content. + + 3.2. Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity. + + 3.3. You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License. + +1. *Trademarks*. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates ("**_Trademarks_**"). Descriptive uses of Trademarks are permitted; see, for example, Unity’s Branding Usage Guidelines at [https://unity3d.com/public-relations/brand](https://unity3d.com/public-relations/brand). + +1. *Notices & Third-Party Rights*. This License, including the copyright notice above, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity "third-party notices" or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms. + +1. *DISCLAIMER, LIMITATION OF LIABILITY*. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +1. *USE IS ACCEPTANCE and License Versions*. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License. + +1. *Use in Compliance with Law and Termination*. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License. + +1. *Severability*. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect. + +1. *Governing Law and Venue*. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License ("**_Dispute_**"). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute. + diff --git a/Library/PackageCache/com.unity.ads@2.0.8/License.md.meta b/Library/PackageCache/com.unity.ads@2.0.8/License.md.meta new file mode 100644 index 00000000..308e13bc --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/License.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4c6fe94acbb24417c988bab18cbd5209 +timeCreated: 1504642506 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/README.md b/Library/PackageCache/com.unity.ads@2.0.8/README.md new file mode 100644 index 00000000..811347a9 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/README.md @@ -0,0 +1,4 @@ +# Unity Ads + +Implementation of the Unity Ads API. + diff --git a/Library/PackageCache/com.unity.ads@2.0.8/README.md.meta b/Library/PackageCache/com.unity.ads@2.0.8/README.md.meta new file mode 100644 index 00000000..26e726c9 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/README.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 62772aad98ed04f0d955b7d20de61f7f +timeCreated: 1493316656 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll b/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll new file mode 100644 index 00000000..e9486522 Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.mdb b/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.mdb new file mode 100644 index 00000000..5ec8e50d Binary files /dev/null and b/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.mdb differ diff --git a/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.mdb.meta b/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.mdb.meta new file mode 100644 index 00000000..172110a8 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.mdb.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5e57a6c62c1ec47d0bceb70495845164 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.meta b/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.meta new file mode 100644 index 00000000..823a117d --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.meta @@ -0,0 +1,121 @@ +fileFormatVersion: 2 +guid: 3b07d432cba2a4c4f8a2fdea984620b8 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 0 + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ads@2.0.8/package.json b/Library/PackageCache/com.unity.ads@2.0.8/package.json new file mode 100644 index 00000000..881daf2c --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/package.json @@ -0,0 +1,17 @@ +{ + "category": "AssetStore/Unity", + "description": "Unity Ads is a video ad network for iOS and Android that allows you to quickly and effectively monetize your games.", + "gitHead": "0d2114387a99011be685886f8ea902242e323e70", + "keywords": [ + "ads", + "unity" + ], + "name": "com.unity.ads", + "repoPackagePath": "build/install/com.unity.ads", + "repository": { + "type": "git", + "url": "ssh://git@github.com/Unity-Technologies/com.unity.ads.git" + }, + "unity": "2017.4", + "version": "2.0.8" +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ads@2.0.8/package.json.meta b/Library/PackageCache/com.unity.ads@2.0.8/package.json.meta new file mode 100644 index 00000000..38201ff4 --- /dev/null +++ b/Library/PackageCache/com.unity.ads@2.0.8/package.json.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dced8f6ea9f964e8e8e61574ea889d21 +timeCreated: 1491258710 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/CHANGELOG.md b/Library/PackageCache/com.unity.analytics@3.3.2/CHANGELOG.md new file mode 100644 index 00000000..dbb63e1a --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/CHANGELOG.md @@ -0,0 +1,67 @@ +## [3.3.2] - 2019-01-15 +- Update com.unity.ugui version dependency to new format. +- Add explicit dll dependencies to asmdefs needed for Test Platform changes. + +## [3.3.1] - 2018-11-21 +- Fixed missing dependency to com.unity.ugui to package.json + +## [3.3.0] - 2018-11-16 +- Removed dependency on UGUI extension in favor of new core package. + +## [3.2.2] - 2018-11-02 +- Removed FetchOptOutStatus and Initialize call. All application of opt out + status will be handled by the engine. The Analytics/Data Privacy package still + provides FetchPrivacyUrl to provide a URL from which to opt out. + +## [3.2.1] - 2018-10-25 +- Move editor and playmode tests to be packed within the package. + +## [3.2.0] - 2018-10-11 +- Prevent double-registration of standard events. +- Fixed build error on platforms that don't support analytics. +- Update package docs so they can be built and published and be accessible from + the Package Manager UI. +- Fixed a crash occurring on iOS device when the device has cellular capability + but was never configured with any carrier service. +- Fixed an android build failure occurring due to conflicting install referrer + AIDL files. + +## [3.1.1] - 2018-08-21 +- Add DataPrivacy plugin into package. +- Fixed an issue where Android project build would fail when proguard is enabled + in publishing settings. +- Fixed an issue where iOS product archive would fail because bitcode was not + enabled. + +## [3.0.9] - 2018-07-31 +- Fixing issue with NullReferenceException during editor playmode + +## [3.0.8] - 2018-07-26 +- Fixing linking issue when building Android il2cpp + +## [3.0.7] - 2018-07-10 +- Adding in continuous events for signal strength, battery level, battery + temperature, memory usage, available storage + +## [3.0.6] - 2018-06-01 +- Reorganizing platformInfo event around session start/resume/pause + +## [3.0.5] - 2018-05-29 +- Fixing cellular signal strength incorrect array format + +## [3.0.4] - 2018-05-04 +- Breaking change to only work with 2018.2 (change name of whitelisted dll's in + engine to conform to PackageManager standard) +- Changed name of old Analytics dll to the Unity.Analytics.Tracker.dll and + replaced the old one with the new platform information package. +- Changed naming convention of dlls to the PackageManager Standard: + Unity.Analytics.dll, Unity.Analytics.Editor.dll, Unity.Analytics.Tracker.dll, + Unity.Analytics.StandardEvents.dll. +- Deprecated old Analytics tracker and removed it from the add component menu. +- Merged Standardevents package into Analytics package. + +## [2.0.14] - 2018-02-08 +- Added proper documentation and better description text. + +## [2.0.5] - +- Update analytics tracker to 2.0 (1.0 version is still available) diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/CHANGELOG.md.meta b/Library/PackageCache/com.unity.analytics@3.3.2/CHANGELOG.md.meta new file mode 100644 index 00000000..80fcec7f --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/CHANGELOG.md.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bcd27da1c9ae94d2cafe094482a20792 +timeCreated: 1511216857 +licenseType: Pro +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy.meta b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy.meta new file mode 100644 index 00000000..80f7551f --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8aafd27f78c12564281bac0d0067df8d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/AssemblyInfo.cs b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/AssemblyInfo.cs new file mode 100644 index 00000000..a97f2747 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Unity.Analytics.DataPrivacy.Tests")] +[assembly: InternalsVisibleTo("Unity.Analytics.DataPrivacy.WebRequest.Tests")] diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/AssemblyInfo.cs.meta new file mode 100644 index 00000000..bee8db4f --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/AssemblyInfo.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7aad9e80c95b4991a1f4d017c8caf386 +timeCreated: 1526477558 \ No newline at end of file diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacy.cs b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacy.cs new file mode 100644 index 00000000..f48eb131 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacy.cs @@ -0,0 +1,132 @@ +#if ENABLE_CLOUD_SERVICES_ANALYTICS +using System; +using System.Text; +using UnityEngine.Networking; + +namespace UnityEngine.Analytics +{ + public class DataPrivacy + { + [Serializable] + internal struct UserPostData + { + public string appid; + public string userid; + public long sessionid; + public string platform; + public UInt32 platformid; + public string sdk_ver; + public bool debug_device; + public string deviceid; + public string plugin_ver; + } + + [Serializable] + internal struct TokenData + { + public string url; + public string token; + } + + const string kVersion = "3.0.0"; + const string kVersionString = "DataPrivacyPackage/" + kVersion; + + internal const string kBaseUrl = "https://data-optout-service.uca.cloud.unity3d.com"; + const string kTokenUrl = kBaseUrl + "/token"; + + internal static UserPostData GetUserData() + { + var postData = new UserPostData + { + appid = Application.cloudProjectId, + userid = AnalyticsSessionInfo.userId, + sessionid = AnalyticsSessionInfo.sessionId, + platform = Application.platform.ToString(), + platformid = (UInt32)Application.platform, + sdk_ver = Application.unityVersion, + debug_device = Debug.isDebugBuild, + deviceid = SystemInfo.deviceUniqueIdentifier, + plugin_ver = kVersionString + }; + + return postData; + } + + static string GetUserAgent() + { + var message = "UnityPlayer/{0} ({1}/{2}{3} {4})"; + return String.Format(message, + Application.unityVersion, + Application.platform.ToString(), + (UInt32)Application.platform, + Debug.isDebugBuild ? "-dev" : "", + kVersionString); + } + + static String getErrorString(UnityWebRequest www) + { + var json = www.downloadHandler.text; + var error = www.error; + if (String.IsNullOrEmpty(error)) + { + // 5.5 sometimes fails to parse an error response, and the only clue will be + // in www.responseHeadersString, which isn't accessible. + error = "Empty response"; + } + + if (!String.IsNullOrEmpty(json)) + { + error += ": " + json; + } + + return error; + } + + public static void FetchPrivacyUrl(Action success, Action failure = null) + { + string postJson = JsonUtility.ToJson(GetUserData()); + byte[] bytes = Encoding.UTF8.GetBytes(postJson); + var uploadHandler = new UploadHandlerRaw(bytes); + uploadHandler.contentType = "application/json"; + + var www = UnityWebRequest.Post(kTokenUrl, ""); + www.uploadHandler = uploadHandler; +#if !UNITY_WEBGL + www.SetRequestHeader("User-Agent", GetUserAgent()); +#endif + var async = www.SendWebRequest(); + + async.completed += (AsyncOperation async2) => + { + var json = www.downloadHandler.text; + if (!String.IsNullOrEmpty(www.error) || String.IsNullOrEmpty(json)) + { + var error = getErrorString(www); + if (failure != null) + { + failure(error); + } + } + else + { + TokenData tokenData; + tokenData.url = ""; // Just to quell "possibly unassigned" error + try + { + tokenData = JsonUtility.FromJson(json); + } + catch (Exception e) + { + if (failure != null) + { + failure(e.ToString()); + } + } + + success(tokenData.url); + } + }; + } + } +} +#endif //ENABLE_CLOUD_SERVICES_ANALYTICS diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacy.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacy.cs.meta new file mode 100644 index 00000000..0559a4b0 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bff25ea4cf0d3d841b6787b9f649f21b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.cs b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.cs new file mode 100644 index 00000000..412b430c --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.cs @@ -0,0 +1,52 @@ +#if ENABLE_CLOUD_SERVICES_ANALYTICS +using System; +using UnityEngine.UI; + +namespace UnityEngine.Analytics +{ + public class DataPrivacyButton : Button + { + bool urlOpened = false; + + DataPrivacyButton() + { + onClick.AddListener(OpenDataPrivacyUrl); + } + + void OnFailure(string reason) + { + interactable = true; + Debug.LogWarning(String.Format("Failed to get data privacy url: {0}", reason)); + } + + void OpenUrl(string url) + { + interactable = true; + urlOpened = true; + + #if UNITY_WEBGL && !UNITY_EDITOR + Application.ExternalEval("window.open(\"" + url + "\",\"_blank\")"); + #else + Application.OpenURL(url); + #endif + } + + void OpenDataPrivacyUrl() + { + interactable = false; + DataPrivacy.FetchPrivacyUrl(OpenUrl, OnFailure); + } + + void OnApplicationFocus(bool hasFocus) + { + if (hasFocus && urlOpened) + { + urlOpened = false; + // Immediately refresh the remote config so new privacy settings can be enabled + // as soon as possible if they have changed. + RemoteSettings.ForceUpdate(); + } + } + } +} +#endif //ENABLE_CLOUD_SERVICES_ANALYTICS diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.cs.meta new file mode 100644 index 00000000..444ade1e --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a5ebb11c6fc3a2f498bd89593f7744aa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.prefab b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.prefab new file mode 100644 index 00000000..53543550 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.prefab @@ -0,0 +1,246 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &109074 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22409074} + - 222: {fileID: 22209074} + - 114: {fileID: 11409072} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109076 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22409076} + - 222: {fileID: 22209076} + - 114: {fileID: 11409074} + - 114: {fileID: 11409076} + m_Layer: 5 + m_Name: DataPrivacyButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109078 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22409078} + - 222: {fileID: 22209078} + - 114: {fileID: 11409078} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11409072 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109074} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078405, g: .196078405, b: .196078405, a: 1} + m_Sprite: {fileID: 21300000, guid: 599a5fd92bab81a4ab02e52d0b1b1c60, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11409074 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11409076 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a5ebb11c6fc3a2f498bd89593f7744aa, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11409074} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11409078 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109078} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078405, g: .196078405, b: .196078405, a: 1} + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Open Data Privacy Page +--- !u!222 &22209074 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109074} +--- !u!222 &22209076 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109076} +--- !u!222 &22209078 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109078} +--- !u!224 &22409074 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109074} + 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: [] + m_Father: {fileID: 22409076} + m_RootOrder: 1 + m_AnchorMin: {x: 1, y: .5} + m_AnchorMax: {x: 1, y: .5} + m_AnchoredPosition: {x: -8, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 1, y: .5} +--- !u!224 &22409076 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109076} + 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: 22409078} + - {fileID: 22409074} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 200, y: 30} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22409078 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109078} + 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: [] + m_Father: {fileID: 22409076} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: .850000024, y: 1} + m_AnchoredPosition: {x: 8, y: 0} + m_SizeDelta: {x: -12, y: 0} + m_Pivot: {x: 0, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 109076} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.prefab.meta b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.prefab.meta new file mode 100644 index 00000000..4eaf22f2 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 71b11355001648444b41d17fd36c150d +NativeFormatImporter: + userData: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyIcon.png b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyIcon.png new file mode 100644 index 00000000..564b374b Binary files /dev/null and b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyIcon.png differ diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyIcon.png.meta b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyIcon.png.meta new file mode 100644 index 00000000..58ce1082 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyIcon.png.meta @@ -0,0 +1,48 @@ +fileFormatVersion: 2 +guid: 599a5fd92bab81a4ab02e52d0b1b1c60 +TextureImporter: + fileIDToRecycleName: + 664227380: ImportLogs + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef new file mode 100644 index 00000000..0bf89c3e --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef @@ -0,0 +1,8 @@ +{ + "name": "Unity.Analytics.DataPrivacy", + "references": ["Unity.ugui"], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef.meta b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef.meta new file mode 100644 index 00000000..787823b6 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0fda7ebe61ab2164383d10e32efb9c6e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Documentation~/analytics.md b/Library/PackageCache/com.unity.analytics@3.3.2/Documentation~/analytics.md new file mode 100644 index 00000000..21782ac3 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Documentation~/analytics.md @@ -0,0 +1,51 @@ +# About the Analytics Package + +This Analytics package supports the following Unity Analytics features: + +* [Standard Events](https://docs.unity3d.com/Manual/UnityAnalyticsStandardEvents.html) +* [Analytics Event Tracker](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html) +* [Unity Analytics Data Privacy Plug-in](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacy.html) + +For instructions on using the features in the Analytics package, refer to the [Analytics section of +the Unity Manual](https://docs.unity3d.com/Manual/UnityAnalytics.html). + +The package is supported by Unity 2018.3+ and includes functionality previously included in +earlier Unity Asset Store and Package Manager packages. When upgrading existing projects to +2018.3 or later, older, redundant packages should be removed from the project. + + +## Installing the Analytics Package + +The Analytics package is built into the Unity Editor and enabled automatically. Use the Unity +Package Manager (menu: **Window** > **Package Manager**) to disable or enable the package. +The Analytics package is listed under the built-in packages. + + + +## Using the Analytics Package + +For instructions on using the features in the Analytics package, refer to the Unity Manual: + +* [Standard Events](https://docs.unity3d.com/Manual/UnityAnalyticsStandardEvents.html) +* [Analytics Event Tracker](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html) +* [Unity Analytics Data Privacy Plug-in](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacy.html) + + +## Package contents + +The following table indicates the major classes, components, and files included in the Analytics package: + +|Item|Description| +|---|---| +|[`AnalyticsEvent` class](https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Analytics.AnalyticsEvent.html) | The primary class for sending Standard and Custom analytics events to the Unity Analytics service.| +|[Analytics Event Tracker component](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html) | A Unity component that you can use to send Standard and Custom analytics events (without writing code).| +|[DataPrivacy class](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacyAPI.html)| A utility class that helps applications using Unity Analytics comply with the EU General Data Protection Regulation (GDPR).| +|`Packages/Analytics Library/DataPrivacy/DataPrivacyButton`| A Prefab GameObject you can use when building a user interface to allow players to opt out of Analytics data collection.| +|`Packages/Analytics Library/DataPrivacy/DataPrivacyIcon`| An icon graphic you can use when creating your own opt-out button or control.| + + +## Document revision history + +|Date|Reason| +|---|---| +|October 5, 2018|Document created. Matches package version 3.2.0.| diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Editor.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Editor.meta new file mode 100644 index 00000000..d29d133a --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Editor.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7fd5e77e7e7ea4eea8198138cd9cc814 +folderAsset: yes +timeCreated: 1491256195 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Editor/AnalyticsEventTracker icon.png b/Library/PackageCache/com.unity.analytics@3.3.2/Editor/AnalyticsEventTracker icon.png new file mode 100644 index 00000000..23763936 Binary files /dev/null and b/Library/PackageCache/com.unity.analytics@3.3.2/Editor/AnalyticsEventTracker icon.png differ diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Editor/AnalyticsEventTracker icon.png.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Editor/AnalyticsEventTracker icon.png.meta new file mode 100644 index 00000000..124e6e94 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Editor/AnalyticsEventTracker icon.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 5e7c9ab97e5884e4eaa5967e9024f39d +timeCreated: 1492409422 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/License.md b/Library/PackageCache/com.unity.analytics@3.3.2/License.md new file mode 100644 index 00000000..27c17ac4 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/License.md @@ -0,0 +1,32 @@ +**Unity Companion Package License v1.0 ("_License_")** + +Copyright © 2017 Unity Technologies ApS ("**_Unity_**") + +Unity hereby grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available with this License ("**_Software_**"), subject to the following terms and conditions: + +1. *Unity Companion Use Only*. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity development engine software license ("**_Engine License_**"). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted. + +1. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way. + +1. *Ownership & Grant Back to You*. + + 3.1. You own your content. In this License, "derivative works" means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content. + + 3.2. Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity. + + 3.3. You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License. + +1. *Trademarks*. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates ("**_Trademarks_**"). Descriptive uses of Trademarks are permitted; see, for example, Unity’s Branding Usage Guidelines at [https://unity3d.com/public-relations/brand](https://unity3d.com/public-relations/brand). + +1. *Notices & Third-Party Rights*. This License, including the copyright notice above, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity "third-party notices" or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms. + +1. *DISCLAIMER, LIMITATION OF LIABILITY*. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +1. *USE IS ACCEPTANCE and License Versions*. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License. + +1. *Use in Compliance with Law and Termination*. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License. + +1. *Severability*. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect. + +1. *Governing Law and Venue*. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License ("**_Dispute_**"). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute. + diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/License.md.meta b/Library/PackageCache/com.unity.analytics@3.3.2/License.md.meta new file mode 100644 index 00000000..51c39687 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/License.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 15bf9c691b85b41a39c18bee2f87e21b +timeCreated: 1504642560 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/README.md b/Library/PackageCache/com.unity.analytics@3.3.2/README.md new file mode 100644 index 00000000..9d6fd499 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/README.md @@ -0,0 +1,14 @@ +Unity Analytics: Tracker +------------------------------ +Please visit the following URL to see documentation for the Analytics Event Tracker. + +https://docs.google.com/document/d/1glh4zEk0KQ_FhOgk95H-VOubcdzrVGyu5BYCmhFQCh0/edit# + +Please note, the documentation at this URL is considered a "living" document and subject to change. + + +Unity Analytics: Standard Events +------------------------------ +Track player behavior specific to your game + +Standard Events are a set of curated custom events focused on player experience. diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/README.md.meta b/Library/PackageCache/com.unity.analytics@3.3.2/README.md.meta new file mode 100644 index 00000000..f874e182 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/README.md.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 884f8f0e4025a420893d3a8d1d3063e1 +timeCreated: 1511217314 +licenseType: Pro +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests.meta new file mode 100644 index 00000000..8f14a0b9 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a573b834e2608c4f982daf527bdb47a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/.tests.json b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/.tests.json new file mode 100644 index 00000000..327abb29 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/.tests.json @@ -0,0 +1,3 @@ +{ + "createSeparatePackage": false +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor.meta new file mode 100644 index 00000000..64435dd9 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 931f3395378214a6c94333853bd0659b +folderAsset: yes +timeCreated: 1489179043 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents.meta new file mode 100644 index 00000000..733defc0 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b6295675042094715ad9cc104210aeb7 +folderAsset: yes +timeCreated: 1489733951 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs new file mode 100644 index 00000000..f4c1af3e --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs @@ -0,0 +1,48 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AchievementStep_StepIndexTest( + [Values(-1, 0, 1)] int stepIndex + ) + { + var achievementId = "unit_tester"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AchievementStep_AchievementIdTest( + [Values("unit_tester", "", null)] string achievementId + ) + { + var stepIndex = 0; + + if (string.IsNullOrEmpty(achievementId)) + { + Assert.Throws(() => AnalyticsEvent.AchievementStep(stepIndex, achievementId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void AchievementStep_CustomDataTest() + { + var stepIndex = 0; + var achievementId = "unit_tester"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs.meta new file mode 100644 index 00000000..9ca9a734 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a592d27ead6884163839d4f8da3977ef +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs new file mode 100644 index 00000000..4cb4c4bd --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs @@ -0,0 +1,34 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AchievementUnlocked_AchievementIdTest( + [Values("unit_tester", "", null)] string achievementId + ) + { + if (string.IsNullOrEmpty(achievementId)) + { + Assert.Throws(() => AnalyticsEvent.AchievementUnlocked(achievementId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementUnlocked(achievementId)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void AchievementUnlocked_CustomDataTest() + { + var achievementId = "unit_tester"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementUnlocked(achievementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs.meta new file mode 100644 index 00000000..3d3f40e1 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d1114812d620342e1a4ad3eaae7e220c +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs new file mode 100644 index 00000000..5efd551a --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AdComplete_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdComplete_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdComplete_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdComplete_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdComplete_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs.meta new file mode 100644 index 00000000..eb1155c3 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9405b416c158444b19157040fd664533 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs new file mode 100644 index 00000000..c5dfedb4 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AdOffer_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdOffer_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdOffer_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdOffer_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdOffer_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs.meta new file mode 100644 index 00000000..f9845981 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 96626a3e271e94e76a848c68828fbbac +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs new file mode 100644 index 00000000..8c554b65 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AdSkip_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdSkip_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdSkip_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdSkip_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdSkip_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs.meta new file mode 100644 index 00000000..186be883 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c09652e660b34484cb10d35ed2206df5 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs new file mode 100644 index 00000000..ae104d88 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AdStart_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdStart_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdStart_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdStart_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdStart_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs.meta new file mode 100644 index 00000000..98f15871 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 589b3ddef1e4d44cea68e0144bd95434 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs new file mode 100644 index 00000000..e24c6919 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs @@ -0,0 +1,115 @@ +#pragma warning disable 0612, 0618 + +using System; +using System.Collections.Generic; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + [TestFixture, Category("Standard Event SDK")] + public partial class AnalyticsEventTests + { + readonly Dictionary m_CustomData = new Dictionary(); + AnalyticsResult m_Result = AnalyticsResult.Ok; + + [SetUp] + public void TestCaseSetUp() + { + m_Result = AnalyticsResult.Ok; + + m_CustomData.Clear(); + m_CustomData.Add("custom_param", "test"); + } + + [Test] + public void SdkVersion_FormatTest() + { + int major, minor, patch; + var versions = AnalyticsEvent.sdkVersion.Split('.'); + + Assert.AreEqual(3, versions.Length, "Number of integer fields in version format"); + + Assert.IsTrue(int.TryParse(versions[0], out major), "Major version is an integer"); + Assert.IsTrue(int.TryParse(versions[1], out minor), "Minor version is an integer"); + Assert.IsTrue(int.TryParse(versions[2], out patch), "Patch version is an integer"); + + Assert.LessOrEqual(0, major, "Major version"); + Assert.LessOrEqual(0, minor, "Minor version"); + Assert.LessOrEqual(0, patch, "Patch version"); + } + + [Test] + public void Custom_EventNameTest( + [Values("custom_event", "", null)] string eventName + ) + { + if (string.IsNullOrEmpty(eventName)) + { + Assert.Throws(() => m_Result = AnalyticsEvent.Custom(eventName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void Custom_EventDataTest() + { + var eventName = "custom_event"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void Custom_RegisterUnregisterUnnamedTest() + { + Action> myAction = + eventData => eventData.Add("my_key", "my_value"); + + AnalyticsEvent.Register(myAction); // Registering for a named AnalyticsEvent + + var eventName = "custom_event"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName, m_CustomData)); + + EvaluateRegisteredCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + AnalyticsEvent.Unregister(myAction); + } + + /// Normal. Unregistered. + public static void EvaluateCustomData(IDictionary customData) + { + Assert.AreEqual(1, customData.Count, "Custom param count"); + } + + /// For Registered case. + public static void EvaluateRegisteredCustomData(IDictionary customData) + { + Assert.AreEqual(2, customData.Count, "Custom param count"); + } + + public static void EvaluateAnalyticsResult(AnalyticsResult result) + { + switch (result) + { + case AnalyticsResult.Ok: + break; + case AnalyticsResult.InvalidData: + Assert.Fail("Event data is invalid."); + break; + case AnalyticsResult.TooManyItems: + Assert.Fail("Event data consists of too many parameters."); + break; + default: + Debug.LogFormat("A result of {0} is passable for the purpose of this test.", result); + break; + } + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs.meta new file mode 100644 index 00000000..bb75d13e --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b5366b8adc0f44b3c9cb261a3f752d7a +timeCreated: 1492730660 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs new file mode 100644 index 00000000..56496550 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs @@ -0,0 +1,22 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void ChatMessageSent_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ChatMessageSent()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ChatMessageSent_CustomDataTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ChatMessageSent(m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs.meta new file mode 100644 index 00000000..16cb7f8d --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7b186a0d29a784d81809e8a5471d155e +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs new file mode 100644 index 00000000..4b3cfd35 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs @@ -0,0 +1,34 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void CutsceneSkip_CutsceneNameTest( + [Values("test_cutscene", "", null)] string name + ) + { + if (string.IsNullOrEmpty(name)) + { + Assert.Throws(() => AnalyticsEvent.CutsceneSkip(name)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneSkip(name)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void CutsceneSkip_CustomDataTest() + { + var name = "test_cutscene"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneSkip(name, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs.meta new file mode 100644 index 00000000..3722ed81 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f03b3e03b69e74ef9bd0f20377217a73 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs new file mode 100644 index 00000000..508cc790 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs @@ -0,0 +1,34 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void CutsceneStart_CutsceneNameTest( + [Values("test_cutscene", "", null)] string name + ) + { + if (string.IsNullOrEmpty(name)) + { + Assert.Throws(() => AnalyticsEvent.CutsceneStart(name)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneStart(name)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void CutsceneStart_CustomDataTest() + { + var name = "test_cutscene"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneStart(name, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs.meta new file mode 100644 index 00000000..47f3e967 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: edf97aac6cc5a437ebf600a06a2e5ac7 +timeCreated: 1492896816 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs new file mode 100644 index 00000000..a5cc8442 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs @@ -0,0 +1,33 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void FirstInteraction_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void FirstInteraction_ActionIdTest( + [Values("test_user_action", "", null)] string actionId + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction(actionId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void FirstInteraction_CustomDataTest() + { + var actionId = "test_user_action"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction(actionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs.meta new file mode 100644 index 00000000..d913d102 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 78759e25237a7430587982cd92a2a0d8 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs new file mode 100644 index 00000000..8e88f445 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void GameOver_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameOver_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameOver_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelName)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameOver_LevelIndex_LevelNameTest( + [Values(0)] int levelIndex, + [Values("test_level", "", null)] string levelName + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex, levelName)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameOver_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex, levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs.meta new file mode 100644 index 00000000..60aa2a19 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a30e59ca9f68d46db88323ac18f49e31 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs new file mode 100644 index 00000000..18749c7c --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs @@ -0,0 +1,22 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void GameStart_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameStart()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameStart_CustomDataTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameStart(m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs.meta new file mode 100644 index 00000000..e17c1ba1 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2b2be9ee9f41a4b2db6b502697ba31b1 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs new file mode 100644 index 00000000..439d4e77 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs @@ -0,0 +1,111 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void IAPTransaction_ContextTest( + [Values("test", "", null)] string context) + { + var price = 1f; + var itemId = "test_item"; + + if (string.IsNullOrEmpty(context)) + { + Assert.Throws(() => AnalyticsEvent.IAPTransaction(context, price, itemId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId)); + } + + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_PriceTest( + [Values(-1f, 0f, 1f)] float price) + { + var context = "test"; + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_ItemIdTest( + [Values("test_item", "", null)] string itemId) + { + var context = "test"; + var price = 1f; + + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws(() => AnalyticsEvent.IAPTransaction(context, price, itemId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId)); + } + + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_ItemTypeTest( + [Values("test_type", "", null)] string itemType) + { + var context = "test"; + var price = 1f; + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_LevelTest( + [Values("test_level", "", null)] string level) + { + var context = "test"; + var price = 1f; + var itemId = "test_item"; + var itemType = "test_type"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_TransactionIdTest( + [Values("test_id", "", null)] string transactionId) + { + var context = "test"; + var price = 1f; + var itemId = "test_item"; + var itemType = "test_type"; + var level = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_CustomDataTest() + { + var context = "test"; + var price = 1f; + var itemId = "test_item"; + var itemType = "test_type"; + var level = "test_level"; + var transactionId = "test_id"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs.meta new file mode 100644 index 00000000..a9cb068c --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8b4a8234f532f4b34aba0ab70400d90d +timeCreated: 1497539738 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs new file mode 100644 index 00000000..ec2b6683 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs @@ -0,0 +1,176 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void ItemAcquired_CurrencyTypeTest( + [Values(AcquisitionType.Premium, AcquisitionType.Soft)] AcquisitionType currencyType) + { + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_ContextTest( + [Values("test", "", null)] string context) + { + var currencyType = AcquisitionType.Soft; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + if (string.IsNullOrEmpty(context)) + { + Assert.Throws(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + Assert.Throws(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ItemAcquired_AmountTest( + [Values(-1f, 0f, 1f)] float amount) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_ItemIdTest( + [Values("test_item", "", null)] string itemId) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var balance = 1f; + + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + Assert.Throws(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ItemAcquired_BalanceTest( + [Values(-1f, 0, 1f)] float balance) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_ItemTypeTest( + [Values("test_type", "", null)] string itemType) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_LevelTest( + [Values("test_level", "", null)] string level) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_TransactionIdTest( + [Values("test_id", "", null)] string transactionId) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + var level = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_CustomDataTest() + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + var level = "test_level"; + var transactionId = "test_id"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs.meta new file mode 100644 index 00000000..72834076 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5e7a49a6952af4d4ab2c3b038be68141 +timeCreated: 1497539770 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs new file mode 100644 index 00000000..52ee9422 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs @@ -0,0 +1,176 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void ItemSpent_CurrencyTypeTest( + [Values(AcquisitionType.Premium, AcquisitionType.Soft)] AcquisitionType currencyType) + { + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_ContextTest( + [Values("test", "", null)] string context) + { + var currencyType = AcquisitionType.Soft; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + if (string.IsNullOrEmpty(context)) + { + Assert.Throws(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + Assert.Throws(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ItemSpent_AmountTest( + [Values(-1f, 0f, 1f)] float amount) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_ItemIdTest( + [Values("test_item", "", null)] string itemId) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var balance = 1f; + + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + Assert.Throws(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ItemSpent_BalanceTest( + [Values(-1f, 0, 1f)] float balance) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_ItemTypeTest( + [Values("test_type", "", null)] string itemType) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_LevelTest( + [Values("test_level", "", null)] string level) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_TransactionIdTest( + [Values("test_id", "", null)] string transactionId) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + var level = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_CustomDataTest() + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + var level = "test_level"; + var transactionId = "test_id"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs.meta new file mode 100644 index 00000000..ab3b390a --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 00ed25e3298ac440eb327c706a964e3a +timeCreated: 1497539780 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs new file mode 100644 index 00000000..274e37c4 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelComplete_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelComplete_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws(() => AnalyticsEvent.LevelComplete(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelComplete_LevelIndex_LevelNameTest ( + // [Values(0)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelComplete_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs.meta new file mode 100644 index 00000000..70202cf9 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fa4ff09b6aaaa4df29a884efa38bce56 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs new file mode 100644 index 00000000..fece2ead --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelFail_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelFail_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws(() => AnalyticsEvent.LevelFail(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelFail_LevelIndex_LevelNameTest ( + // [Values(-1, 0, 1)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelFail_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs.meta new file mode 100644 index 00000000..05b52fdb --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 036d03e26977243fa9a2d7af48e51e08 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs new file mode 100644 index 00000000..e4859aba --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelQuit_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelQuit_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws(() => AnalyticsEvent.LevelQuit(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelQuit_LevelIndex_LevelNameTest ( + // [Values(-1, 0, 1)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelQuit_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs.meta new file mode 100644 index 00000000..0b0c0f77 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 617202f4e2bed4ef8acccfd6c1ecd6fa +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs new file mode 100644 index 00000000..fcbe9eb6 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelSkip_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelSkip_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws(() => AnalyticsEvent.LevelSkip(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelSkip_LevelIndex_LevelNameTest ( + // [Values(-1, 0, 1)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelSkip_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs.meta new file mode 100644 index 00000000..5d5b103c --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 93f7ca1a9c5c945a89e884f9611c70f0 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs new file mode 100644 index 00000000..ff4ef434 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelStart_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelStart_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws(() => AnalyticsEvent.LevelStart(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelStart_LevelIndex_LevelNameTest ( + // [Values(0)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelStart_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs.meta new file mode 100644 index 00000000..121018d8 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 876d47a520ae34f81a97792e1afed14b +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs new file mode 100644 index 00000000..96578a71 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelUp_LevelIndexTest( + [Values(0, 1, 2)] int newLevelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelUp_LevelNameTest( + [Values("new_test_level", "", null)] string newLevelName + ) + { + if (string.IsNullOrEmpty(newLevelName)) + { + Assert.Throws(() => AnalyticsEvent.LevelUp(newLevelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelUp_LevelIndex_LevelNameTest ( + // [Values(1)] int newLevelIndex, + // [Values("new_test_level", "", null)] string newLevelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex, newLevelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelUp_CustomDataTest() + { + var newLevelIndex = 1; + var newLevelName = "new_test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs.meta new file mode 100644 index 00000000..1d650da1 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b0bb2afc5cd494e6f9b44455a0fc22f8 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs new file mode 100644 index 00000000..80ffa6df --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void PostAdAction_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PostAdAction_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PostAdAction_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PostAdAction_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PostAdAction_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs.meta new file mode 100644 index 00000000..405d0119 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 293182c4d29604c05b6724ae00fd121a +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs new file mode 100644 index 00000000..5923cedd --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs @@ -0,0 +1,34 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void PushNotificationClick_MessageIdTest( + [Values("test_message", "", null)] string messageId + ) + { + if (string.IsNullOrEmpty(messageId)) + { + Assert.Throws(() => AnalyticsEvent.PushNotificationClick(messageId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationClick(messageId)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void PushNotificationClick_CustomDataTest() + { + var messageId = "test_message"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationClick(messageId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs.meta new file mode 100644 index 00000000..1ee5e1f9 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 240551e3142f04b0ca801ce8eb645ba2 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs new file mode 100644 index 00000000..2e842bdc --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs @@ -0,0 +1,22 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void PushNotificationEnable_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationEnable()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PushNotificationEnable_CustomDataTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationEnable(m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs.meta new file mode 100644 index 00000000..285653d9 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a10564aae782c458cbf1de024f4870f7 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs new file mode 100644 index 00000000..97a60fcc --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs @@ -0,0 +1,43 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void ScreenVisit_ScreenNameStringTest( + [Values("test_screen", "", null)] string screenName + ) + { + if (string.IsNullOrEmpty(screenName)) + { + Assert.Throws(() => AnalyticsEvent.ScreenVisit(screenName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ScreenVisit_ScreenNameEnumTest( + [Values(ScreenName.CrossPromo, ScreenName.IAPPromo, ScreenName.None)] ScreenName screenName + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ScreenVisit_CustomDataTest() + { + var screenName = ScreenName.MainMenu; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs.meta new file mode 100644 index 00000000..6327d182 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 768d77435df35443bad74aedc993c0cf +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs new file mode 100644 index 00000000..7cb38a1d --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs @@ -0,0 +1,110 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void SocialShareAccept_ShareTypeStringTest( + [Values("test_share", "", null)] string shareType + ) + { + var socialNetwork = SocialNetwork.Facebook; + + if (string.IsNullOrEmpty(shareType)) + { + Assert.Throws(() => AnalyticsEvent.SocialShare(shareType, socialNetwork)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void SocialShareAccept_ShareTypeEnumTest( + [Values(ShareType.TextOnly, ShareType.Image, ShareType.None)] ShareType shareType + ) + { + var socialNetwork = SocialNetwork.Twitter; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShareAccept_SocialNetworkStringTest( + [Values("test_network", "", null)] string socialNetwork + ) + { + var shareType = ShareType.Image; + + if (string.IsNullOrEmpty(socialNetwork)) + { + Assert.Throws(() => AnalyticsEvent.SocialShare(shareType, socialNetwork)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void SocialShareAccept_SocialNetworkEnumTest( + [Values(SocialNetwork.GooglePlus, SocialNetwork.OK_ru, SocialNetwork.None)] SocialNetwork socialNetwork + ) + { + var shareType = ShareType.Video; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShareAccept_SenderIdTest( + [Values("test_sender", "", null)] string senderId + ) + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId) + ); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShareAccept_RecipientIdTest( + [Values("test_recipient", "", null)] string recipientId + ) + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + var senderId = "test_sender"; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId, recipientId) + ); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShareAccept_CustomDataTest() + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + var senderId = "test_sender"; + var recipientId = "test_recipient"; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId, recipientId, m_CustomData) + ); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs.meta new file mode 100644 index 00000000..e491cf29 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 138961c4434d141a987d96df1f8d7342 +timeCreated: 1492896446 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs new file mode 100644 index 00000000..0809d04a --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs @@ -0,0 +1,110 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void SocialShare_ShareTypeStringTest( + [Values("test_share", "", null)] string shareType + ) + { + var socialNetwork = SocialNetwork.Facebook; + + if (string.IsNullOrEmpty(shareType)) + { + Assert.Throws(() => AnalyticsEvent.SocialShare(shareType, socialNetwork)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void SocialShare_ShareTypeEnumTest( + [Values(ShareType.TextOnly, ShareType.Image, ShareType.None)] ShareType shareType + ) + { + var socialNetwork = SocialNetwork.Twitter; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShare_SocialNetworkStringTest( + [Values("test_network", "", null)] string socialNetwork + ) + { + var shareType = ShareType.Image; + + if (string.IsNullOrEmpty(socialNetwork)) + { + Assert.Throws(() => AnalyticsEvent.SocialShare(shareType, socialNetwork)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void SocialShare_SocialNetworkEnumTest( + [Values(SocialNetwork.GooglePlus, SocialNetwork.OK_ru, SocialNetwork.None)] SocialNetwork socialNetwork + ) + { + var shareType = ShareType.Video; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShare_SenderIdTest( + [Values("test_sender", "", null)] string senderId + ) + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId) + ); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShare_RecipientIdTest( + [Values("test_recipient", "", null)] string recipientId + ) + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + var senderId = "test_sender"; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId, recipientId) + ); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShare_CustomDataTest() + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + var senderId = "test_sender"; + var recipientId = "test_recipient"; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId, recipientId, m_CustomData) + ); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs.meta new file mode 100644 index 00000000..bc9978d3 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 811f7f1f5920641c0a9233503492c9ba +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs new file mode 100644 index 00000000..367a4599 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs @@ -0,0 +1,75 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void StoreItemClick_StoreTypeTest( + [Values(StoreType.Premium, StoreType.Soft)] StoreType storeType + ) + { + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void StoreItemClick_ItemIdTest( + [Values("test_item", "", null)] string itemId + ) + { + var storeType = StoreType.Soft; + + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws(() => AnalyticsEvent.StoreItemClick(storeType, itemId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void StoreItemClick_ItemId_ItemNameTest( + [Values("test_item_id", "", null)] string itemId, + [Values("Test Item Name", "", null)] string itemName + ) + { + var storeType = StoreType.Soft; + + if (string.IsNullOrEmpty(itemId) && string.IsNullOrEmpty(itemName)) + { + Assert.Throws(() => AnalyticsEvent.StoreItemClick(storeType, itemId)); + } + else + { + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws(() => AnalyticsEvent.StoreItemClick(storeType, itemId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId, itemName)); + EvaluateAnalyticsResult(m_Result); + } + } + } + + [Test] + public void StoreItemClick_CustomDataTest() + { + var storeType = StoreType.Soft; + var itemId = "test_item"; + var itemName = "Test Item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId, itemName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs.meta new file mode 100644 index 00000000..182b9d1d --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c786248494be6489bbfa006bdf59c773 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs new file mode 100644 index 00000000..48918872 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void StoreOpened_StoreTypeTest( + [Values(StoreType.Premium, StoreType.Soft)] StoreType storeType + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreOpened(storeType)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void StoreOpened_CustomDataTest() + { + var storeType = StoreType.Soft; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreOpened(storeType, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs.meta new file mode 100644 index 00000000..65bf4722 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f4c7193663918411c8f78e3cf844cb9e +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs new file mode 100644 index 00000000..3e166af2 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs @@ -0,0 +1,26 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void TutorialComplete_TutorialIdTest( + [Values("test_tutorial", "", null)] string tutorialId + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialComplete(tutorialId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialComplete_CustomDataTest() + { + var tutorialId = "test_tutorial"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialComplete(tutorialId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs.meta new file mode 100644 index 00000000..b2067fea --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b025f6f8a47be46418bcb0ed1050cfb4 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs new file mode 100644 index 00000000..9b413eda --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs @@ -0,0 +1,26 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void TutorialSkip_TutorialIdTest( + [Values("test_tutorial", "", null)] string tutorialId + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialSkip(tutorialId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialSkip_CustomDataTest() + { + var tutorialId = "test_tutorial"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialSkip(tutorialId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs.meta new file mode 100644 index 00000000..b700e0ed --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3ab6e6972ecb54e2cbd505692415a7ba +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs new file mode 100644 index 00000000..425f2773 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs @@ -0,0 +1,26 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void TutorialStart_TutorialIdTest( + [Values("test_tutorial", "", null)] string tutorialId + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStart(tutorialId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialStart_CustomDataTest() + { + var tutorialId = "test_tutorial"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStart(tutorialId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs.meta new file mode 100644 index 00000000..bfa7a294 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2622838afa3284cc882c48ceea4c8220 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs new file mode 100644 index 00000000..524d8195 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs @@ -0,0 +1,39 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void TutorialStep_StepIndexTest( + [Values(-1, 0, 1)] int stepIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialStep_TutorialIdTest( + [Values("test_tutorial", "", null)] string tutorialId + ) + { + var stepIndex = 0; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex, tutorialId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialStep_CustomDataTest() + { + var stepIndex = 0; + var tutorialId = "test_tutorial"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex, tutorialId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs.meta new file mode 100644 index 00000000..54ebcfa2 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a571de1bea3cb4c9784493c6f1b0b76c +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef new file mode 100644 index 00000000..e2141b4b --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef @@ -0,0 +1,19 @@ +{ + "name": "Unity.Analytics.StandardEvents.EditorTests", + "references": [], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "Unity.Analytics.StandardEvents.dll" + ], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [] +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef.meta new file mode 100644 index 00000000..074fd474 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: adee0c1377ef8b2489060e152dd0d119 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs new file mode 100644 index 00000000..56920a63 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs @@ -0,0 +1,43 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void UserSignup_AuthorizationNetworkStringTest( + [Values("test_network", "", null)] string network + ) + { + if (string.IsNullOrEmpty(network)) + { + Assert.Throws(() => AnalyticsEvent.UserSignup(network)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void UserSignup_AuthorizationNetworkEnumTest( + [Values(AuthorizationNetwork.Facebook, AuthorizationNetwork.GameCenter, AuthorizationNetwork.None)] AuthorizationNetwork network + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void UserSignup_CustomDataTest() + { + var network = AuthorizationNetwork.Internal; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs.meta new file mode 100644 index 00000000..3441ed8b --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8b0f0c8689876421c90e7b60f096325a +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime.meta new file mode 100644 index 00000000..a17b3d13 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4f5362359d4548b44a34a45f19efb4bf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy.meta new file mode 100644 index 00000000..279b827c --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f2233ba26b028cc4b9e58681e7a22dac +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs new file mode 100644 index 00000000..921976a5 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs @@ -0,0 +1,24 @@ +using System; +using NUnit.Framework; +using UnityEngine; +using UnityEngine.Analytics; + +public class JsonSerialization +{ + // This test was create to verifiy JsonUtility could properly deserialize the nested + // structs used for opt-out status. That process is now handled with remote config so + // now we just verify that the expected response from the token API can be deserialized. + + const string kTokenJson = "{" + + "\"url\": \"https://analytics.cloud.unity3d.com/optout?token=24a96770b5c4420a4f930dbb4b72fbb83erfg3edf3ert4r1/\"," + + "\"token\": \"24a96770b5c4420a4f930dbb4b72fbb83erfg3edf3ert4r1\"" + + "}"; + + [Test] + public void TestTokenStruct_JsonUtility() + { + var tokenData = JsonUtility.FromJson(kTokenJson); + Assert.AreEqual("https://analytics.cloud.unity3d.com/optout?token=24a96770b5c4420a4f930dbb4b72fbb83erfg3edf3ert4r1/", tokenData.url); + Assert.AreEqual("24a96770b5c4420a4f930dbb4b72fbb83erfg3edf3ert4r1", tokenData.token); + } +} diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs.meta new file mode 100644 index 00000000..feafedcf --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0fe4c527c3aa3eb42912a1caafbbc6a0 +timeCreated: 1526476500 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef new file mode 100644 index 00000000..54d317a0 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef @@ -0,0 +1,12 @@ +{ + "name": "Unity.Analytics.DataPrivacy.Tests", + "references": [ + "Unity.Analytics.DataPrivacy" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef.meta new file mode 100644 index 00000000..5d4c3c4f --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 015812e983113a84b95773e55f3cec13 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll new file mode 100644 index 00000000..8f567aad Binary files /dev/null and b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll differ diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.mdb b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.mdb new file mode 100644 index 00000000..ab7a630c Binary files /dev/null and b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.mdb differ diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.mdb.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.mdb.meta new file mode 100644 index 00000000..3acc6079 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.mdb.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fec197bad419341558f81f2ec8a05e18 +timeCreated: 1491256222 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.meta new file mode 100644 index 00000000..6611ac13 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: 224ede67b4f3a4109bfec4d5cb161b05 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 1 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + '': first + second: + enabled: 0 + settings: {} + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll new file mode 100644 index 00000000..b8e7ea79 Binary files /dev/null and b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll differ diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.mdb b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.mdb new file mode 100644 index 00000000..03748075 Binary files /dev/null and b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.mdb differ diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.mdb.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.mdb.meta new file mode 100644 index 00000000..09cc7932 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.mdb.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 36e8bb3feb5e6402185947b817a6ed8d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.meta new file mode 100644 index 00000000..b4342b7f --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.StandardEvents.dll.meta @@ -0,0 +1,37 @@ +fileFormatVersion: 2 +guid: dce91326f102345f3ba2f0987c0679c2 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude N3DS: 1 + Exclude PS4: 1 + Exclude PSP2: 1 + Exclude Switch: 1 + Exclude WiiU: 1 + Exclude XboxOne: 1 + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll new file mode 100644 index 00000000..21975ccf Binary files /dev/null and b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll differ diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.mdb b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.mdb new file mode 100644 index 00000000..0811ab65 Binary files /dev/null and b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.mdb differ diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.mdb.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.mdb.meta new file mode 100644 index 00000000..5b0f4d17 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.mdb.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d607a67dc772b484da060e66a3d61a4e +timeCreated: 1491256195 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.meta b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.meta new file mode 100644 index 00000000..7f95e23e --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll.meta @@ -0,0 +1,38 @@ +fileFormatVersion: 2 +guid: 220224b43fc464c28bc0e8de8f54a432 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude N3DS: 1 + Exclude PS4: 1 + Exclude PSP2: 1 + Exclude Switch: 1 + Exclude WiiU: 1 + Exclude XboxOne: 1 + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + userData: + assetBundleName: + assetBundleVariant: + diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/package.json b/Library/PackageCache/com.unity.analytics@3.3.2/package.json new file mode 100644 index 00000000..a1f71399 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/package.json @@ -0,0 +1,21 @@ +{ + "dependencies": { + "com.unity.ugui": "1.0.0" + }, + "description": "The Unity Analytics Library contains the Analytics Event Tracker component, the Data Privacy plug-in, and the Standard Events API.", + "displayName": "Analytics Library", + "keywords": [ + "analytics", + "unity" + ], + "name": "com.unity.analytics", + "readme": "Unity Analytics", + "repoPackagePath": "build/install/com.unity.analytics", + "repository": { + "revision": "8196036181e573933751e8c0296037c7b6ddca65", + "type": "git", + "url": "git@gitlab.cds.internal.unity3d.com:upm-packages/analytics/com.unity.analytics.git" + }, + "unity": "2019.1", + "version": "3.3.2" +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.analytics@3.3.2/package.json.meta b/Library/PackageCache/com.unity.analytics@3.3.2/package.json.meta new file mode 100644 index 00000000..83b0f788 --- /dev/null +++ b/Library/PackageCache/com.unity.analytics@3.3.2/package.json.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 510d1d319d2754ea4a47c6dd8c421ea0 +timeCreated: 1491258762 +licenseType: Pro +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md b/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md new file mode 100644 index 00000000..7dfff7ca --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md @@ -0,0 +1,28 @@ +# Changelog +All notable changes to this package will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [1.2.15] - 2018-11-16 +Added support for non-experimental UIElements. + +## [1.2.11] - 2018-09-04 +Made some performance improvements to reduce impact on ReloadAssemblies. + +## [1.2.9] - 2018-08-13 +Test issues for the Collab History Window are now fixed. + +## [1.2.7] - 2018-08-07 +Toolbar drop-down will no longer show up when package is uninstalled. + +## [1.2.6] - 2018-06-15 +Fixed an issue where Collab's History window wouldn't load properly. + +## [1.2.5] - 2018-05-21 +This is the first release of *Unity Package CollabProxy*. + +### Added +- Collab history and toolbar windows +- Collab view and presenter classes +- Collab Editor tests for view and presenter diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md.meta new file mode 100644 index 00000000..38274a69 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 782c49e6e68074dc7ba12c95537825ce +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md b/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md new file mode 100644 index 00000000..57808d56 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md @@ -0,0 +1,9 @@ + + + + Unity.CollabProxy.Dependencies + 1.1.0-experimental + Rohit Garg + Dependencies for the CollabProxy package + + diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md.meta new file mode 100644 index 00000000..24e45c2f --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 470530e667ad4475786b28fa3187ce95 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Documentation~/collab-proxy.md b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Documentation~/collab-proxy.md new file mode 100644 index 00000000..c1800d6a --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Documentation~/collab-proxy.md @@ -0,0 +1,5 @@ +# About Unity Collaborate + +Collaborate is a simple way for teams to save, share, and sync their Unity project. + +Please refer to the online documentation [here.](https://docs.unity3d.com/Manual/UnityCollaborate.html) \ No newline at end of file diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor.meta new file mode 100644 index 00000000..b54ca871 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d31e5d760880a4e52a3a75322481d0d2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs new file mode 100644 index 00000000..d7266b63 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using System.Runtime.CompilerServices; +using UnityEngine; + +[assembly: InternalsVisibleTo("Unity.CollabProxy.EditorTests")] diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs.meta new file mode 100644 index 00000000..e384b318 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d4ef26aa386b44923b61c9c4b505a67c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab.meta new file mode 100644 index 00000000..694fc4ea --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c18cb9388313e4287ad5895ee735c47d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs new file mode 100644 index 00000000..029ce1c7 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs @@ -0,0 +1,24 @@ +using UnityEditor; +using UnityEditor.Collaboration; +using UnityEngine; + +namespace CollabProxy.UI +{ + [InitializeOnLoad] + public class Bootstrap + { + private const float kCollabToolbarButtonWidth = 78.0f; + + static Bootstrap() + { + Collab.ShowHistoryWindow = CollabHistoryWindow.ShowHistoryWindow; + Collab.ShowToolbarAtPosition = CollabToolbarWindow.ShowCenteredAtPosition; + Collab.IsToolbarVisible = CollabToolbarWindow.IsVisible; + Collab.CloseToolbar = CollabToolbarWindow.CloseToolbar; + Toolbar.AddSubToolbar(new CollabToolbarButton + { + Width = kCollabToolbarButtonWidth + }); + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs.meta new file mode 100644 index 00000000..641d54b7 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8aa8171e088f94069bbd1978a053f7dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs new file mode 100644 index 00000000..c7f90aa1 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs @@ -0,0 +1,21 @@ +using System; + +namespace UnityEditor.Collaboration +{ + internal static class CollabAnalytics + { + [Serializable] + private struct CollabUserActionAnalyticsEvent + { + public string category; + public string action; + } + + public static void SendUserAction(string category, string action) + { + EditorAnalytics.SendCollabUserAction(new CollabUserActionAnalyticsEvent() { category = category, action = action }); + } + + public static readonly string historyCategoryString = "History"; + }; +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs.meta new file mode 100644 index 00000000..2f46e9bc --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f944311c8fff2479fa3ba741f6039fc8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs new file mode 100644 index 00000000..b855bce3 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs @@ -0,0 +1,330 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using UnityEditor.Collaboration; + +#if UNITY_2019_1_OR_NEWER +using UnityEditor.UIElements; +using UnityEngine.UIElements; +#else +using UnityEditor.Experimental.UIElements; +using UnityEngine.Experimental.UIElements; +using UnityEngine.Experimental.UIElements.StyleEnums; +#endif + +using UnityEngine; +using UnityEditor.Connect; + +namespace UnityEditor +{ + internal class CollabHistoryWindow : EditorWindow, ICollabHistoryWindow + { +#if UNITY_2019_1_OR_NEWER + private const string ResourcesPath = "Packages/com.unity.collab-proxy/Editor/Resources/Styles/"; +#else + private const string ResourcesPath = "StyleSheets/"; +#endif + + + const string kWindowTitle = "Collab History"; + const string kServiceUrl = "developer.cloud.unity3d.com"; + + [MenuItem("Window/Asset Management/Collab History", false, 1)] + public static void ShowHistoryWindow() + { + EditorWindow.GetWindow(kWindowTitle); + } + + [MenuItem("Window/Asset Management/Collab History", true)] + public static bool ValidateShowHistoryWindow() + { + return Collab.instance.IsCollabEnabledForCurrentProject(); + } + + CollabHistoryPresenter m_Presenter; + Dictionary m_Views; + List m_HistoryItems = new List(); + HistoryState m_State; + VisualElement m_Container; + PagedListView m_Pager; + ScrollView m_HistoryView; + int m_ItemsPerPage = 5; + string m_InProgressRev; + bool m_RevisionActionsEnabled; + + public CollabHistoryWindow() + { + minSize = new Vector2(275, 50); + } + + public void OnEnable() + { + SetupGUI(); + name = "CollabHistory"; + + if (m_Presenter == null) + { + m_Presenter = new CollabHistoryPresenter(this, new CollabHistoryItemFactory(), new RevisionsService(Collab.instance, UnityConnect.instance)); + } + m_Presenter.OnWindowEnabled(); + } + + public void OnDisable() + { + m_Presenter.OnWindowDisabled(); + } + + public bool revisionActionsEnabled + { + get { return m_RevisionActionsEnabled; } + set + { + if (m_RevisionActionsEnabled == value) + return; + + m_RevisionActionsEnabled = value; + foreach (var historyItem in m_HistoryItems) + { + historyItem.RevisionActionsEnabled = value; + } + } + } + + private void AddStyleSheetPath(VisualElement root, string path) + { +#if UNITY_2019_1_OR_NEWER + root.styleSheets.Add(EditorGUIUtility.Load(path) as StyleSheet); +#else + root.AddStyleSheetPath(path); +#endif + } + + + public void SetupGUI() + { +#if UNITY_2019_1_OR_NEWER + var root = this.rootVisualElement; +#else + var root = this.GetRootVisualContainer(); +#endif + AddStyleSheetPath(root, ResourcesPath + "CollabHistoryCommon.uss"); + if (EditorGUIUtility.isProSkin) + { + AddStyleSheetPath(root, ResourcesPath + "CollabHistoryDark.uss"); + } + else + { + AddStyleSheetPath(root, ResourcesPath + "CollabHistoryLight.uss"); + } + + m_Container = new VisualElement(); + m_Container.StretchToParentSize(); + root.Add(m_Container); + + m_Pager = new PagedListView() + { + name = "PagedElement", + pageSize = m_ItemsPerPage + }; + + var errorView = new StatusView() + { + message = "An Error Occurred", + icon = EditorGUIUtility.LoadIconRequired("Collab.Warning") as Texture, + }; + + var noInternetView = new StatusView() + { + message = "No Internet Connection", + icon = EditorGUIUtility.LoadIconRequired("Collab.NoInternet") as Texture, + }; + + var maintenanceView = new StatusView() + { + message = "Maintenance", + }; + + var loginView = new StatusView() + { + message = "Sign in to access Collaborate", + buttonText = "Sign in...", + callback = SignInClick, + }; + + var noSeatView = new StatusView() + { + message = "Ask your project owner for access to Unity Teams", + buttonText = "Learn More", + callback = NoSeatClick, + }; + + var waitingView = new StatusView() + { + message = "Updating...", + }; + + m_HistoryView = new ScrollView() { name = "HistoryContainer", showHorizontal = false}; + m_HistoryView.contentContainer.StretchToParentWidth(); + m_HistoryView.Add(m_Pager); + + m_Views = new Dictionary() + { + {HistoryState.Error, errorView}, + {HistoryState.Offline, noInternetView}, + {HistoryState.Maintenance, maintenanceView}, + {HistoryState.LoggedOut, loginView}, + {HistoryState.NoSeat, noSeatView}, + {HistoryState.Waiting, waitingView}, + {HistoryState.Ready, m_HistoryView} + }; + } + + public void UpdateState(HistoryState state, bool force) + { + if (state == m_State && !force) + return; + + m_State = state; + switch (state) + { + case HistoryState.Ready: + UpdateHistoryView(m_Pager); + break; + case HistoryState.Disabled: + Close(); + return; + } + + m_Container.Clear(); + m_Container.Add(m_Views[m_State]); + } + + public void UpdateRevisions(IEnumerable datas, string tip, int totalRevisions, int currentPage) + { + var elements = new List(); + var isFullDateObtained = false; // Has everything from this date been obtained? + m_HistoryItems.Clear(); + + if (datas != null) + { + DateTime currentDate = DateTime.MinValue; + foreach (var data in datas) + { + if (data.timeStamp.Date != currentDate.Date) + { + elements.Add(new CollabHistoryRevisionLine(data.timeStamp, isFullDateObtained)); + currentDate = data.timeStamp; + } + + var item = new CollabHistoryItem(data); + m_HistoryItems.Add(item); + + var container = new VisualElement(); + container.style.flexDirection = FlexDirection.Row; + if (data.current) + { + isFullDateObtained = true; + container.AddToClassList("currentRevision"); + container.AddToClassList("obtainedRevision"); + } + else if (data.obtained) + { + container.AddToClassList("obtainedRevision"); + } + else + { + container.AddToClassList("absentRevision"); + } + // If we use the index as-is, the latest commit will become #1, but we want it to be last + container.Add(new CollabHistoryRevisionLine(data.index)); + container.Add(item); + elements.Add(container); + } + } + + m_HistoryView.scrollOffset = new Vector2(0, 0); + m_Pager.totalItems = totalRevisions; + m_Pager.curPage = currentPage; + m_Pager.items = elements; + } + + public string inProgressRevision + { + get { return m_InProgressRev; } + set + { + m_InProgressRev = value; + foreach (var historyItem in m_HistoryItems) + { + historyItem.SetInProgressStatus(value); + } + } + } + + public int itemsPerPage + { + set + { + if (m_ItemsPerPage == value) + return; + m_Pager.pageSize = m_ItemsPerPage; + } + } + + public PageChangeAction OnPageChangeAction + { + set { m_Pager.OnPageChanged = value; } + } + + public RevisionAction OnGoBackAction + { + set { CollabHistoryItem.s_OnGoBack = value; } + } + + public RevisionAction OnUpdateAction + { + set { CollabHistoryItem.s_OnUpdate = value; } + } + + public RevisionAction OnRestoreAction + { + set { CollabHistoryItem.s_OnRestore = value; } + } + + public ShowBuildAction OnShowBuildAction + { + set { CollabHistoryItem.s_OnShowBuild = value; } + } + + public Action OnShowServicesAction + { + set { CollabHistoryItem.s_OnShowServices = value; } + } + + void UpdateHistoryView(VisualElement history) + { + } + + void NoSeatClick() + { + var connection = UnityConnect.instance; + var env = connection.GetEnvironment(); + // Map environment to url - prod is special + if (env == "production") + env = ""; + else + env += "-"; + + var url = "https://" + env + kServiceUrl + + "/orgs/" + connection.GetOrganizationId() + + "/projects/" + connection.GetProjectName() + + "/unity-teams/"; + Application.OpenURL(url); + } + + void SignInClick() + { + UnityConnect.instance.ShowLogin(); + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs.meta new file mode 100644 index 00000000..74358d40 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fed9dda667cab45d398d06402bba03f4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs new file mode 100644 index 00000000..eebe4aca --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs @@ -0,0 +1,297 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.Collaboration; +using UnityEditor.Connect; +using UnityEditor.Web; +using UnityEngine; + +namespace UnityEditor +{ + internal class CollabToolbarButton : SubToolbar, IDisposable + { + // Must match s_CollabIcon array + enum CollabToolbarState + { + NeedToEnableCollab, + UpToDate, + Conflict, + OperationError, + ServerHasChanges, + FilesToPush, + InProgress, + Disabled, + Offline + } + + private class CollabToolbarContent + { + readonly string m_iconName; + readonly string m_toolTip; + readonly CollabToolbarState m_state; + + static Dictionary m_CollabIcons; + + public CollabToolbarState RegisteredForState + { + get { return m_state; } + } + + public GUIContent GuiContent + { + get + { + if (m_CollabIcons == null) + { + m_CollabIcons = new Dictionary(); + } + + if (!m_CollabIcons.ContainsKey(this)) + { + m_CollabIcons.Add(this, EditorGUIUtility.TrTextContentWithIcon("Collab", m_toolTip, m_iconName)); + } + + return m_CollabIcons[this]; + } + } + + public CollabToolbarContent(CollabToolbarState state, string iconName, string toolTip) + { + m_state = state; + m_iconName = iconName; + m_toolTip = toolTip; + } + } + + CollabToolbarContent[] m_toolbarContents; + CollabToolbarState m_CollabToolbarState = CollabToolbarState.UpToDate; + const float kCollabButtonWidth = 78.0f; + ButtonWithAnimatedIconRotation m_CollabButton; + string m_DynamicTooltip; + static bool m_ShowCollabTooltip = false; + + private GUIContent currentCollabContent + { + get + { + CollabToolbarContent toolbarContent = + m_toolbarContents.FirstOrDefault(c => c.RegisteredForState.Equals(m_CollabToolbarState)); + GUIContent content = new GUIContent(toolbarContent == null? m_toolbarContents.First().GuiContent : toolbarContent.GuiContent); + if (!m_ShowCollabTooltip) + { + content.tooltip = null; + } + else if (m_DynamicTooltip != "") + { + content.tooltip = m_DynamicTooltip; + } + + if (Collab.instance.AreTestsRunning()) + { + content.text = "CTF"; + } + + return content; + } + } + + public CollabToolbarButton() + { + m_toolbarContents = new[] + { + new CollabToolbarContent(CollabToolbarState.NeedToEnableCollab, "CollabNew", " You need to enable collab."), + new CollabToolbarContent(CollabToolbarState.UpToDate, "Collab", " You are up to date."), + new CollabToolbarContent(CollabToolbarState.Conflict, "CollabConflict", " Please fix your conflicts prior to publishing."), + new CollabToolbarContent(CollabToolbarState.OperationError, "CollabError", " Last operation failed. Please retry later."), + new CollabToolbarContent(CollabToolbarState.ServerHasChanges, "CollabPull", " Please update, there are server changes."), + new CollabToolbarContent(CollabToolbarState.FilesToPush, "CollabPush", " You have files to publish."), + new CollabToolbarContent(CollabToolbarState.InProgress, "CollabProgress", " Operation in progress."), + new CollabToolbarContent(CollabToolbarState.Disabled, "CollabNew", " Collab is disabled."), + new CollabToolbarContent(CollabToolbarState.Offline, "CollabNew", " Please check your network connection.") + }; + + Collab.instance.StateChanged += OnCollabStateChanged; + UnityConnect.instance.StateChanged += OnUnityConnectStateChanged; + UnityConnect.instance.UserStateChanged += OnUnityConnectUserStateChanged; + } + + void OnUnityConnectUserStateChanged(UserInfo state) + { + UpdateCollabToolbarState(); + } + + void OnUnityConnectStateChanged(ConnectInfo state) + { + UpdateCollabToolbarState(); + } + + public override void OnGUI(Rect rect) + { + DoCollabDropDown(rect); + } + + Rect GUIToScreenRect(Rect guiRect) + { + Vector2 screenPoint = GUIUtility.GUIToScreenPoint(new Vector2(guiRect.x, guiRect.y)); + guiRect.x = screenPoint.x; + guiRect.y = screenPoint.y; + return guiRect; + } + + void ShowPopup(Rect rect) + { + // window should be centered on the button + ReserveRight(kCollabButtonWidth / 2, ref rect); + ReserveBottom(5, ref rect); + // calculate screen rect before saving assets since it might open the AssetSaveDialog window + var screenRect = GUIToScreenRect(rect); + // save all the assets + AssetDatabase.SaveAssets(); + if (Collab.ShowToolbarAtPosition != null && Collab.ShowToolbarAtPosition(screenRect)) + { + GUIUtility.ExitGUI(); + } + } + + void DoCollabDropDown(Rect rect) + { + UpdateCollabToolbarState(); + GUIStyle collabButtonStyle = "OffsetDropDown"; + bool showPopup = Toolbar.requestShowCollabToolbar; + Toolbar.requestShowCollabToolbar = false; + + bool enable = !EditorApplication.isPlaying; + + using (new EditorGUI.DisabledScope(!enable)) + { + bool animate = m_CollabToolbarState == CollabToolbarState.InProgress; + + EditorGUIUtility.SetIconSize(new Vector2(12, 12)); + if (GetCollabButton().OnGUI(rect, currentCollabContent, animate, collabButtonStyle)) + { + showPopup = true; + } + EditorGUIUtility.SetIconSize(Vector2.zero); + } + + if (m_CollabToolbarState == CollabToolbarState.Disabled) + return; + + if (showPopup) + { + ShowPopup(rect); + } + } + + public void OnCollabStateChanged(CollabInfo info) + { + UpdateCollabToolbarState(); + } + + public void UpdateCollabToolbarState() + { + var currentCollabState = CollabToolbarState.UpToDate; + bool networkAvailable = UnityConnect.instance.connectInfo.online && UnityConnect.instance.connectInfo.loggedIn; + m_DynamicTooltip = ""; + + if (UnityConnect.instance.isDisableCollabWindow) + { + currentCollabState = CollabToolbarState.Disabled; + } + else if (networkAvailable) + { + Collab collab = Collab.instance; + CollabInfo currentInfo = collab.collabInfo; + UnityErrorInfo errInfo; + bool error = false; + if (collab.GetError((UnityConnect.UnityErrorFilter.ByContext | UnityConnect.UnityErrorFilter.ByChild), out errInfo)) + { + error = (errInfo.priority <= (int)UnityConnect.UnityErrorPriority.Error); + m_DynamicTooltip = errInfo.shortMsg; + } + + if (!currentInfo.ready) + { + currentCollabState = CollabToolbarState.InProgress; + } + else if (error) + { + currentCollabState = CollabToolbarState.OperationError; + } + else if (currentInfo.inProgress) + { + currentCollabState = CollabToolbarState.InProgress; + } + else + { + bool collabEnable = Collab.instance.IsCollabEnabledForCurrentProject(); + + if (UnityConnect.instance.projectInfo.projectBound == false || !collabEnable) + { + currentCollabState = CollabToolbarState.NeedToEnableCollab; + } + else if (currentInfo.update) + { + currentCollabState = CollabToolbarState.ServerHasChanges; + } + else if (currentInfo.conflict) + { + currentCollabState = CollabToolbarState.Conflict; + } + else if (currentInfo.publish) + { + currentCollabState = CollabToolbarState.FilesToPush; + } + } + } + else + { + currentCollabState = CollabToolbarState.Offline; + } + + if (Collab.IsToolbarVisible != null) + { + if (currentCollabState != m_CollabToolbarState || + Collab.IsToolbarVisible() == m_ShowCollabTooltip) + { + m_CollabToolbarState = currentCollabState; + m_ShowCollabTooltip = !Collab.IsToolbarVisible(); + Toolbar.RepaintToolbar(); + } + } + } + + void ReserveRight(float width, ref Rect pos) + { + pos.x += width; + } + + void ReserveBottom(float height, ref Rect pos) + { + pos.y += height; + } + + ButtonWithAnimatedIconRotation GetCollabButton() + { + if (m_CollabButton == null) + { + const int repaintsPerSecond = 20; + const float animSpeed = 500f; + const bool mouseDownButton = true; + m_CollabButton = new ButtonWithAnimatedIconRotation(() => (float)EditorApplication.timeSinceStartup * animSpeed, Toolbar.RepaintToolbar, repaintsPerSecond, mouseDownButton); + } + + return m_CollabButton; + } + + public void Dispose() + { + Collab.instance.StateChanged -= OnCollabStateChanged; + UnityConnect.instance.StateChanged -= OnUnityConnectStateChanged; + UnityConnect.instance.UserStateChanged -= OnUnityConnectUserStateChanged; + + if (m_CollabButton != null) + m_CollabButton.Clear(); + } + } +} // namespace \ No newline at end of file diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs.meta new file mode 100644 index 00000000..949d8db9 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 882f1a4147a284f028899b9c018e63eb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs new file mode 100644 index 00000000..27938750 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs @@ -0,0 +1,137 @@ +using UnityEngine; +using UnityEditor.Collaboration; +using UnityEditor.Web; +using UnityEditor.Connect; + +namespace UnityEditor +{ + [InitializeOnLoad] + internal class WebViewStatic : ScriptableSingleton + { + [SerializeField] + WebView m_WebView; + + static public WebView GetWebView() + { + return instance.m_WebView; + } + + static public void SetWebView(WebView webView) + { + instance.m_WebView = webView; + } + } + + [InitializeOnLoad] + internal class CollabToolbarWindow : WebViewEditorStaticWindow, IHasCustomMenu + { + internal override WebView webView + { + get {return WebViewStatic.GetWebView(); } + set {WebViewStatic.SetWebView(value); } + } + + private const string kWindowName = "Unity Collab Toolbar"; + + private static long s_LastClosedTime; + private static CollabToolbarWindow s_CollabToolbarWindow; + + public static bool s_ToolbarIsVisible = false; + + const int kWindowWidth = 320; + const int kWindowHeight = 350; + + public static void CloseToolbar() + { + foreach (CollabToolbarWindow window in Resources.FindObjectsOfTypeAll()) + window.Close(); + } + + [MenuItem("Window/Asset Management/Collab Toolbar", false /*IsValidateFunction*/, 2, true /* IsInternalMenu */)] + public static CollabToolbarWindow ShowToolbarWindow() + { + //Create a new window if it does not exist + if (s_CollabToolbarWindow == null) + { + s_CollabToolbarWindow = GetWindow(false, kWindowName) as CollabToolbarWindow; + } + + return s_CollabToolbarWindow; + } + + [MenuItem("Window/Asset Management/Collab Toolbar", true /*IsValidateFunction*/)] + public static bool ValidateShowToolbarWindow() + { + return true; + } + + public static bool IsVisible() + { + return s_ToolbarIsVisible; + } + + public static bool ShowCenteredAtPosition(Rect buttonRect) + { + buttonRect.x -= kWindowWidth / 2; + // We could not use realtimeSinceStartUp since it is set to 0 when entering/exitting playmode, we assume an increasing time when comparing time. + long nowMilliSeconds = System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond; + bool justClosed = nowMilliSeconds < s_LastClosedTime + 50; + if (!justClosed) + { + // Method may have been triggered programmatically, without a user event to consume. + if (Event.current.type != EventType.Layout) + { + Event.current.Use(); + } + if (s_CollabToolbarWindow == null) + s_CollabToolbarWindow = CreateInstance() as CollabToolbarWindow; + var windowSize = new Vector2(kWindowWidth, kWindowHeight); + s_CollabToolbarWindow.initialOpenUrl = "file:///" + EditorApplication.userJavascriptPackagesPath + "unityeditor-collab-toolbar/dist/index.html"; + s_CollabToolbarWindow.Init(); + s_CollabToolbarWindow.ShowAsDropDown(buttonRect, windowSize); + s_CollabToolbarWindow.OnFocus(); + return true; + } + return false; + } + + // Receives HTML title + public void OnReceiveTitle(string title) + { + titleContent.text = title; + } + + public new void OnInitScripting() + { + base.OnInitScripting(); + } + + public override void OnEnable() + { + minSize = new Vector2(kWindowWidth, kWindowHeight); + maxSize = new Vector2(kWindowWidth, kWindowHeight); + initialOpenUrl = "file:///" + EditorApplication.userJavascriptPackagesPath + "unityeditor-collab-toolbar/dist/index.html"; + base.OnEnable(); + s_ToolbarIsVisible = true; + } + + internal new void OnDisable() + { + s_LastClosedTime = System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond; + if (s_CollabToolbarWindow) + { + s_ToolbarIsVisible = false; + NotifyVisibility(s_ToolbarIsVisible); + } + s_CollabToolbarWindow = null; + + base.OnDisable(); + } + + public new void OnDestroy() + { + OnLostFocus(); + base.OnDestroy(); + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs.meta new file mode 100644 index 00000000..b08bf2aa --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f516f1ec21a54a59a92bf99db2d9535 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters.meta new file mode 100644 index 00000000..91331532 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d437fe60bb34f45728664a5d930c1635 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs new file mode 100644 index 00000000..91d500be --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs @@ -0,0 +1,228 @@ +using System.Collections.Generic; +using UnityEditor.Connect; +using UnityEditor.Web; + +namespace UnityEditor.Collaboration +{ + internal class CollabHistoryPresenter + { + public const int ItemsPerPage = 5; + ICollabHistoryWindow m_Window; + ICollabHistoryItemFactory m_Factory; + IRevisionsService m_Service; + ConnectInfo m_ConnectState; + CollabInfo m_CollabState; + bool m_IsCollabError; + int m_TotalRevisions; + int m_CurrentPage; + int m_RequestedPage; + bool m_FetchInProgress; + + BuildAccess m_BuildAccess; + string m_ProgressRevision; + public bool BuildServiceEnabled {get; set; } + + public CollabHistoryPresenter(ICollabHistoryWindow window, ICollabHistoryItemFactory factory, IRevisionsService service) + { + m_Window = window; + m_Factory = factory; + m_Service = service; + m_CurrentPage = 0; + m_BuildAccess = new BuildAccess(); + m_Service.FetchRevisionsCallback += OnFetchRevisions; + } + + public void OnWindowEnabled() + { + UnityConnect.instance.StateChanged += OnConnectStateChanged; + Collab.instance.StateChanged += OnCollabStateChanged; + Collab.instance.RevisionUpdated += OnCollabRevisionUpdated; + Collab.instance.JobsCompleted += OnCollabJobsCompleted; + Collab.instance.ErrorOccurred += OnCollabError; + Collab.instance.ErrorCleared += OnCollabErrorCleared; + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + m_ConnectState = UnityConnect.instance.GetConnectInfo(); + m_CollabState = Collab.instance.GetCollabInfo(); + + m_Window.revisionActionsEnabled = !EditorApplication.isPlayingOrWillChangePlaymode; + + // Setup window callbacks + m_Window.OnPageChangeAction = OnUpdatePage; + m_Window.OnUpdateAction = OnUpdate; + m_Window.OnRestoreAction = OnRestore; + m_Window.OnGoBackAction = OnGoBack; + m_Window.OnShowBuildAction = ShowBuildForCommit; + m_Window.OnShowServicesAction = ShowServicePage; + m_Window.itemsPerPage = ItemsPerPage; + + // Initialize data + UpdateBuildServiceStatus(); + var state = RecalculateState(); + // Only try to load the page if we're ready + if (state == HistoryState.Ready) + OnUpdatePage(m_CurrentPage); + m_Window.UpdateState(state, true); + } + + public void OnWindowDisabled() + { + UnityConnect.instance.StateChanged -= OnConnectStateChanged; + Collab.instance.StateChanged -= OnCollabStateChanged; + Collab.instance.RevisionUpdated -= OnCollabRevisionUpdated; + Collab.instance.JobsCompleted -= OnCollabJobsCompleted; + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + } + + private void OnConnectStateChanged(ConnectInfo state) + { + m_ConnectState = state; + + m_Window.UpdateState(RecalculateState(), false); + } + + private void OnCollabStateChanged(CollabInfo state) + { + // Sometimes a collab state change will trigger even though everything is the same + if (m_CollabState.Equals(state)) + return; + + if (m_CollabState.tip != state.tip) + OnUpdatePage(m_CurrentPage); + + m_CollabState = state; + m_Window.UpdateState(RecalculateState(), false); + if (state.inProgress) + { + m_Window.inProgressRevision = m_ProgressRevision; + } + else + { + m_Window.inProgressRevision = null; + } + } + + private void OnCollabRevisionUpdated(CollabInfo state) + { + OnUpdatePage(m_CurrentPage); + } + + private void OnCollabJobsCompleted(CollabInfo state) + { + m_ProgressRevision = null; + } + + private void OnCollabError() + { + m_IsCollabError = true; + m_Window.UpdateState(RecalculateState(), false); + } + + private void OnCollabErrorCleared() + { + m_IsCollabError = false; + m_FetchInProgress = true; + m_Service.GetRevisions(m_CurrentPage * ItemsPerPage, ItemsPerPage); + m_Window.UpdateState(RecalculateState(), false); + } + + private void OnPlayModeStateChanged(PlayModeStateChange stateChange) + { + // If entering play mode, disable + if (stateChange == PlayModeStateChange.ExitingEditMode || + stateChange == PlayModeStateChange.EnteredPlayMode) + { + m_Window.revisionActionsEnabled = false; + } + // If exiting play mode, enable! + else if (stateChange == PlayModeStateChange.EnteredEditMode || + stateChange == PlayModeStateChange.ExitingPlayMode) + { + m_Window.revisionActionsEnabled = true; + } + } + + private HistoryState RecalculateState() + { + if (!m_ConnectState.online) + return HistoryState.Offline; + if (m_ConnectState.maintenance || m_CollabState.maintenance) + return HistoryState.Maintenance; + if (!m_ConnectState.loggedIn) + return HistoryState.LoggedOut; + if (!m_CollabState.seat) + return HistoryState.NoSeat; + if (!Collab.instance.IsCollabEnabledForCurrentProject()) + return HistoryState.Disabled; + if (!Collab.instance.IsConnected() || !m_CollabState.ready || m_FetchInProgress) + return HistoryState.Waiting; + if (m_ConnectState.error || m_IsCollabError) + return HistoryState.Error; + + return HistoryState.Ready; + } + + // TODO: Eventually this can be a listener on the build service status + public void UpdateBuildServiceStatus() + { + foreach (var service in UnityConnectServiceCollection.instance.GetAllServiceInfos()) + { + if (service.name.Equals("Build")) + { + BuildServiceEnabled = service.enabled; + } + } + } + + public void ShowBuildForCommit(string revisionID) + { + m_BuildAccess.ShowBuildForCommit(revisionID); + } + + public void ShowServicePage() + { + m_BuildAccess.ShowServicePage(); + } + + public void OnUpdatePage(int page) + { + m_FetchInProgress = true; + m_Service.GetRevisions(page * ItemsPerPage, ItemsPerPage); + m_Window.UpdateState(RecalculateState(), false); + m_RequestedPage = page; + } + + private void OnFetchRevisions(RevisionsResult data) + { + m_FetchInProgress = false; + IEnumerable items = null; + if (data != null) + { + m_CurrentPage = m_RequestedPage; + m_TotalRevisions = data.RevisionsInRepo; + items = m_Factory.GenerateElements(data.Revisions, m_TotalRevisions, m_CurrentPage * ItemsPerPage, m_Service.tipRevision, m_Window.inProgressRevision, m_Window.revisionActionsEnabled, BuildServiceEnabled, m_Service.currentUser); + } + + // State must be recalculated prior to inserting items + m_Window.UpdateState(RecalculateState(), false); + m_Window.UpdateRevisions(items, m_Service.tipRevision, m_TotalRevisions, m_CurrentPage); + } + + private void OnRestore(string revisionId, bool updatetorevision) + { + m_ProgressRevision = revisionId; + Collab.instance.ResyncToRevision(revisionId); + } + + private void OnGoBack(string revisionId, bool updatetorevision) + { + m_ProgressRevision = revisionId; + Collab.instance.GoBackToRevision(revisionId, false); + } + + private void OnUpdate(string revisionId, bool updatetorevision) + { + m_ProgressRevision = revisionId; + Collab.instance.Update(revisionId, updatetorevision); + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta new file mode 100644 index 00000000..9c37ecd8 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a7c91a123806d41a0873fcdcb629b1c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views.meta new file mode 100644 index 00000000..f62ac6be --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd0a39b4d296d4d509b4f1dbd08d0630 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs new file mode 100644 index 00000000..ac3754d2 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs @@ -0,0 +1,53 @@ +using System; +using UnityEditor; +using UnityEditor.Collaboration; +using UnityEngine; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +#endif + +namespace UnityEditor.Collaboration +{ + internal class BuildStatusButton : Button + { + private readonly string iconPrefix = "Icons/Collab.Build"; + private readonly string iconSuffix = ".png"; + Label labelElement = new Label(); + Image iconElement = new Image() {name = "BuildIcon"}; + + public BuildStatusButton(Action clickEvent) : base(clickEvent) + { + iconElement.image = EditorGUIUtility.Load(iconPrefix + iconSuffix) as Texture; + labelElement.text = "Build Now"; + Add(iconElement); + Add(labelElement); + } + + public BuildStatusButton(Action clickEvent, BuildState state, int failures) : base(clickEvent) + { + switch (state) + { + case BuildState.InProgress: + iconElement.image = EditorGUIUtility.Load(iconPrefix + iconSuffix) as Texture; + labelElement.text = "In progress"; + break; + + case BuildState.Failed: + iconElement.image = EditorGUIUtility.Load(iconPrefix + "Failed" + iconSuffix) as Texture; + labelElement.text = failures + ((failures == 1) ? " failure" : " failures"); + break; + + case BuildState.Success: + iconElement.image = EditorGUIUtility.Load(iconPrefix + "Succeeded" + iconSuffix) as Texture; + labelElement.text = "success"; + break; + } + + Add(iconElement); + Add(labelElement); + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs.meta new file mode 100644 index 00000000..d74a58af --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0217a80286f79419daa202f69409f19b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs new file mode 100644 index 00000000..e3bb05a6 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs @@ -0,0 +1,78 @@ +using UnityEngine; +using System.Collections.Generic; +using UnityEditor.Connect; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +#endif + + +namespace UnityEditor.Collaboration +{ + internal class CollabHistoryDropDown : VisualElement + { + private readonly VisualElement m_FilesContainer; + private readonly Label m_ToggleLabel; + private int m_ChangesTotal; + private string m_RevisionId; + + public CollabHistoryDropDown(ICollection changes, int changesTotal, bool changesTruncated, string revisionId) + { + m_FilesContainer = new VisualElement(); + m_ChangesTotal = changesTotal; + m_RevisionId = revisionId; + + m_ToggleLabel = new Label(ToggleText(false)); + m_ToggleLabel.AddManipulator(new Clickable(ToggleDropdown)); + Add(m_ToggleLabel); + + foreach (ChangeData change in changes) + { + m_FilesContainer.Add(new CollabHistoryDropDownItem(change.path, change.action)); + } + + if (changesTruncated) + { + m_FilesContainer.Add(new Button(ShowAllClick) + { + text = "Show all on dashboard" + }); + } + } + + private void ToggleDropdown() + { + if (Contains(m_FilesContainer)) + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "CollapseAssets"); + Remove(m_FilesContainer); + m_ToggleLabel.text = ToggleText(false); + } + else + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ExpandAssets"); + Add(m_FilesContainer); + m_ToggleLabel.text = ToggleText(true); + } + } + + private string ToggleText(bool open) + { + var icon = open ? "\u25bc" : "\u25b6"; + var change = m_ChangesTotal == 1 ? "Change" : "Changes"; + return string.Format("{0} {1} Asset {2}", icon, m_ChangesTotal, change); + } + + private void ShowAllClick() + { + var host = UnityConnect.instance.GetConfigurationURL(CloudConfigUrl.CloudServicesDashboard); + var org = UnityConnect.instance.GetOrganizationId(); + var proj = UnityConnect.instance.GetProjectGUID(); + var url = string.Format("{0}/collab/orgs/{1}/projects/{2}/commits?commit={3}", host, org, proj, m_RevisionId); + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ShowAllOnDashboard"); + Application.OpenURL(url); + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs.meta new file mode 100644 index 00000000..513b66bf --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a483595b0257945278dc75c5ff7d82ee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs new file mode 100644 index 00000000..3ad43f23 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs @@ -0,0 +1,53 @@ +using System; +using System.IO; +using System.Linq; +using UnityEngine; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +#endif + + +namespace UnityEditor.Collaboration +{ + internal class CollabHistoryDropDownItem : VisualElement + { + public CollabHistoryDropDownItem(string path, string action) + { + var fileName = Path.GetFileName(path); + var isFolder = Path.GetFileNameWithoutExtension(path).Equals(fileName); + var fileIcon = GetIconElement(action, fileName, isFolder); + var metaContainer = new VisualElement(); + var fileNameLabel = new Label + { + name = "FileName", + text = fileName + }; + var filePathLabel = new Label + { + name = "FilePath", + text = path + }; + metaContainer.Add(fileNameLabel); + metaContainer.Add(filePathLabel); + Add(fileIcon); + Add(metaContainer); + } + + private Image GetIconElement(string action, string fileName, bool isFolder) + { + var prefix = isFolder ? "Folder" : "File"; + var actionName = action.First().ToString().ToUpper() + action.Substring(1); + // Use the same icon for renamed and moved files + actionName = actionName.Equals("Renamed") ? "Moved" : actionName; + var iconElement = new Image + { + name = "FileIcon", + image = EditorGUIUtility.LoadIcon("Icons/Collab." + prefix + actionName + ".png") + }; + return iconElement; + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta new file mode 100644 index 00000000..10bf40eb --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d912d4873af534bd4a9d44bf1b52f14e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs new file mode 100644 index 00000000..24e5d1dd --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs @@ -0,0 +1,229 @@ +using System; +using System.Linq; +using System.Security.Cryptography; +using UnityEditor.Connect; +using UnityEditor.Web; +using UnityEngine; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +using UnityEngine.Experimental.UIElements.StyleEnums; +#endif + +namespace UnityEditor.Collaboration +{ + internal class CollabHistoryItem : VisualElement + { + public static RevisionAction s_OnRestore; + public static RevisionAction s_OnGoBack; + public static RevisionAction s_OnUpdate; + public static ShowBuildAction s_OnShowBuild; + public static Action s_OnShowServices; + + private readonly string m_RevisionId; + private readonly string m_FullDescription; + private readonly DateTime m_TimeStamp; + private readonly Button m_Button; + private readonly HistoryProgressSpinner m_ProgressSpinner; + private VisualElement m_ActionsTray; + private VisualElement m_Details; + private Label m_Description; + private Label m_TimeAgo; + private readonly Button m_ExpandCollapseButton; + private bool m_Expanded; + + private const int kMaxDescriptionChars = 500; + + public bool RevisionActionsEnabled + { + set + { + m_Button.SetEnabled(value); + } + } + + public DateTime timeStamp + { + get { return m_TimeStamp; } + } + + public CollabHistoryItem(RevisionData data) + { + m_RevisionId = data.id; + m_TimeStamp = data.timeStamp; + name = "HistoryItem"; + m_ActionsTray = new VisualElement {name = "HistoryItemActionsTray"}; + m_ProgressSpinner = new HistoryProgressSpinner(); + m_Details = new VisualElement {name = "HistoryDetail"}; + var author = new Label(data.authorName) {name = "Author"}; + m_TimeAgo = new Label(TimeAgo.GetString(m_TimeStamp)); + m_FullDescription = data.comment; + var shouldTruncate = ShouldTruncateDescription(m_FullDescription); + if (shouldTruncate) + { + m_Description = new Label(GetTruncatedDescription(m_FullDescription)); + } + else + { + m_Description = new Label(m_FullDescription); + } + m_Description.name = "RevisionDescription"; + var dropdown = new CollabHistoryDropDown(data.changes, data.changesTotal, data.changesTruncated, data.id); + if (data.current) + { + m_Button = new Button(Restore) {name = "ActionButton", text = "Restore"}; + } + else if (data.obtained) + { + m_Button = new Button(GoBackTo) {name = "ActionButton", text = "Go back to..."}; + } + else + { + m_Button = new Button(UpdateTo) {name = "ActionButton", text = "Update"}; + } + m_Button.SetEnabled(data.enabled); + m_ProgressSpinner.ProgressEnabled = data.inProgress; + + m_ActionsTray.Add(m_ProgressSpinner); + m_ActionsTray.Add(m_Button); + + m_Details.Add(author); + m_Details.Add(m_TimeAgo); + m_Details.Add(m_Description); + + if (shouldTruncate) + { + m_ExpandCollapseButton = new Button(ToggleDescription) { name = "ToggleDescription", text = "Show More" }; + m_Details.Add(m_ExpandCollapseButton); + } + + if (data.buildState != BuildState.None) + { + BuildStatusButton buildButton; + if (data.buildState == BuildState.Configure) + buildButton = new BuildStatusButton(ShowServicePage); + else + buildButton = new BuildStatusButton(ShowBuildForCommit, data.buildState, data.buildFailures); + + m_Details.Add(buildButton); + } + + m_Details.Add(m_ActionsTray); + m_Details.Add(dropdown); + + Add(m_Details); + + this.schedule.Execute(UpdateTimeAgo).Every(1000 * 20); + } + + public static void SetUpCallbacks(RevisionAction Restore, RevisionAction GoBack, RevisionAction Update) + { + s_OnRestore = Restore; + s_OnGoBack = GoBack; + s_OnUpdate = Update; + } + + public void SetInProgressStatus(string revisionIdInProgress) + { + if (String.IsNullOrEmpty(revisionIdInProgress)) + { + m_Button.SetEnabled(true); + m_ProgressSpinner.ProgressEnabled = false; + } + else + { + m_Button.SetEnabled(false); + if (m_RevisionId.Equals(revisionIdInProgress)) + { + m_ProgressSpinner.ProgressEnabled = true; + } + } + } + + void ShowBuildForCommit() + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ShowBuild"); + if (s_OnShowBuild != null) + { + s_OnShowBuild(m_RevisionId); + } + } + + void ShowServicePage() + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ShowServices"); + if (s_OnShowServices != null) + { + s_OnShowServices(); + } + } + + void Restore() + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "Restore"); + if (s_OnRestore != null) + { + s_OnRestore(m_RevisionId, false); + } + } + + void GoBackTo() + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "GoBackTo"); + if (s_OnGoBack != null) + { + s_OnGoBack(m_RevisionId, false); + } + } + + void UpdateTo() + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "Update"); + if (s_OnUpdate != null) + { + s_OnUpdate(m_RevisionId, true); + } + } + + void UpdateTimeAgo() + { + m_TimeAgo.text = TimeAgo.GetString(m_TimeStamp); + } + + bool ShouldTruncateDescription(string description) + { + return description.Contains(Environment.NewLine) || description.Length > kMaxDescriptionChars; + } + + string GetTruncatedDescription(string description) + { + string result = description.Contains(Environment.NewLine) ? + description.Substring(0, description.IndexOf(Environment.NewLine)) : description; + if (result.Length > kMaxDescriptionChars) + { + result = result.Substring(0, kMaxDescriptionChars) + "..."; + } + return result; + } + + void ToggleDescription() + { + if (m_Expanded) + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "CollapseDescription"); + m_Expanded = false; + m_ExpandCollapseButton.text = "Show More"; + m_Description.text = GetTruncatedDescription(m_FullDescription); + } + else + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ExpandDescription"); + m_Expanded = true; + m_ExpandCollapseButton.text = "Show Less"; + m_Description.text = m_FullDescription; + } + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs.meta new file mode 100644 index 00000000..290bd28e --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c4c1445ee948a4124bfa9fb818a17e36 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs new file mode 100644 index 00000000..e7d7aa6c --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.Collaboration; +using UnityEngine; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +using UnityEngine.Experimental.UIElements.StyleEnums; +#endif + + +namespace UnityEditor.Collaboration +{ + internal class CollabHistoryItemFactory : ICollabHistoryItemFactory + { + const int k_MaxChangesPerRevision = 10; + + public IEnumerable GenerateElements(IEnumerable revisions, int totalRevisions, int startIndex, string tipRev, string inProgressRevision, bool revisionActionsEnabled, bool buildServiceEnabled, string currentUser) + { + int index = startIndex; + + foreach (var rev in revisions) + { + index++; + var current = rev.revisionID == tipRev; + + // Calculate build status + BuildState buildState = BuildState.None; + int buildFailures = 0; + if (rev.buildStatuses != null && rev.buildStatuses.Length > 0) + { + bool inProgress = false; + foreach (CloudBuildStatus buildStatus in rev.buildStatuses) + { + if (buildStatus.complete) + { + if (!buildStatus.success) + { + buildFailures++; + } + } + else + { + inProgress = true; + break; + } + } + + if (inProgress) + { + buildState = BuildState.InProgress; + } + else if (buildFailures > 0) + { + buildState = BuildState.Failed; + } + else + { + buildState = BuildState.Success; + } + } + else if (current && !buildServiceEnabled) + { + buildState = BuildState.Configure; + } + + // Calculate the number of changes performed on files and folders (not meta files) + var paths = new Dictionary(); + foreach (ChangeAction change in rev.entries) + { + if (change.path.EndsWith(".meta")) + { + var path = change.path.Substring(0, change.path.Length - 5); + // Actions taken on meta files are secondary to any actions taken on the main file + if (!paths.ContainsKey(path)) + paths[path] = new ChangeData() {path = path, action = change.action}; + } + else + { + paths[change.path] = new ChangeData() {path = change.path, action = change.action}; + } + } + + var displayName = (rev.author != currentUser) ? rev.authorName : "You"; + + var item = new RevisionData + { + id = rev.revisionID, + index = totalRevisions - index + 1, + timeStamp = TimeStampToDateTime(rev.timeStamp), + authorName = displayName, + comment = rev.comment, + + obtained = rev.isObtained, + current = current, + inProgress = (rev.revisionID == inProgressRevision), + enabled = revisionActionsEnabled, + + buildState = buildState, + buildFailures = buildFailures, + + changes = paths.Values.Take(k_MaxChangesPerRevision).ToList(), + changesTotal = paths.Values.Count, + changesTruncated = paths.Values.Count > k_MaxChangesPerRevision, + }; + + yield return item; + } + } + + private static DateTime TimeStampToDateTime(double timeStamp) + { + DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); + dateTime = dateTime.AddSeconds(timeStamp).ToLocalTime(); + return dateTime; + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta new file mode 100644 index 00000000..3250d966 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fc46f91ea1e8e4ca2ab693fef9156dbe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs new file mode 100644 index 00000000..2b8fe652 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs @@ -0,0 +1,94 @@ +using System; +using UnityEditor; +using UnityEditor.Collaboration; +using UnityEngine; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +#endif + +namespace UnityEditor.Collaboration +{ + internal class CollabHistoryRevisionLine : VisualElement + { + public CollabHistoryRevisionLine(int number) + { + AddNumber(number); + AddLine("topLine"); + AddLine("bottomLine"); + AddIndicator(); + } + + public CollabHistoryRevisionLine(DateTime date, bool isFullDateObtained) + { + AddLine(isFullDateObtained ? "obtainedDateLine" : "absentDateLine"); + AddHeader(GetFormattedHeader(date)); + AddToClassList("revisionLineHeader"); + } + + private void AddHeader(string content) + { + Add(new Label + { + text = content + }); + } + + private void AddIndicator() + { + Add(new VisualElement + { + name = "RevisionIndicator" + }); + } + + private void AddLine(string className = null) + { + var line = new VisualElement + { + name = "RevisionLine" + }; + if (!String.IsNullOrEmpty(className)) + { + line.AddToClassList(className); + } + Add(line); + } + + private void AddNumber(int number) + { + Add(new Label + { + text = number.ToString(), + name = "RevisionIndex" + }); + } + + private string GetFormattedHeader(DateTime date) + { + string result = "Commits on " + date.ToString("MMM d"); + switch (date.Day) + { + case 1: + case 21: + case 31: + result += "st"; + break; + case 2: + case 22: + result += "nd"; + break; + case 3: + case 23: + result += "rd"; + break; + default: + result += "th"; + break; + } + return result; + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta new file mode 100644 index 00000000..2659a3c3 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3c737f7a9d78541d1ab25f28f045dd32 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs new file mode 100644 index 00000000..fad3b824 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs @@ -0,0 +1,69 @@ +using UnityEngine; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +#endif + +namespace UnityEditor.Collaboration +{ + internal class HistoryProgressSpinner : Image + { + private readonly Texture2D[] m_StatusWheelTextures; + private bool m_ProgressEnabled; + private IVisualElementScheduledItem m_Animation; + + public bool ProgressEnabled + { + set + { + if (m_ProgressEnabled == value) + return; + + m_ProgressEnabled = value; + visible = value; + + + if (value) + { + if (m_Animation == null) + { + m_Animation = this.schedule.Execute(AnimateProgress).Every(33); + } + else + { + m_Animation.Resume(); + } + } + else + { + if (m_Animation != null) + { + m_Animation.Pause(); + } + } + } + } + + public HistoryProgressSpinner() + { + m_StatusWheelTextures = new Texture2D[12]; + for (int i = 0; i < 12; i++) + { + m_StatusWheelTextures[i] = EditorGUIUtility.LoadIcon("WaitSpin" + i.ToString("00")); + } + image = m_StatusWheelTextures[0]; + style.width = m_StatusWheelTextures[0].width; + style.height = m_StatusWheelTextures[0].height; + visible = false; + } + + private void AnimateProgress(TimerState obj) + { + int frame = (int)Mathf.Repeat(Time.realtimeSinceStartup * 10, 11.99f); + image = m_StatusWheelTextures[frame]; + MarkDirtyRepaint(); + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs.meta new file mode 100644 index 00000000..0ded4e8a --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cf6aca931950a4a6a886e214e9e649c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs new file mode 100644 index 00000000..03239a33 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using UnityEditor.Collaboration; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +#endif + +namespace UnityEditor.Collaboration +{ + internal interface ICollabHistoryItemFactory + { + IEnumerable GenerateElements(IEnumerable revsRevisions, int mTotalRevisions, int startIndex, string tipRev, string inProgressRevision, bool revisionActionsEnabled, bool buildServiceEnabled, string currentUser); + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta new file mode 100644 index 00000000..08e90856 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 821f5482c5a3f4389885f4432433f56f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs new file mode 100644 index 00000000..472a70e7 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs @@ -0,0 +1,192 @@ +using System; +using System.Collections.Generic; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +using UnityEngine.Experimental.UIElements.StyleEnums; +#endif + +namespace UnityEditor.Collaboration +{ + internal interface IPagerData + { + int curPage { get; } + int totalPages { get; } + PageChangeAction OnPageChanged { get; } + } + + internal class PagerElement : VisualElement + { + IPagerData m_Data; + readonly Label m_PageText; + readonly Button m_DownButton; + readonly Button m_UpButton; + + public PagerElement(IPagerData dataSource) + { + m_Data = dataSource; + + this.style.flexDirection = FlexDirection.Row; + this.style.alignSelf = Align.Center; + + Add(m_DownButton = new Button(OnPageDownClicked) {text = "\u25c5 Newer"}); + m_DownButton.AddToClassList("PagerDown"); + + m_PageText = new Label(); + m_PageText.AddToClassList("PagerLabel"); + Add(m_PageText); + + Add(m_UpButton = new Button(OnPageUpClicked) {text = "Older \u25bb"}); + m_UpButton.AddToClassList("PagerUp"); + + UpdateControls(); + } + + void OnPageDownClicked() + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "NewerPage"); + m_Data.OnPageChanged(m_Data.curPage - 1); + } + + void OnPageUpClicked() + { + CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "OlderPage"); + m_Data.OnPageChanged(m_Data.curPage + 1); + } + + public void Refresh() + { + UpdateControls(); + } + + void UpdateControls() + { + var curPage = m_Data.curPage; + var totalPages = m_Data.totalPages; + + m_PageText.text = (curPage + 1) + " / " + totalPages; + m_DownButton.SetEnabled(curPage > 0); + m_UpButton.SetEnabled(curPage < totalPages - 1); + } + } + + internal enum PagerLocation + { + Top, + Bottom, + } + + internal class PagedListView : VisualElement, IPagerData + { + public const int DefaultItemsPerPage = 10; + + readonly VisualElement m_ItemContainer; + readonly PagerElement m_PagerTop, m_PagerBottom; + int m_PageSize = DefaultItemsPerPage; + IEnumerable m_Items; + int m_TotalItems; + int m_CurPage; + + public int pageSize + { + set { m_PageSize = value; } + } + + public IEnumerable items + { + set + { + m_Items = value; + LayoutItems(); + } + } + + public int totalItems + { + set + { + if (m_TotalItems == value) + return; + + m_TotalItems = value; + UpdatePager(); + } + } + + public PageChangeAction OnPageChanged { get; set; } + + public PagedListView() + { + m_PagerTop = new PagerElement(this); + + m_ItemContainer = new VisualElement() + { + name = "PagerItems", + }; + Add(m_ItemContainer); + m_Items = new List(); + + m_PagerBottom = new PagerElement(this); + } + + void LayoutItems() + { + m_ItemContainer.Clear(); + foreach (var item in m_Items) + { + m_ItemContainer.Add(item); + } + } + + void UpdatePager() + { + if (m_PagerTop.parent != this && totalPages > 1 && curPage > 0) + Insert(0, m_PagerTop); + if (m_PagerTop.parent == this && (totalPages <= 1 || curPage == 0)) + Remove(m_PagerTop); + + if (m_PagerBottom.parent != this && totalPages > 1) + Add(m_PagerBottom); + if (m_PagerBottom.parent == this && totalPages <= 1) + Remove(m_PagerBottom); + + m_PagerTop.Refresh(); + m_PagerBottom.Refresh(); + } + + int pageCount + { + get + { + var pages = m_TotalItems / m_PageSize; + if (m_TotalItems % m_PageSize > 0) + pages++; + + return pages; + } + } + + public int curPage + { + get { return m_CurPage; } + set + { + m_CurPage = value; + UpdatePager(); + } + } + + public int totalPages + { + get + { + var extraPage = 0; + if (m_TotalItems % m_PageSize > 0) + extraPage = 1; + return m_TotalItems / m_PageSize + extraPage; + } + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs.meta new file mode 100644 index 00000000..565f7a2e --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 50de529b6a28f4a7093045e08810a5df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs new file mode 100644 index 00000000..9b50e7a5 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs @@ -0,0 +1,88 @@ +using System; +using UnityEditor; +using UnityEngine; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.UIElements; +#else +using UnityEngine.Experimental.UIElements; +using UnityEngine.Experimental.UIElements.StyleEnums; +#endif + +namespace UnityEditor.Collaboration +{ + internal class StatusView : VisualElement + { + Image m_Image; + Label m_Message; + Button m_Button; + Action m_Callback; + + public Texture icon + { + get { return m_Image.image; } + set + { + m_Image.image = value; + m_Image.visible = value != null; + // Until "display: hidden" is added, this is the only way to hide an element + m_Image.style.height = value != null ? 150 : 0; + } + } + + public string message + { + get { return m_Message.text; } + set + { + m_Message.text = value; + m_Message.visible = value != null; + } + } + + public string buttonText + { + get { return m_Button.text; } + set + { + m_Button.text = value; + UpdateButton(); + } + } + + public Action callback + { + get { return m_Callback; } + set + { + m_Callback = value; + UpdateButton(); + } + } + + public StatusView() + { + name = "StatusView"; + + this.StretchToParentSize(); + + m_Image = new Image() { name = "StatusIcon", visible = false, style = { height = 0f }}; + m_Message = new Label() { name = "StatusMessage", visible = false}; + m_Button = new Button(InternalCallaback) { name = "StatusButton", visible = false}; + + Add(m_Image); + Add(m_Message); + Add(m_Button); + } + + private void UpdateButton() + { + m_Button.visible = m_Button.text != null && m_Callback != null; + } + + private void InternalCallaback() + { + m_Callback(); + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs.meta new file mode 100644 index 00000000..bb634b19 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 08e9894bdf0834710b22d3c0aa245ac0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources.meta new file mode 100644 index 00000000..01229c29 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6ab6fd2b91214e8a9c8ec2224a528de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles.meta new file mode 100644 index 00000000..0ff03824 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6b1ae1e78552c459d9ce27048ff51c7f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss new file mode 100644 index 00000000..39684933 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss @@ -0,0 +1,259 @@ +.unity-button { + min-height:unset; + -unity-text-align:middle-center; + margin-left:4px; + margin-top:3px; + margin-right:4px; + margin-bottom:3px; + border-left-width:6px; + border-top-width:4px; + border-right-width:6px; + border-bottom-width:4px; + padding-left:6 px; + padding-top:2 px; + padding-right:6 px; + padding-bottom:3 px; +} + +.unity-label { + overflow: hidden; + margin-left:4px; + margin-top:2px; + margin-right:4px; + margin-bottom:2px; + padding-left:2 px; + padding-top:1 px; + min-height: unset; +} + +#HistoryContainer { + flex: 1 0 0; +} + +#HistoryItem { + flex: 1 0 0; + flex-direction: row; +} + +#HistoryDetail { + margin-top: 10px; + margin-left: 10px; + margin-bottom: 10px; + margin-right: 10px; + padding-top: 4px; + flex: 1 0 0; +} + +#Author { + -unity-font-style: bold; + font-size: 12px; +} + +#HistoryDetail > Button { + align-self: flex-end; +} + +CollabHistoryRevisionLine { + width: 40px; +} + +#RevisionLine { + flex: 1 0 0; + margin-left: 35px; + width: 1.5px; +} + +#RevisionLine.topLine { + height: 20px; + flex: 0 0 auto; +} + +#RevisionLine.absentDateLine { + background-color: #797676; +} + +.absentRevision #RevisionLine { + background-color: #797676; +} + +.currentRevision #RevisionLine.topLine { + background-color: #797676; +} + +#RevisionIndex { + position: absolute; + min-width: 23px; + -unity-text-align: middle-right; + top: 15.8px; + font-size: 9px; +} + +#RevisionIndicator { + position: absolute; + background-color: #000; + border-radius: 3px; + width: 8px; + height: 8px; + border-bottom-width: 2px; + border-left-width: 2px; + border-right-width: 2px; + border-top-width: 2px; + top: 20px; + left: 32px; +} + +.revisionLineHeader { + width: 200px; + height: 20px; +} + +.revisionLineHeader > .unity-label { + position: absolute; + margin-left: 47px; + margin-top: 3px; +} + +#PagerItems { + flex-direction: column; +} + +PagerElement > .unity-label { + margin-top: 8px; +} + +.absentRevision #RevisionIndicator { + border-color: #797676; +} + +.absentRevision #RevisionIndex { + color: #797676; +} + +.currentRevision #HistoryDetail { + border-top-width: 2px; +} + +#HistoryItem #RevisionDescription { + white-space: normal; +} + +#HistoryItem #ToggleDescription { + align-self: flex-start; + padding-top: 0; + padding-left: 0; + padding-right: 0; + padding-bottom: 2; +} + +#HistoryItem #ActionButton { + position: absolute; + right: 0; +} + +#HistoryItem #BuildIcon { + width: 16px; + height: 13px; +} + +#HistoryItemActionsTray { + flex: 1 0 0; + flex-direction: row; + align-items: center; + height: 38px; + margin-left: 10px; + margin-right: 10px; +} + +CollabHistoryDropDown { + border-top-width: 1px; +} + +CollabHistoryDropDown > .unity-label { + padding-top: 10px; + padding-bottom: 10px; +} + +CollabHistoryDropDownItem { + flex-direction: row; + border-top-width: 1px; + overflow: hidden; +} + +#FileIcon { + align-self: center; + width: 26px; + height: 26px; +} + +#FileName { + -unity-font-style: bold; + padding-bottom: 0; + margin-bottom: 0; +} + +#FileIcon { + padding-top: 0; + margin-top: 0; +} + +#ErrorBar { + height: 24px; + background-color: #ff0000; + color: #000; + font-size: 12px; +} + +#ErrorBar > #CloseButton { + position: absolute; + right: 0; + top: 0; + width: 24px; + height: 24; + color: #000; + font-size: 18px; + -unity-font-style: bold; +} + +#StatusView { + flex-direction: column; + justify-content: center; + align-self: center; + align-items: center; + flex: 1 0 0; +} + +#StatusView > #StatusIcon { + width: 115px; + height: 150px; +} + +#StatusView > #StatusMessage { + font-size: 22px; + width: 230px; + white-space: normal; + -unity-text-align: middle-center; +} + +#StatusView > #StatusButton { + font-size: 12px; + margin-top: 20px; + background-image: none; + width: 108px; + height: 29px; +} + +BuildStatusButton.unity-button { + flex-direction: row; + align-self: flex-end; + align-items: center; + margin-right: 10px; + padding-left:unset; + padding-top:unset; + padding-right:unset; + padding-bottom:unset; +} + +BuildStatusButton.unity-button .unity-label { + padding-left: 2px; +} + diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss.meta new file mode 100644 index 00000000..035b6621 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3a2d94c8977984b67984caeff9fa666e +ScriptedImporter: + fileIDToRecycleName: + 11400000: stylesheet + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss new file mode 100644 index 00000000..de436f89 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss @@ -0,0 +1,86 @@ +#HistoryContainer { + background-color: #292929; +} + +.obtainedRevision #HistoryDetail { + background-color: #333; +} + +.absentRevision #HistoryDetail { + background-color: #595959; +} + +#StatusView { + background-color: #292929; +} + +#StatusView > #StatusMessage { + color: #959995; +} + +BuildStatusButton.unity-button { + color: #B4B4B4; + background-image: resource("Builtin Skins/DarkSkin/Images/btn.png"); +} + +BuildStatusButton.unity-button:hover { + color: #FFF; +} + +BuildStatusButton.unity-button:hover:active { + background-image: resource("Builtin Skins/DarkSkin/Images/btn act.png"); +} + +BuildStatusButton.unity-button:checked { + color: #F0F0F0; + background-image: resource("Builtin Skins/DarkSkin/Images/btn on.png"); +} + +BuildStatusButton.unity-button:hover:checked { + color: #FFF; +} + +BuildStatusButton.unity-button:hover:active:checked { + background-image: resource("Builtin Skins/DarkSkin/Images/btn onact.png"); +} + +BuildStatusButton.unity-button:focus:checked { + background-image: resource("Builtin Skins/DarkSkin/Images/btn on focus.png"); +} + +CollabHistoryDropDown { + border-color: #292929; +} + +CollabHistoryDropDownItem { + border-color: #292929; +} + +#RevisionLine.obtainedDateLine { + background-color: #0cb4cc; +} + +.obtainedRevision #RevisionLine { + background-color: #0cb4cc; +} + +#RevisionIndex { + color: #0cb4cc; +} + +#RevisionIndicator { + border-color: #0cb4cc; +} + +.currentRevision #RevisionIndicator { + background-color: #0cb4cc; +} + +.currentRevision #HistoryDetail { + border-color: #0cb4cc; +} + +#StatusView > #StatusButton { + background-color: #0cb4cc; + border-color: #0cb4cc; +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss.meta new file mode 100644 index 00000000..35a7d097 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 70d4d75a2877243758b0750cbc75b6eb +ScriptedImporter: + fileIDToRecycleName: + 11400000: stylesheet + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss new file mode 100644 index 00000000..3f9b85f3 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss @@ -0,0 +1,86 @@ +#HistoryContainer { + background-color: #a2a2a2; +} + +.obtainedRevision #HistoryDetail { + background-color: #c2c2c2; +} + +.absentRevision #HistoryDetail { + background-color: #dedede; +} + +#StatusView { + background-color: #a2a2a3; +} + +#StatusView > #StatusMessage { + color: #000; +} + +BuildStatusButton.unity-button { + color: #111; + background-image: resource("Builtin Skins/LightSkin/Images/btn.png"); +} + +BuildStatusButton.unity-button:hover { + color: #000; +} + +BuildStatusButton.unity-button:hover:active { + background-image: resource("Builtin Skins/LightSkin/Images/btn act.png"); +} + +BuildStatusButton.unity-button:checked { + color: #F0F0F0; + background-image: resource("Builtin Skins/LightSkin/Images/btn on.png"); +} + +BuildStatusButton.unity-button:hover:checked { + color: #000; +} + +BuildStatusButton.unity-button:hover:active:checked { + background-image: resource("Builtin Skins/LightSkin/Images/btn onact.png"); +} + +BuildStatusButton.unity-button:focus:checked { + background-image: resource("Builtin Skins/LightSkin/Images/btn on focus.png"); +} + +CollabHistoryDropDown { + border-color: #a2a2a2; +} + +CollabHistoryDropDownItem { + border-color: #a2a2a2; +} + +#RevisionLine.obtainedDateLine { + background-color: #018d98; +} + +.obtainedRevision #RevisionLine { + background-color: #018d98; +} + +#RevisionIndex { + color: #018d98; +} + +#RevisionIndicator { + border-color: #018d98; +} + +.currentRevision #RevisionIndicator { + background-color: #018d98; +} + +.currentRevision #HistoryDetail { + border-color: #018d98; +} + +#StatusView > #StatusButton { + background-color: #018d98; + border-color: #018d98; +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss.meta new file mode 100644 index 00000000..28c860e5 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b52bde26a83564960bcb90217f72b910 +ScriptedImporter: + fileIDToRecycleName: + 11400000: stylesheet + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef new file mode 100644 index 00000000..66511e1d --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef @@ -0,0 +1,7 @@ +{ + "name": "Unity.CollabProxy.Editor", + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef.meta new file mode 100644 index 00000000..03ebeca0 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 645165c8169474bfbbeb8fb0bcfd26f5 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md b/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md new file mode 100644 index 00000000..31bde4e4 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md @@ -0,0 +1,31 @@ +**Unity Companion Package License v1.0 ("_License_")** + +Copyright © 2017 Unity Technologies ApS ("**_Unity_**") + +Unity hereby grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available with this License ("**_Software_**"), subject to the following terms and conditions: + +1. *Unity Companion Use Only*. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity development engine software license ("**_Engine License_**"). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted. + +1. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way. + +1. *Ownership & Grant Back to You*. + + 3.1. You own your content. In this License, "derivative works" means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content. + + 3.2. Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity. + + 3.3. You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License. + +1. *Trademarks*. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates ("**_Trademarks_**"). Descriptive uses of Trademarks are permitted; see, for example, Unity’s Branding Usage Guidelines at [https://unity3d.com/public-relations/brand](https://unity3d.com/public-relations/brand). + +1. *Notices & Third-Party Rights*. This License, including the copyright notice above, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity "third-party notices" or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms. + +1. *DISCLAIMER, LIMITATION OF LIABILITY*. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +1. *USE IS ACCEPTANCE and License Versions*. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License. + +1. *Use in Compliance with Law and Termination*. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License. + +1. *Severability*. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect. + +1. *Governing Law and Venue*. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License ("**_Dispute_**"). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute. diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md.meta new file mode 100644 index 00000000..30f5c3a6 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c754112a02f354a6696fa4f2b99e95a5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md b/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md new file mode 100644 index 00000000..5cfbd88a --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md @@ -0,0 +1,16 @@ +# Collab Proxy UPM Package +This is the packaged version of Collab, currently limited to containing the History and Toolbar windows, along with supporting classes. + +## Development +Check this repository out in your {$PROJECT}/Packages/ folder, under the name com.unity.collab-proxy. The classes will be built by Unity. + +## Testing +In order to run the tests, you will need to add this project to the testables key in your manifest.json - once you have done this, the tests will be picked up by the Unity Test Runner window. + +## Building +You may build this project using msbuild. The commands to do so can be seen under .gitlab-ci.yml. + +## Deploying +Gitlab will automatically build your project when you deploy. You can download the resulting artifact, which will be a dll, and place it in your Editor/bin/ folder. Open the package in Unity to generate the meta files, and then you will be able to publish. + +We're currently looking into a way to avoid this manual process. diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md.meta new file mode 100644 index 00000000..b3ad9937 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ac281230df7b14becb40b3c479f1b429 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests.meta new file mode 100644 index 00000000..f43ddd35 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1369382d2c5e64dc5b2ec0b6b0a94531 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor.meta new file mode 100644 index 00000000..b80cefdb --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4506ac79f5b274cb1b249ed7f4abfb9a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs new file mode 100644 index 00000000..ba79a204 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs @@ -0,0 +1,583 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor.Collaboration; +using UnityEngine.TestTools; +using NUnit.Framework; + +namespace UnityEditor.Collaboration.Tests +{ + [TestFixture] + internal class HistoryTests + { + private TestHistoryWindow _window; + private TestRevisionsService _service; + private CollabHistoryPresenter _presenter; + + [SetUp] + public void SetUp() + { + _window = new TestHistoryWindow(); + _service = new TestRevisionsService(); + _presenter = new CollabHistoryPresenter(_window, new CollabHistoryItemFactory(), _service); + } + + [TearDown] + public void TearDown() + { + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__PropagatesRevisionResult() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(authorName: "authorName", comment: "comment", revisionID: "revisionID"), + } + }; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual("revisionID", item.id); + Assert.AreEqual("authorName", item.authorName); + Assert.AreEqual("comment", item.comment); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__RevisionNumberingIsInOrder() + { + _service.result = new RevisionsResult() + { + RevisionsInRepo = 4, + Revisions = new List() + { + new Revision(revisionID: "0"), + new Revision(revisionID: "1"), + new Revision(revisionID: "2"), + new Revision(revisionID: "3"), + } + }; + + _presenter.OnUpdatePage(0); + var items = _window.items.ToArray(); + + Assert.AreEqual(4, items[0].index); + Assert.AreEqual(3, items[1].index); + Assert.AreEqual(2, items[2].index); + Assert.AreEqual(1, items[3].index); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__RevisionNumberingChangesForMorePages() + { + _service.result = new RevisionsResult() + { + RevisionsInRepo = 12, + Revisions = new List() + { + new Revision(revisionID: "0"), + new Revision(revisionID: "1"), + new Revision(revisionID: "2"), + new Revision(revisionID: "3"), + new Revision(revisionID: "4"), + } + }; + + _presenter.OnUpdatePage(1); + var items = _window.items.ToArray(); + + Assert.AreEqual(12, items[0].index); + Assert.AreEqual(11, items[1].index); + Assert.AreEqual(10, items[2].index); + Assert.AreEqual(9, items[3].index); + Assert.AreEqual(8, items[4].index); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__ObtainedIsCalculated() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(isObtained: false), + new Revision(isObtained: true), + } + }; + + _presenter.OnUpdatePage(0); + var items = _window.items.ToArray(); + + Assert.IsFalse(items[0].obtained); + Assert.IsTrue(items[1].obtained); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__CurrentIsCalculated() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "1"), + new Revision(revisionID: "2"), + new Revision(revisionID: "3"), + } + }; + _service.tipRevision = "2"; + + _presenter.OnUpdatePage(0); + var items = _window.items.ToArray(); + + Assert.AreEqual(false, items[0].current); + Assert.AreEqual(true, items[1].current); + Assert.AreEqual(false, items[2].current); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__InProgressIsCalculated() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "1"), + new Revision(revisionID: "2"), + new Revision(revisionID: "3"), + } + }; + _window.inProgressRevision = "2"; + + _presenter.OnUpdatePage(0); + var items = _window.items.ToArray(); + + Assert.IsFalse(items[0].inProgress); + Assert.IsTrue(items[1].inProgress); + Assert.IsFalse(items[2].inProgress); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__EnabledIsCalculated() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0"), + } + }; + _window.revisionActionsEnabled = true; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(true, item.enabled); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__DisabledIsCalculated() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0"), + } + }; + _window.revisionActionsEnabled = false; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(false, item.enabled); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasNoneWhenNotTip() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "1"), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = false; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.None, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateTipHasNoneWhenEnabled() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0"), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = true; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.None, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasConfigureWhenTip() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0"), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = false; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.Configure, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasConfigureWhenZeroBuildStatus() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0"), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = false; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.Configure, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasNoneWhenZeroBuildStatuses() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0"), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = true; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.None, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasSuccessWhenCompleteAndSucceeded() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision + ( + revisionID: "0", + buildStatuses: new CloudBuildStatus[1] + { + new CloudBuildStatus(complete: true, success: true), + } + ), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = true; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.Success, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasInProgress() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision + ( + revisionID: "0", + buildStatuses: new CloudBuildStatus[1] + { + new CloudBuildStatus(complete: false), + } + ), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = true; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.InProgress, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasFailure() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision + ( + revisionID: "0", + buildStatuses: new CloudBuildStatus[1] + { + new CloudBuildStatus(complete: true, success: false), + } + ), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = true; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.Failed, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasFailureWhenAnyBuildsFail() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision + ( + revisionID: "0", + buildStatuses: new CloudBuildStatus[3] + { + new CloudBuildStatus(complete: true, success: false), + new CloudBuildStatus(complete: true, success: false), + new CloudBuildStatus(complete: true, success: true), + } + ), + } + }; + _service.tipRevision = "0"; + _presenter.BuildServiceEnabled = true; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(BuildState.Failed, item.buildState); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__ChangesPropagateThrough() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0", entries: GenerateChangeActions(3)), + } + }; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + var changes = item.changes.ToList(); + + Assert.AreEqual("Path0", changes[0].path); + Assert.AreEqual("Path1", changes[1].path); + Assert.AreEqual("Path2", changes[2].path); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__ChangesTotalIsCalculated() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0", entries: GenerateChangeActions(3)), + } + }; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(3, item.changes.Count); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__ChangesTruncatedIsCalculated() + { + for (var i = 0; i < 20; i++) + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(revisionID: "0", entries: GenerateChangeActions(i)), + } + }; + + _presenter.OnUpdatePage(0); + var item = _window.items.First(); + + Assert.AreEqual(i > 10, item.changesTruncated); + } + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__OnlyKeeps10ChangeActions() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision(authorName: "Test", author: "test", entries: GenerateChangeActions(12)), + } + }; + + _presenter.OnUpdatePage(1); + var item = _window.items.First(); + + Assert.AreEqual(10, item.changes.Count); + Assert.AreEqual(12, item.changesTotal); + Assert.AreEqual(true, item.changesTruncated); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__DeduplicatesMetaFiles() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision + ( + authorName: "Test", + author: "test", + revisionID: "", + entries: new ChangeAction[2] + { + new ChangeAction(path: "Path1", action: "Action1"), + new ChangeAction(path: "Path1.meta", action: "Action1"), + } + ), + } + }; + + _presenter.OnUpdatePage(1); + var item = _window.items.First(); + + Assert.AreEqual(1, item.changes.Count); + Assert.AreEqual(1, item.changesTotal); + Assert.AreEqual("Path1", item.changes.First().path); + } + + [Test] + public void CollabHistoryPresenter_OnUpdatePage__FolderMetaFilesAreCounted() + { + _service.result = new RevisionsResult() + { + Revisions = new List() + { + new Revision + ( + authorName: "Test", + author: "test", + entries: new ChangeAction[1] + { + new ChangeAction(path: "Folder1.meta", action: "Action1"), + } + ), + } + }; + + _presenter.OnUpdatePage(1); + var item = _window.items.First(); + + Assert.AreEqual(1, item.changes.Count); + Assert.AreEqual(1, item.changesTotal); + Assert.AreEqual("Folder1", item.changes.First().path); + } + + private static ChangeAction[] GenerateChangeActions(int count) + { + var entries = new ChangeAction[count]; + for (var i = 0; i < count; i++) + entries[i] = new ChangeAction(path: "Path" + i, action: "Action" + i); + return entries; + } + } + + internal class TestRevisionsService : IRevisionsService + { + public RevisionsResult result; + public event RevisionsDelegate FetchRevisionsCallback; + + public string tipRevision { get; set; } + public string currentUser { get; set; } + + public void GetRevisions(int offset, int count) + { + if(FetchRevisionsCallback != null) + { + FetchRevisionsCallback(result); + } + } + } + + internal class TestHistoryWindow : ICollabHistoryWindow + { + public IEnumerable items; + + public bool revisionActionsEnabled { get; set; } + public int itemsPerPage { get; set; } + public string errMessage { get; set; } + public string inProgressRevision { get; set; } + public PageChangeAction OnPageChangeAction { get; set; } + public RevisionAction OnGoBackAction { get; set; } + public RevisionAction OnUpdateAction { get; set; } + public RevisionAction OnRestoreAction { get; set; } + public ShowBuildAction OnShowBuildAction { get; set; } + public Action OnShowServicesAction { get; set; } + + public void UpdateState(HistoryState state, bool force) + { + } + + public void UpdateRevisions(IEnumerable items, string tip, int totalRevisions, int currPage) + { + this.items = items; + } + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs.meta new file mode 100644 index 00000000..d648a7ff --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 23a56a19774ed42b6b65646af08a003c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef new file mode 100644 index 00000000..3467a9ed --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef @@ -0,0 +1,13 @@ +{ + "name": "Unity.CollabProxy.EditorTests", + "references": [ + "Unity.CollabProxy.Editor" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta new file mode 100644 index 00000000..57db5c7d --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 782de34c17796430ba8d0ceddb60944e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json b/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json new file mode 100644 index 00000000..473c7821 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json @@ -0,0 +1,21 @@ +{ + "name": "com.unity.collab-proxy", + "displayName": "Unity Collaborate", + "version": "1.2.15", + "unity": "2018.3", + "description": "Collaborate is a simple way for teams to save, share, and sync their Unity project", + "keywords": [ + "collab", + "collaborate", + "teams", + "team", + "cloud", + "backup" + ], + "dependencies": {}, + "repository": { + "type": "git", + "url": "https://gitlab.cds.internal.unity3d.com/upm-packages/cloud-services/collab-proxy.git", + "revision": "95a78b0bc11f99338fc2bd037a817aa69d199b56" + } +} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json.meta new file mode 100644 index 00000000..c52d0c60 --- /dev/null +++ b/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 57b0c806ba25b48aa8a6ecb3345a4a9b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/CHANGELOG.md b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/CHANGELOG.md new file mode 100644 index 00000000..951b9b8d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/CHANGELOG.md @@ -0,0 +1,55 @@ +# Changelog + +## [1.0.2] - 2019-03-18 + +### Changed +- Fixed issue with population of Syncvar variable on a class derived from a networkbehaviour base class (case 1066429) +- Fixed issue with IsDynamic not working on .net 3.5 profile (use something else)] +- Fixed file lock error when building under certain conditions (case 1115492) + +## [1.0.1] - 2019-02-14 + +### Changed +- Disabled warnings around the usage of the 'new' keyword in the NetworkTransform, it's needed sometimes but can trigger when building (likely because of stripping) and the warning messed with CI/automation + +## [1.0.0] - 2019-02-13 + +### Changed +- Only updating version to 1.0.0 to reflect the status of the package + +## [0.2.6-preview] - 2019-02-13 + +### Changed +- Got rid of all warnings generated when the package is built, so it's CI/automation friendly +- Readme updated + +## [0.2.5-preview] - 2019-01-29 + +### Changed +- Fixed Syncvar variable update issue. Modify both the writing and reading syncvar data as per channel. (Fixed cases 1110031, 1111442 and 1117258) + +## [0.2.4-preview] - 2019-01-11 + +### Changed +- Fixed issue with assembly dependencies not being found by the weaver during certain conditions (like when doing full reimport). + +### Added +- Added API documentation, migrated from unity source repo, only some formatting changes, text itself unchanged. + +## [0.2.3-preview] - 2018-12-17 + +### This is the first release of the *Unity Multiplayer HLAPI \*. + +Initial release of the Unity Multiplayer HLAPI (or UNet HLAPI) moved into a package. This will +work with Unity 2019.1.0a12 and onwards. + +This was previously an extension DLL but the layout has been moved from the extension style to a package format. Also all +parts which existed in the Unity engine (native code) have been moved out and utilize public API instead. Mostly +this involved +- Update bump is now created with a hidden game object, instead of registering in the player loop internally +- Domain reloads are detected with public APIs +- Weaver invocation (used for code generation) registers with the compiliation pipeline API and receives callbacks + every time compilation finishes so it can parse the DLLs. +- Profiler panel functionality was made possible by making some internal APIs puplic for now. + +Also, some runtime tests have been moved to the package as playmode tests. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/CHANGELOG.md.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/CHANGELOG.md.meta new file mode 100644 index 00000000..a9e0682a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4934372d458534eeaa15fa44bbbc16b2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Documentation~/com.unity.multiplayer-hlapi.md b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Documentation~/com.unity.multiplayer-hlapi.md new file mode 100644 index 00000000..fa96251f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Documentation~/com.unity.multiplayer-hlapi.md @@ -0,0 +1,9 @@ +**_Unity High Level Multiplayer API_** + +See the manual section in the [Unity website manual](https://docs.unity3d.com/Manual/UNetUsingHLAPI.html). + +## Document revision history + +|Date|Reason| +|---|---| +|Nov 13, 2018|Document created. Matches package version 0.2.1-preview.| diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor.meta new file mode 100644 index 00000000..98fa0e9b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6fec6bc4565a94166a28b8a52654d031 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkAnimatorEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkAnimatorEditor.cs new file mode 100644 index 00000000..e5383bdf --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkAnimatorEditor.cs @@ -0,0 +1,97 @@ +#if ENABLE_UNET +using System; +using UnityEditor.Animations; +using UnityEngine; +using UnityEngine.Networking; + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkAnimator), true)] + [CanEditMultipleObjects] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkAnimatorEditor : Editor + { + NetworkAnimator m_AnimSync; + [NonSerialized] bool m_Initialized; + + SerializedProperty m_AnimatorProperty; + GUIContent m_AnimatorLabel; + + void Init() + { + if (m_Initialized) + return; + + m_Initialized = true; + m_AnimSync = target as NetworkAnimator; + + m_AnimatorProperty = serializedObject.FindProperty("m_Animator"); + m_AnimatorLabel = TextUtility.TextContent("Animator", "The Animator component to synchronize."); + } + + public override void OnInspectorGUI() + { + Init(); + serializedObject.Update(); + DrawControls(); + serializedObject.ApplyModifiedProperties(); + } + + void DrawControls() + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_AnimatorProperty, m_AnimatorLabel); + if (EditorGUI.EndChangeCheck()) + { + m_AnimSync.ResetParameterOptions(); + } + + if (m_AnimSync.animator == null) + return; + + var controller = m_AnimSync.animator.runtimeAnimatorController as AnimatorController; + if (controller != null) + { + var showWarning = false; + EditorGUI.indentLevel += 1; + int i = 0; + + foreach (var p in controller.parameters) + { + if (i >= 32) + { + showWarning = true; + break; + } + + bool oldSend = m_AnimSync.GetParameterAutoSend(i); + bool send = EditorGUILayout.Toggle(p.name, oldSend); + if (send != oldSend) + { + m_AnimSync.SetParameterAutoSend(i, send); + EditorUtility.SetDirty(target); + } + i += 1; + } + + if (showWarning) + { + EditorGUILayout.HelpBox("NetworkAnimator can only select between the first 32 parameters in a mecanim controller", MessageType.Warning); + } + + EditorGUI.indentLevel -= 1; + } + + if (Application.isPlaying) + { + EditorGUILayout.Separator(); + if (m_AnimSync.param0 != "") EditorGUILayout.LabelField("Param 0", m_AnimSync.param0); + if (m_AnimSync.param1 != "") EditorGUILayout.LabelField("Param 1", m_AnimSync.param1); + if (m_AnimSync.param2 != "") EditorGUILayout.LabelField("Param 2", m_AnimSync.param2); + if (m_AnimSync.param3 != "") EditorGUILayout.LabelField("Param 3", m_AnimSync.param3); + if (m_AnimSync.param4 != "") EditorGUILayout.LabelField("Param 4", m_AnimSync.param4); + } + } + } +} +#endif diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkAnimatorEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkAnimatorEditor.cs.meta new file mode 100644 index 00000000..8217589d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkAnimatorEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c7110bb053444273811c0b36a1278a3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkBehaviourInspector.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkBehaviourInspector.cs new file mode 100644 index 00000000..064d7c0b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkBehaviourInspector.cs @@ -0,0 +1,177 @@ +#if ENABLE_UNET +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using UnityEngine; +using UnityEngine.Networking; + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkBehaviour), true)] + [CanEditMultipleObjects] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkBehaviourInspector : Editor + { + bool m_Initialized; + protected List m_SyncVarNames = new List(); + Type m_ScriptClass; + bool m_HasOnSerialize; + bool[] m_ShowSyncLists; + + GUIContent m_SyncVarIndicatorContent; + protected GUIContent m_NetworkChannelLabel; + protected GUIContent m_NetworkSendIntervalLabel; + + internal virtual bool hideScriptField + { + get { return false; } + } + + void Init(MonoScript script) + { + m_Initialized = true; + m_ScriptClass = script.GetClass(); + + m_SyncVarIndicatorContent = TextUtility.TextContent("SyncVar", "This variable has been marked with the [SyncVar] attribute."); + m_NetworkChannelLabel = TextUtility.TextContent("Network Channel", "QoS channel used for updates. Use the [NetworkSettings] class attribute to change this."); + m_NetworkSendIntervalLabel = TextUtility.TextContent("Network Send Interval", "Maximum update rate in seconds. Use the [NetworkSettings] class attribute to change this, or implement GetNetworkSendInterval"); + + foreach (var field in m_ScriptClass.GetFields(BindingFlags.Public | BindingFlags.Instance)) + { + Attribute[] fieldMarkers = (Attribute[])field.GetCustomAttributes(typeof(SyncVarAttribute), true); + if (fieldMarkers.Length > 0) + { + m_SyncVarNames.Add(field.Name); + } + } + var meth = script.GetClass().GetMethod("OnSerialize"); + if (meth != null) + { + if (meth.DeclaringType != typeof(NetworkBehaviour)) + { + m_HasOnSerialize = true; + } + } + + int numSyncLists = 0; + foreach (var f in serializedObject.targetObject.GetType().GetFields()) + { + if (f.FieldType.BaseType != null && f.FieldType.BaseType.Name.Contains("SyncList")) + { + numSyncLists += 1; + } + } + if (numSyncLists > 0) + { + m_ShowSyncLists = new bool[numSyncLists]; + } + } + + public override void OnInspectorGUI() + { + if (!m_Initialized) + { + serializedObject.Update(); + SerializedProperty scriptProperty = serializedObject.FindProperty("m_Script"); + if (scriptProperty == null) + return; + + MonoScript targetScript = scriptProperty.objectReferenceValue as MonoScript; + Init(targetScript); + } + + EditorGUI.BeginChangeCheck(); + serializedObject.Update(); + + // Loop through properties and create one field (including children) for each top level property. + SerializedProperty property = serializedObject.GetIterator(); + bool expanded = true; + while (property.NextVisible(expanded)) + { + bool isSyncVar = m_SyncVarNames.Contains(property.name); + if (property.propertyType == SerializedPropertyType.ObjectReference) + { + if (property.name == "m_Script") + { + if (hideScriptField) + { + continue; + } + + EditorGUI.BeginDisabledGroup(true); + } + + EditorGUILayout.PropertyField(property, true); + + if (isSyncVar) + { + GUILayout.Label(m_SyncVarIndicatorContent, EditorStyles.miniLabel, GUILayout.Width(EditorStyles.miniLabel.CalcSize(m_SyncVarIndicatorContent).x)); + } + + if (property.name == "m_Script") + { + EditorGUI.EndDisabledGroup(); + } + } + else + { + EditorGUILayout.BeginHorizontal(); + + EditorGUILayout.PropertyField(property, true); + + if (isSyncVar) + { + GUILayout.Label(m_SyncVarIndicatorContent, EditorStyles.miniLabel, GUILayout.Width(EditorStyles.miniLabel.CalcSize(m_SyncVarIndicatorContent).x)); + } + + EditorGUILayout.EndHorizontal(); + } + expanded = false; + } + serializedObject.ApplyModifiedProperties(); + EditorGUI.EndChangeCheck(); + + // find SyncLists.. they are not properties. + int syncListIndex = 0; + foreach (var field in serializedObject.targetObject.GetType().GetFields()) + { + if (field.FieldType.BaseType != null && field.FieldType.BaseType.Name.Contains("SyncList")) + { + m_ShowSyncLists[syncListIndex] = EditorGUILayout.Foldout(m_ShowSyncLists[syncListIndex], "SyncList " + field.Name + " [" + field.FieldType.Name + "]"); + if (m_ShowSyncLists[syncListIndex]) + { + EditorGUI.indentLevel += 1; + var synclist = field.GetValue(serializedObject.targetObject) as IEnumerable; + if (synclist != null) + { + int index = 0; + var enu = synclist.GetEnumerator(); + while (enu.MoveNext()) + { + if (enu.Current != null) + { + EditorGUILayout.LabelField("Item:" + index, enu.Current.ToString()); + } + index += 1; + } + } + EditorGUI.indentLevel -= 1; + } + syncListIndex += 1; + } + } + + if (m_HasOnSerialize) + { + var beh = target as NetworkBehaviour; + if (beh != null) + { + EditorGUILayout.LabelField(m_NetworkChannelLabel, new GUIContent(beh.GetNetworkChannel().ToString())); + EditorGUILayout.LabelField(m_NetworkSendIntervalLabel, new GUIContent(beh.GetNetworkSendInterval().ToString())); + } + } + } + } +} //namespace +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkBehaviourInspector.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkBehaviourInspector.cs.meta new file mode 100644 index 00000000..e7b08185 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkBehaviourInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7c7439bd85e8d458ba24515fd20067a3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkDiscoveryEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkDiscoveryEditor.cs new file mode 100644 index 00000000..bd2e6f3a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkDiscoveryEditor.cs @@ -0,0 +1,134 @@ +#if ENABLE_UNET +using System; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkDiscovery), true)] + [CanEditMultipleObjects] + public class NetworkDiscoveryEditor : Editor + { + bool m_Initialized; + NetworkDiscovery m_Discovery; + + SerializedProperty m_BroadcastPortProperty; + SerializedProperty m_BroadcastKeyProperty; + SerializedProperty m_BroadcastVersionProperty; + SerializedProperty m_BroadcastSubVersionProperty; + SerializedProperty m_BroadcastIntervalProperty; + SerializedProperty m_UseNetworkManagerProperty; + SerializedProperty m_BroadcastDataProperty; + SerializedProperty m_ShowGUIProperty; + SerializedProperty m_OffsetXProperty; + SerializedProperty m_OffsetYProperty; + + GUIContent m_BroadcastPortLabel; + GUIContent m_BroadcastKeyLabel; + GUIContent m_BroadcastVersionLabel; + GUIContent m_BroadcastSubVersionLabel; + GUIContent m_BroadcastIntervalLabel; + GUIContent m_UseNetworkManagerLabel; + GUIContent m_BroadcastDataLabel; + GUIContent m_ShowGUILabel; + GUIContent m_OffsetXLabel; + GUIContent m_OffsetYLabel; + + void Init() + { + if (m_Initialized) + { + if (m_BroadcastPortProperty == null) + { + // need to re-init + } + else + { + return; + } + } + + m_Initialized = true; + m_Discovery = target as NetworkDiscovery; + + m_BroadcastPortProperty = serializedObject.FindProperty("m_BroadcastPort"); + m_BroadcastKeyProperty = serializedObject.FindProperty("m_BroadcastKey"); + m_BroadcastVersionProperty = serializedObject.FindProperty("m_BroadcastVersion"); + m_BroadcastSubVersionProperty = serializedObject.FindProperty("m_BroadcastSubVersion"); + m_BroadcastIntervalProperty = serializedObject.FindProperty("m_BroadcastInterval"); + m_UseNetworkManagerProperty = serializedObject.FindProperty("m_UseNetworkManager"); + m_BroadcastDataProperty = serializedObject.FindProperty("m_BroadcastData"); + m_ShowGUIProperty = serializedObject.FindProperty("m_ShowGUI"); + m_OffsetXProperty = serializedObject.FindProperty("m_OffsetX"); + m_OffsetYProperty = serializedObject.FindProperty("m_OffsetY"); + + m_BroadcastPortLabel = TextUtility.TextContent("Broadcast Port", "The network port to broadcast to, and listen on."); + m_BroadcastKeyLabel = TextUtility.TextContent("Broadcast Key", "The key to broadcast. This key typically identifies the application."); + m_BroadcastVersionLabel = TextUtility.TextContent("Broadcast Version", "The version of the application to broadcast. This is used to match versions of the same application."); + m_BroadcastSubVersionLabel = TextUtility.TextContent("Broadcast SubVersion", "The sub-version of the application to broadcast."); + m_BroadcastIntervalLabel = TextUtility.TextContent("Broadcast Interval", "How often in milliseconds to broadcast when running as a server."); + m_UseNetworkManagerLabel = TextUtility.TextContent("Use NetworkManager", "Broadcast information from the NetworkManager, and auto-join matching games using the NetworkManager."); + m_BroadcastDataLabel = TextUtility.TextContent("Broadcast Data", "The data to broadcast when not using the NetworkManager"); + m_ShowGUILabel = TextUtility.TextContent("Show GUI", "Enable to draw the default broadcast control UI."); + m_OffsetXLabel = TextUtility.TextContent("Offset X", "The horizonal offset of the GUI."); + m_OffsetYLabel = TextUtility.TextContent("Offset Y", "The vertical offset of the GUI."); + } + + public override void OnInspectorGUI() + { + Init(); + serializedObject.Update(); + DrawControls(); + serializedObject.ApplyModifiedProperties(); + } + + void DrawControls() + { + if (m_Discovery == null) + return; + + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.PropertyField(m_BroadcastPortProperty, m_BroadcastPortLabel); + + EditorGUILayout.PropertyField(m_BroadcastKeyProperty, m_BroadcastKeyLabel); + EditorGUILayout.PropertyField(m_BroadcastVersionProperty, m_BroadcastVersionLabel); + EditorGUILayout.PropertyField(m_BroadcastSubVersionProperty, m_BroadcastSubVersionLabel); + EditorGUILayout.PropertyField(m_BroadcastIntervalProperty, m_BroadcastIntervalLabel); + EditorGUILayout.PropertyField(m_UseNetworkManagerProperty, m_UseNetworkManagerLabel); + if (m_Discovery.useNetworkManager) + { + EditorGUILayout.LabelField(m_BroadcastDataLabel, new GUIContent(m_BroadcastDataProperty.stringValue)); + } + else + { + EditorGUILayout.PropertyField(m_BroadcastDataProperty, m_BroadcastDataLabel); + } + + EditorGUILayout.Separator(); + EditorGUILayout.PropertyField(m_ShowGUIProperty, m_ShowGUILabel); + if (m_Discovery.showGUI) + { + EditorGUILayout.PropertyField(m_OffsetXProperty, m_OffsetXLabel); + EditorGUILayout.PropertyField(m_OffsetYProperty, m_OffsetYLabel); + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + } + + if (Application.isPlaying) + { + EditorGUILayout.Separator(); + EditorGUILayout.LabelField("hostId", m_Discovery.hostId.ToString()); + EditorGUILayout.LabelField("running", m_Discovery.running.ToString()); + EditorGUILayout.LabelField("isServer", m_Discovery.isServer.ToString()); + EditorGUILayout.LabelField("isClient", m_Discovery.isClient.ToString()); + } + } + } +} +#pragma warning restore 618 +#endif diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkDiscoveryEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkDiscoveryEditor.cs.meta new file mode 100644 index 00000000..4ec8cb66 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkDiscoveryEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4689220f6c1dd4502b5b0584c573c798 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkIdentityEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkIdentityEditor.cs new file mode 100644 index 00000000..5fb517e7 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkIdentityEditor.cs @@ -0,0 +1,122 @@ +#if ENABLE_UNET +using System; +using UnityEngine; +using UnityEngine.Networking; + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkIdentity), true)] + [CanEditMultipleObjects] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkIdentityEditor : Editor + { + SerializedProperty m_ServerOnlyProperty; + SerializedProperty m_LocalPlayerAuthorityProperty; + + GUIContent m_ServerOnlyLabel; + GUIContent m_LocalPlayerAuthorityLabel; + GUIContent m_SpawnLabel; + + NetworkIdentity m_NetworkIdentity; + bool m_Initialized; + bool m_ShowObservers; + + void Init() + { + if (m_Initialized) + { + return; + } + m_Initialized = true; + m_NetworkIdentity = target as NetworkIdentity; + + m_ServerOnlyProperty = serializedObject.FindProperty("m_ServerOnly"); + m_LocalPlayerAuthorityProperty = serializedObject.FindProperty("m_LocalPlayerAuthority"); + + m_ServerOnlyLabel = TextUtility.TextContent("Server Only", "True if the object should only exist on the server."); + m_LocalPlayerAuthorityLabel = TextUtility.TextContent("Local Player Authority", "True if this object will be controlled by a player on a client."); + m_SpawnLabel = TextUtility.TextContent("Spawn Object", "This causes an unspawned server object to be spawned on clients"); + } + + public override void OnInspectorGUI() + { + if (m_ServerOnlyProperty == null) + { + m_Initialized = false; + } + + Init(); + + serializedObject.Update(); + + if (m_ServerOnlyProperty.boolValue) + { + EditorGUILayout.PropertyField(m_ServerOnlyProperty, m_ServerOnlyLabel); + EditorGUILayout.LabelField("Local Player Authority cannot be set for server-only objects"); + } + else if (m_LocalPlayerAuthorityProperty.boolValue) + { + EditorGUILayout.LabelField("Server Only cannot be set for Local Player Authority objects"); + EditorGUILayout.PropertyField(m_LocalPlayerAuthorityProperty, m_LocalPlayerAuthorityLabel); + } + else + { + EditorGUILayout.PropertyField(m_ServerOnlyProperty, m_ServerOnlyLabel); + EditorGUILayout.PropertyField(m_LocalPlayerAuthorityProperty, m_LocalPlayerAuthorityLabel); + } + + serializedObject.ApplyModifiedProperties(); + + if (!Application.isPlaying) + { + return; + } + + // Runtime actions below here + + EditorGUILayout.Separator(); + + if (m_NetworkIdentity.observers != null && m_NetworkIdentity.observers.Count > 0) + { + m_ShowObservers = EditorGUILayout.Foldout(m_ShowObservers, "Observers"); + if (m_ShowObservers) + { + EditorGUI.indentLevel += 1; + foreach (var o in m_NetworkIdentity.observers) + { + GameObject obj = null; + foreach (var p in o.playerControllers) + { + if (p != null) + { + obj = p.gameObject; + break; + } + } + if (obj) + EditorGUILayout.ObjectField("Connection " + o.connectionId, obj, typeof(GameObject), false); + else + EditorGUILayout.TextField("Connection " + o.connectionId); + } + EditorGUI.indentLevel -= 1; + } + } + + if (PrefabUtility.IsPartOfPrefabAsset(m_NetworkIdentity.gameObject)) + return; + + if (m_NetworkIdentity.gameObject.activeSelf && m_NetworkIdentity.netId.IsEmpty() && NetworkServer.active) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(m_SpawnLabel); + if (GUILayout.Toggle(false, "Spawn", EditorStyles.miniButtonLeft)) + { + NetworkServer.Spawn(m_NetworkIdentity.gameObject); + EditorUtility.SetDirty(target); // preview window STILL doens't update immediately.. + } + EditorGUILayout.EndHorizontal(); + } + } + } +} +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkIdentityEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkIdentityEditor.cs.meta new file mode 100644 index 00000000..4165ee2a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkIdentityEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ec556959db264433cb2759dfe67d48d4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkInformationPreview.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkInformationPreview.cs new file mode 100644 index 00000000..08453082 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkInformationPreview.cs @@ -0,0 +1,286 @@ +#if ENABLE_UNET +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Networking; +using UnityObject = UnityEngine.Object; + +#pragma warning disable 618 +namespace UnityEditor.Networking +{ + [CustomPreview(typeof(GameObject))] + class NetworkInformationPreview : ObjectPreview + { + class NetworkIdentityInfo + { + public GUIContent name; + public GUIContent value; + } + + class NetworkBehaviourInfo + { + // This is here just so we can check if it's enabled/disabled + public NetworkBehaviour behaviour; + public GUIContent name; + } + + class Styles + { + public GUIStyle labelStyle = new GUIStyle(EditorStyles.label); + public GUIStyle componentName = new GUIStyle(EditorStyles.boldLabel); + public GUIStyle disabledName = new GUIStyle(EditorStyles.miniLabel); + + public Styles() + { + Color fontColor = new Color(0.7f, 0.7f, 0.7f); + labelStyle.padding.right += 20; + labelStyle.normal.textColor = fontColor; + labelStyle.active.textColor = fontColor; + labelStyle.focused.textColor = fontColor; + labelStyle.hover.textColor = fontColor; + labelStyle.onNormal.textColor = fontColor; + labelStyle.onActive.textColor = fontColor; + labelStyle.onFocused.textColor = fontColor; + labelStyle.onHover.textColor = fontColor; + + componentName.normal.textColor = fontColor; + componentName.active.textColor = fontColor; + componentName.focused.textColor = fontColor; + componentName.hover.textColor = fontColor; + componentName.onNormal.textColor = fontColor; + componentName.onActive.textColor = fontColor; + componentName.onFocused.textColor = fontColor; + componentName.onHover.textColor = fontColor; + + disabledName.normal.textColor = fontColor; + disabledName.active.textColor = fontColor; + disabledName.focused.textColor = fontColor; + disabledName.hover.textColor = fontColor; + disabledName.onNormal.textColor = fontColor; + disabledName.onActive.textColor = fontColor; + disabledName.onFocused.textColor = fontColor; + disabledName.onHover.textColor = fontColor; + } + } + + List m_Info; + List m_Behaviours; + NetworkIdentity m_Identity; + GUIContent m_Title; + Styles m_Styles = new Styles(); + + public override void Initialize(UnityObject[] targets) + { + base.Initialize(targets); + GetNetworkInformation(target as GameObject); + } + + public override GUIContent GetPreviewTitle() + { + if (m_Title == null) + { + m_Title = TextUtility.TextContent("Network Information"); + } + return m_Title; + } + + public override bool HasPreviewGUI() + { + return m_Info != null && m_Info.Count > 0; + } + + public override void OnPreviewGUI(Rect r, GUIStyle background) + { + if (Event.current.type != EventType.Repaint) + return; + + if (m_Info == null || m_Info.Count == 0) + return; + + if (m_Styles == null) + m_Styles = new Styles(); + + // Get required label size for the names of the information values we're going to show + // There are two columns, one with label for the name of the info and the next for the value + Vector2 maxNameLabelSize = new Vector2(140, 16); + Vector2 maxValueLabelSize = GetMaxNameLabelSize(); + + //Apply padding + RectOffset previewPadding = new RectOffset(-5, -5, -5, -5); + r = previewPadding.Add(r); + + //Centering + float initialX = r.x + 10; + float initialY = r.y + 10; + + Rect labelRect = new Rect(initialX, initialY, maxNameLabelSize.x, maxNameLabelSize.y); + Rect idLabelRect = new Rect(maxNameLabelSize.x, initialY, maxValueLabelSize.x, maxValueLabelSize.y); + + foreach (var info in m_Info) + { + GUI.Label(labelRect, info.name, m_Styles.labelStyle); + GUI.Label(idLabelRect, info.value, m_Styles.componentName); + labelRect.y += labelRect.height; + labelRect.x = initialX; + idLabelRect.y += idLabelRect.height; + } + + // Show behaviours list in a different way than the name/value pairs above + float lastY = labelRect.y; + if (m_Behaviours != null && m_Behaviours.Count > 0) + { + Vector2 maxBehaviourLabelSize = GetMaxBehaviourLabelSize(); + Rect behaviourRect = new Rect(initialX, labelRect.y + 10, maxBehaviourLabelSize.x, maxBehaviourLabelSize.y); + + GUI.Label(behaviourRect, TextUtility.TextContent("Network Behaviours"), m_Styles.labelStyle); + behaviourRect.x += 20; // indent names + behaviourRect.y += behaviourRect.height; + + foreach (var info in m_Behaviours) + { + if (info.behaviour == null) + { + // could be the case in the editor after existing play mode. + continue; + } + if (info.behaviour.enabled) + { + GUI.Label(behaviourRect, info.name, m_Styles.componentName); + } + else + { + GUI.Label(behaviourRect, info.name, m_Styles.disabledName); + } + behaviourRect.y += behaviourRect.height; + lastY = behaviourRect.y; + } + + if (m_Identity.observers != null && m_Identity.observers.Count > 0) + { + Rect observerRect = new Rect(initialX, lastY + 10, 200, 20); + + GUI.Label(observerRect, TextUtility.TextContent("Network observers"), m_Styles.labelStyle); + observerRect.x += 20; // indent names + observerRect.y += observerRect.height; + + foreach (var info in m_Identity.observers) + { + GUI.Label(observerRect, info.address + ":" + info.connectionId, m_Styles.componentName); + observerRect.y += observerRect.height; + lastY = observerRect.y; + } + } + + if (m_Identity.clientAuthorityOwner != null) + { + Rect ownerRect = new Rect(initialX, lastY + 10, 400, 20); + GUI.Label(ownerRect, TextUtility.TextContent("Client Authority: " + m_Identity.clientAuthorityOwner), m_Styles.labelStyle); + } + } + } + + // Get the maximum size used by the value of information items + Vector2 GetMaxNameLabelSize() + { + Vector2 maxLabelSize = Vector2.zero; + foreach (var info in m_Info) + { + Vector2 labelSize = m_Styles.labelStyle.CalcSize(info.value); + if (maxLabelSize.x < labelSize.x) + { + maxLabelSize.x = labelSize.x; + } + if (maxLabelSize.y < labelSize.y) + { + maxLabelSize.y = labelSize.y; + } + } + return maxLabelSize; + } + + Vector2 GetMaxBehaviourLabelSize() + { + Vector2 maxLabelSize = Vector2.zero; + foreach (var behaviour in m_Behaviours) + { + Vector2 labelSize = m_Styles.labelStyle.CalcSize(behaviour.name); + if (maxLabelSize.x < labelSize.x) + { + maxLabelSize.x = labelSize.x; + } + if (maxLabelSize.y < labelSize.y) + { + maxLabelSize.y = labelSize.y; + } + } + return maxLabelSize; + } + + void GetNetworkInformation(GameObject gameObject) + { + m_Identity = gameObject.GetComponent(); + if (m_Identity != null) + { + m_Info = new List(); + + m_Info.Add(GetAssetId()); + m_Info.Add(GetString("Scene ID", m_Identity.sceneId.ToString())); + + if (!Application.isPlaying) + { + return; + } + + m_Info.Add(GetString("Network ID", m_Identity.netId.ToString())); + + m_Info.Add(GetString("Player Controller ID", m_Identity.playerControllerId.ToString())); + + m_Info.Add(GetBoolean("Is Client", m_Identity.isClient)); + m_Info.Add(GetBoolean("Is Server", m_Identity.isServer)); + m_Info.Add(GetBoolean("Has Authority", m_Identity.hasAuthority)); + m_Info.Add(GetBoolean("Is Local Player", m_Identity.isLocalPlayer)); + + NetworkBehaviour[] behaviours = gameObject.GetComponents(); + if (behaviours.Length > 0) + { + m_Behaviours = new List(); + foreach (var behaviour in behaviours) + { + NetworkBehaviourInfo info = new NetworkBehaviourInfo(); + info.name = new GUIContent(behaviour.GetType().FullName); + info.behaviour = behaviour; + m_Behaviours.Add(info); + } + } + } + } + + NetworkIdentityInfo GetAssetId() + { + string assetId = m_Identity.assetId.ToString(); + if (string.IsNullOrEmpty(assetId)) + { + assetId = ""; + } + return GetString("Asset ID", assetId); + } + + static NetworkIdentityInfo GetString(string name, string value) + { + NetworkIdentityInfo info = new NetworkIdentityInfo(); + info.name = new GUIContent(name); + info.value = new GUIContent(value); + return info; + } + + static NetworkIdentityInfo GetBoolean(string name, bool value) + { + NetworkIdentityInfo info = new NetworkIdentityInfo(); + info.name = new GUIContent(name); + info.value = new GUIContent((value ? "Yes" : "No")); + return info; + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkInformationPreview.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkInformationPreview.cs.meta new file mode 100644 index 00000000..2e39a6eb --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkInformationPreview.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f044d3015b5742c983d4c747fb44959 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkLobbyManagerEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkLobbyManagerEditor.cs new file mode 100644 index 00000000..0643cc0d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkLobbyManagerEditor.cs @@ -0,0 +1,257 @@ +#if ENABLE_UNET +using System; +using UnityEngine; +using UnityEngine.Networking; +using UnityObject = UnityEngine.Object; + +#pragma warning disable 618 +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkLobbyManager), true)] + [CanEditMultipleObjects] + class NetworkLobbyManagerEditor : NetworkManagerEditor + { + SerializedProperty m_ShowLobbyGUIProperty; + SerializedProperty m_MaxPlayersProperty; + SerializedProperty m_MaxPlayersPerConnectionProperty; + SerializedProperty m_MinPlayersProperty; + SerializedProperty m_LobbyPlayerPrefabProperty; + SerializedProperty m_GamePlayerPrefabProperty; + + GUIContent m_LobbySceneLabel; + GUIContent m_PlaySceneLabel; + + GUIContent m_MaxPlayersLabel; + GUIContent m_MaxPlayersPerConnectionLabel; + GUIContent m_MinPlayersLabel; + + GUIContent m_ShowLobbyGUILabel; + GUIContent m_LobbyPlayerPrefabLabel; + GUIContent m_GamePlayerPrefabLabel; + + bool ShowSlots; + + void InitLobby() + { + if (!m_Initialized) + { + m_LobbySceneLabel = TextUtility.TextContent("Lobby Scene", "The scene loaded for the lobby."); + m_PlaySceneLabel = TextUtility.TextContent("Play Scene", "The scene loaded to play the game."); + + m_MaxPlayersLabel = TextUtility.TextContent("Max Players", "The maximum number of players allowed in the lobby."); + m_MaxPlayersPerConnectionLabel = TextUtility.TextContent("Max Players Per Connection", "The maximum number of players that each connection/client can have in the lobby. Defaults to 1."); + m_MinPlayersLabel = TextUtility.TextContent("Minimum Players", "The minimum number of players required to be ready for the game to start. If this is zero then the game can start with any number of players."); + + m_ShowLobbyGUILabel = TextUtility.TextContent("Show Lobby GUI", "Enable to display the default lobby UI."); + m_LobbyPlayerPrefabLabel = TextUtility.TextContent("Lobby Player Prefab", "The prefab to use for a player in the Lobby Scene."); + m_GamePlayerPrefabLabel = TextUtility.TextContent("Game Player Prefab", "The prefab to use for a player in the Play Scene."); + + m_ShowLobbyGUIProperty = serializedObject.FindProperty("m_ShowLobbyGUI"); + m_MaxPlayersProperty = serializedObject.FindProperty("m_MaxPlayers"); + m_MaxPlayersPerConnectionProperty = serializedObject.FindProperty("m_MaxPlayersPerConnection"); + m_MinPlayersProperty = serializedObject.FindProperty("m_MinPlayers"); + m_LobbyPlayerPrefabProperty = serializedObject.FindProperty("m_LobbyPlayerPrefab"); + m_GamePlayerPrefabProperty = serializedObject.FindProperty("m_GamePlayerPrefab"); + + var lobby = target as NetworkLobbyManager; + if (lobby == null) + return; + + if (lobby.lobbyScene != "") + { + var offlineObj = GetSceneObject(lobby.lobbyScene); + if (offlineObj == null) + { + Debug.LogWarning("LobbyScene '" + lobby.lobbyScene + "' not found. You must repopulate the LobbyScene slot of the NetworkLobbyManager"); + lobby.lobbyScene = ""; + } + } + + + if (lobby.playScene != "") + { + var onlineObj = GetSceneObject(lobby.playScene); + if (onlineObj == null) + { + Debug.LogWarning("PlayScene '" + lobby.playScene + "' not found. You must repopulate the PlayScene slot of the NetworkLobbyManager"); + lobby.playScene = ""; + } + } + } + + Init(); + } + + public override void OnInspectorGUI() + { + if (m_DontDestroyOnLoadProperty == null || m_DontDestroyOnLoadLabel == null) + m_Initialized = false; + + InitLobby(); + + var lobby = target as NetworkLobbyManager; + if (lobby == null) + return; + + serializedObject.Update(); + EditorGUILayout.PropertyField(m_DontDestroyOnLoadProperty, m_DontDestroyOnLoadLabel); + EditorGUILayout.PropertyField(m_RunInBackgroundProperty , m_RunInBackgroundLabel); + + if (EditorGUILayout.PropertyField(m_LogLevelProperty)) + { + LogFilter.currentLogLevel = (int)m_NetworkManager.logLevel; + } + + ShowLobbyScenes(); + + EditorGUILayout.PropertyField(m_ShowLobbyGUIProperty, m_ShowLobbyGUILabel); + EditorGUILayout.PropertyField(m_MaxPlayersProperty, m_MaxPlayersLabel); + EditorGUILayout.PropertyField(m_MaxPlayersPerConnectionProperty, m_MaxPlayersPerConnectionLabel); + EditorGUILayout.PropertyField(m_MinPlayersProperty, m_MinPlayersLabel); + EditorGUILayout.PropertyField(m_LobbyPlayerPrefabProperty, m_LobbyPlayerPrefabLabel); + + EditorGUI.BeginChangeCheck(); + var newGamPlayer = EditorGUILayout.ObjectField(m_GamePlayerPrefabLabel, lobby.gamePlayerPrefab, typeof(NetworkIdentity), false); + if (EditorGUI.EndChangeCheck()) + { + if (newGamPlayer == null) + { + m_GamePlayerPrefabProperty.objectReferenceValue = null; + } + else + { + var newGamePlayerIdentity = newGamPlayer as NetworkIdentity; + if (newGamePlayerIdentity != null) + { + if (newGamePlayerIdentity.gameObject != lobby.gamePlayerPrefab) + { + m_GamePlayerPrefabProperty.objectReferenceValue = newGamePlayerIdentity.gameObject; + } + } + } + } + + EditorGUILayout.Separator(); + + ShowNetworkInfo(); + ShowSpawnInfo(); + ShowConfigInfo(); + ShowSimulatorInfo(); + serializedObject.ApplyModifiedProperties(); + + ShowDerivedProperties(typeof(NetworkLobbyManager), typeof(NetworkManager)); + + if (!Application.isPlaying) + return; + + EditorGUILayout.Separator(); + ShowLobbySlots(); + } + + protected void ShowLobbySlots() + { + var lobby = target as NetworkLobbyManager; + if (lobby == null) + return; + + ShowSlots = EditorGUILayout.Foldout(ShowSlots, "LobbySlots"); + if (ShowSlots) + { + EditorGUI.indentLevel += 1; + foreach (var slot in lobby.lobbySlots) + { + if (slot == null) + continue; + + EditorGUILayout.ObjectField("Slot " + slot.slot, slot.gameObject, typeof(UnityObject), true); + } + EditorGUI.indentLevel -= 1; + } + } + + void SetLobbyScene(NetworkLobbyManager lobby, string sceneName) + { + var prop = serializedObject.FindProperty("m_LobbyScene"); + prop.stringValue = sceneName; + + var offlineProp = serializedObject.FindProperty("m_OfflineScene"); + offlineProp.stringValue = sceneName; + + EditorUtility.SetDirty(lobby); + } + + void SetPlayScene(NetworkLobbyManager lobby, string sceneName) + { + var prop = serializedObject.FindProperty("m_PlayScene"); + prop.stringValue = sceneName; + + var onlineProp = serializedObject.FindProperty("m_OnlineScene"); + onlineProp.stringValue = ""; // this is set to empty deliberately to prevent base class functionality from interfering with LobbyManager + + EditorUtility.SetDirty(lobby); + } + + protected void ShowLobbyScenes() + { + var lobby = target as NetworkLobbyManager; + if (lobby == null) + return; + + var offlineObj = GetSceneObject(lobby.lobbyScene); + + EditorGUI.BeginChangeCheck(); + var newOfflineScene = EditorGUILayout.ObjectField(m_LobbySceneLabel, offlineObj, typeof(SceneAsset), false); + if (EditorGUI.EndChangeCheck()) + { + if (newOfflineScene == null) + { + SetLobbyScene(lobby, ""); + } + else + { + if (newOfflineScene.name != lobby.offlineScene) + { + var sceneObj = GetSceneObject(newOfflineScene.name); + if (sceneObj == null) + { + Debug.LogWarning("The scene " + newOfflineScene.name + " cannot be used. To use this scene add it to the build settings for the project"); + } + else + { + SetLobbyScene(lobby, newOfflineScene.name); + } + } + } + } + + var onlineObj = GetSceneObject(lobby.playScene); + + EditorGUI.BeginChangeCheck(); + var newOnlineScene = EditorGUILayout.ObjectField(m_PlaySceneLabel, onlineObj, typeof(SceneAsset), false); + if (EditorGUI.EndChangeCheck()) + { + if (newOnlineScene == null) + { + SetPlayScene(lobby, ""); + } + else + { + if (newOnlineScene.name != m_NetworkManager.onlineScene) + { + var sceneObj = GetSceneObject(newOnlineScene.name); + if (sceneObj == null) + { + Debug.LogWarning("The scene " + newOnlineScene.name + " cannot be used. To use this scene add it to the build settings for the project"); + } + else + { + SetPlayScene(lobby, newOnlineScene.name); + } + } + } + } + } + } +} +#pragma warning restore 618 +#endif // ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkLobbyManagerEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkLobbyManagerEditor.cs.meta new file mode 100644 index 00000000..38911020 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkLobbyManagerEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7f04db83f27ce4e688c989f2f240b013 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerEditor.cs new file mode 100644 index 00000000..95d650fb --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerEditor.cs @@ -0,0 +1,641 @@ +#if ENABLE_UNET +using System; +using System.IO; +using System.Reflection; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Networking; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkManager), true)] + [CanEditMultipleObjects] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkManagerEditor : Editor + { + protected SerializedProperty m_DontDestroyOnLoadProperty; + protected SerializedProperty m_RunInBackgroundProperty; + protected SerializedProperty m_ScriptCRCCheckProperty; + SerializedProperty m_NetworkAddressProperty; + + SerializedProperty m_NetworkPortProperty; + SerializedProperty m_ServerBindToIPProperty; + SerializedProperty m_ServerBindAddressProperty; + SerializedProperty m_MaxDelayProperty; + SerializedProperty m_MaxBufferedPacketsProperty; + SerializedProperty m_AllowFragmentationProperty; + + protected SerializedProperty m_LogLevelProperty; + SerializedProperty m_MatchHostProperty; + SerializedProperty m_MatchPortProperty; + SerializedProperty m_MatchNameProperty; + SerializedProperty m_MatchSizeProperty; + + SerializedProperty m_PlayerPrefabProperty; + SerializedProperty m_AutoCreatePlayerProperty; + SerializedProperty m_PlayerSpawnMethodProperty; + SerializedProperty m_SpawnListProperty; + + SerializedProperty m_CustomConfigProperty; + + SerializedProperty m_UseWebSocketsProperty; + SerializedProperty m_UseSimulatorProperty; + SerializedProperty m_SimulatedLatencyProperty; + SerializedProperty m_PacketLossPercentageProperty; + + SerializedProperty m_ChannelListProperty; + ReorderableList m_ChannelList; + + GUIContent m_ShowNetworkLabel; + GUIContent m_ShowSpawnLabel; + + GUIContent m_OfflineSceneLabel; + GUIContent m_OnlineSceneLabel; + protected GUIContent m_DontDestroyOnLoadLabel; + protected GUIContent m_RunInBackgroundLabel; + protected GUIContent m_ScriptCRCCheckLabel; + + GUIContent m_MaxConnectionsLabel; + GUIContent m_MinUpdateTimeoutLabel; + GUIContent m_ConnectTimeoutLabel; + GUIContent m_DisconnectTimeoutLabel; + GUIContent m_PingTimeoutLabel; + + GUIContent m_ThreadAwakeTimeoutLabel; + GUIContent m_ReactorModelLabel; + GUIContent m_ReactorMaximumReceivedMessagesLabel; + GUIContent m_ReactorMaximumSentMessagesLabel; + + GUIContent m_MaxBufferedPacketsLabel; + GUIContent m_AllowFragmentationLabel; + GUIContent m_UseWebSocketsLabel; + GUIContent m_UseSimulatorLabel; + GUIContent m_LatencyLabel; + GUIContent m_PacketLossPercentageLabel; + GUIContent m_MatchHostLabel; + GUIContent m_MatchPortLabel; + GUIContent m_MatchNameLabel; + GUIContent m_MatchSizeLabel; + + GUIContent m_NetworkAddressLabel; + GUIContent m_NetworkPortLabel; + GUIContent m_ServerBindToIPLabel; + GUIContent m_ServerBindAddressLabel; + GUIContent m_MaxDelayLabel; + + GUIContent m_PlayerPrefabLabel; + GUIContent m_AutoCreatePlayerLabel; + GUIContent m_PlayerSpawnMethodLabel; + + GUIContent m_AdvancedConfigurationLabel; + + ReorderableList m_SpawnList; + + protected bool m_Initialized; + + protected NetworkManager m_NetworkManager; + + protected void Init() + { + if (m_Initialized) + { + return; + } + m_Initialized = true; + m_NetworkManager = target as NetworkManager; + + m_ShowNetworkLabel = TextUtility.TextContent("Network Info", "Network host settings"); + m_ShowSpawnLabel = TextUtility.TextContent("Spawn Info", "Registered spawnable objects"); + m_OfflineSceneLabel = TextUtility.TextContent("Offline Scene", "The scene loaded when the network goes offline (disconnected from server)"); + m_OnlineSceneLabel = TextUtility.TextContent("Online Scene", "The scene loaded when the network comes online (connected to server)"); + m_DontDestroyOnLoadLabel = TextUtility.TextContent("Don't Destroy on Load", "Enable to persist the NetworkManager across scene changes."); + m_RunInBackgroundLabel = TextUtility.TextContent("Run in Background", "Enable to ensure that the application runs when it does not have focus.\n\nThis is required when testing multiple instances on a single machine, but not recommended for shipping on mobile platforms."); + m_ScriptCRCCheckLabel = TextUtility.TextContent("Script CRC Check", "Enable to cause a CRC check between server and client that ensures the NetworkBehaviour scripts match.\n\nThis may not be appropriate in some cases, such as when the client and server are different Unity projects."); + + m_MaxConnectionsLabel = TextUtility.TextContent("Max Connections", "Maximum number of network connections"); + m_MinUpdateTimeoutLabel = TextUtility.TextContent("Min Update Timeout", "Minimum time network thread waits for events"); + m_ConnectTimeoutLabel = TextUtility.TextContent("Connect Timeout", "Time to wait for timeout on connecting"); + m_DisconnectTimeoutLabel = TextUtility.TextContent("Disconnect Timeout", "Time to wait for detecting disconnect"); + m_PingTimeoutLabel = TextUtility.TextContent("Ping Timeout", "Time to wait for ping messages"); + + m_ThreadAwakeTimeoutLabel = TextUtility.TextContent("Thread Awake Timeout", "The minimum time period when system will check if there are any messages for send (or receive)."); + m_ReactorModelLabel = TextUtility.TextContent("Reactor Model", "Defines reactor model for the network library"); + m_ReactorMaximumReceivedMessagesLabel = TextUtility.TextContent("Reactor Max Recv Messages", "Defines maximum amount of messages in the receive queue"); + m_ReactorMaximumSentMessagesLabel = TextUtility.TextContent("Reactor Max Sent Messages", "Defines maximum message count in sent queue"); + + m_MaxBufferedPacketsLabel = TextUtility.TextContent("Max Buffered Packets", "The maximum number of packets that can be buffered by a NetworkConnection for each channel. This corresponds to the 'ChannelOption.MaxPendingBuffers' channel option."); + m_AllowFragmentationLabel = TextUtility.TextContent("Packet Fragmentation", "Enable to allow NetworkConnection instances to fragment packets that are larger than the maxPacketSize, up to a maximum size of 64K.\n\nThis can cause delays when sending large packets."); + m_UseWebSocketsLabel = TextUtility.TextContent("Use WebSockets", "This makes the server listen for connections using WebSockets. This allows WebGL clients to connect to the server."); + m_UseSimulatorLabel = TextUtility.TextContent("Use Network Simulator", "This simulates network latency and packet loss on clients. Useful for testing under internet-like conditions"); + m_LatencyLabel = TextUtility.TextContent("Simulated Average Latency", "The amount of delay in milliseconds to add to network packets"); + m_PacketLossPercentageLabel = TextUtility.TextContent("Simulated Packet Loss", "The percentage of packets that should be dropped"); + m_MatchHostLabel = TextUtility.TextContent("MatchMaker Host URI", "The hostname of the matchmaking server.\n\nThe default is mm.unet.unity3d.com, which will connect a client to the nearest data center geographically."); + m_MatchPortLabel = TextUtility.TextContent("MatchMaker Port", "The port of the matchmaking service."); + m_MatchNameLabel = TextUtility.TextContent("Match Name", "The name that will be used when creating a match in MatchMaker."); + m_MatchSizeLabel = TextUtility.TextContent("Maximum Match Size", "The maximum size for the match. This value is compared to the maximum size specified in the service configuration at multiplayer.unity3d.com and the lower of the two is enforced. It must be greater than 1. This is typically used to override the match size for various game modes."); + m_NetworkAddressLabel = TextUtility.TextContent("Network Address", "The network address currently in use."); + m_NetworkPortLabel = TextUtility.TextContent("Network Port", "The network port currently in use."); + m_ServerBindToIPLabel = TextUtility.TextContent("Server Bind to IP", "Enable to bind the server to a specific IP address."); + m_ServerBindAddressLabel = TextUtility.TextContent("Server Bind Address Label", "IP to bind the server to, when Server Bind to IP is enabled."); + m_MaxDelayLabel = TextUtility.TextContent("Max Delay", "The maximum delay before sending packets on connections."); + m_PlayerPrefabLabel = TextUtility.TextContent("Player Prefab", "The default prefab to be used to create player objects on the server."); + m_AutoCreatePlayerLabel = TextUtility.TextContent("Auto Create Player", "Enable to automatically create player objects on connect and on Scene change."); + m_PlayerSpawnMethodLabel = TextUtility.TextContent("Player Spawn Method", "How to determine which NetworkStartPosition to spawn players at, from all NetworkStartPositions in the Scene.\n\nRandom chooses a random NetworkStartPosition.\n\nRound Robin chooses the next NetworkStartPosition on a round-robin basis."); + m_AdvancedConfigurationLabel = TextUtility.TextContent("Advanced Configuration", "Enable to view and edit advanced settings."); + + // top-level properties + m_DontDestroyOnLoadProperty = serializedObject.FindProperty("m_DontDestroyOnLoad"); + m_RunInBackgroundProperty = serializedObject.FindProperty("m_RunInBackground"); + m_ScriptCRCCheckProperty = serializedObject.FindProperty("m_ScriptCRCCheck"); + m_LogLevelProperty = serializedObject.FindProperty("m_LogLevel"); + + // network foldout properties + m_NetworkAddressProperty = serializedObject.FindProperty("m_NetworkAddress"); + m_NetworkPortProperty = serializedObject.FindProperty("m_NetworkPort"); + m_ServerBindToIPProperty = serializedObject.FindProperty("m_ServerBindToIP"); + m_ServerBindAddressProperty = serializedObject.FindProperty("m_ServerBindAddress"); + m_MaxDelayProperty = serializedObject.FindProperty("m_MaxDelay"); + m_MaxBufferedPacketsProperty = serializedObject.FindProperty("m_MaxBufferedPackets"); + m_AllowFragmentationProperty = serializedObject.FindProperty("m_AllowFragmentation"); + m_MatchHostProperty = serializedObject.FindProperty("m_MatchHost"); + m_MatchPortProperty = serializedObject.FindProperty("m_MatchPort"); + m_MatchNameProperty = serializedObject.FindProperty("matchName"); + m_MatchSizeProperty = serializedObject.FindProperty("matchSize"); + + // spawn foldout properties + m_PlayerPrefabProperty = serializedObject.FindProperty("m_PlayerPrefab"); + m_AutoCreatePlayerProperty = serializedObject.FindProperty("m_AutoCreatePlayer"); + m_PlayerSpawnMethodProperty = serializedObject.FindProperty("m_PlayerSpawnMethod"); + m_SpawnListProperty = serializedObject.FindProperty("m_SpawnPrefabs"); + + m_SpawnList = new ReorderableList(serializedObject, m_SpawnListProperty); + m_SpawnList.drawHeaderCallback = DrawHeader; + m_SpawnList.drawElementCallback = DrawChild; + m_SpawnList.onReorderCallback = Changed; + m_SpawnList.onRemoveCallback = RemoveButton; + m_SpawnList.onChangedCallback = Changed; + m_SpawnList.onReorderCallback = Changed; + m_SpawnList.onAddCallback = AddButton; + m_SpawnList.elementHeight = 16; // this uses a 16x16 icon. other sizes make it stretch. + + // network configuration + m_CustomConfigProperty = serializedObject.FindProperty("m_CustomConfig"); + m_ChannelListProperty = serializedObject.FindProperty("m_Channels"); + m_ChannelList = new ReorderableList(serializedObject, m_ChannelListProperty); + m_ChannelList.drawHeaderCallback = ChannelDrawHeader; + m_ChannelList.drawElementCallback = ChannelDrawChild; + m_ChannelList.onReorderCallback = ChannelChanged; + m_ChannelList.onAddDropdownCallback = ChannelAddButton; + m_ChannelList.onRemoveCallback = ChannelRemoveButton; + m_ChannelList.onChangedCallback = ChannelChanged; + m_ChannelList.onReorderCallback = ChannelChanged; + m_ChannelList.onAddCallback = ChannelChanged; + + // Network Simulator + m_UseWebSocketsProperty = serializedObject.FindProperty("m_UseWebSockets"); + m_UseSimulatorProperty = serializedObject.FindProperty("m_UseSimulator"); + m_SimulatedLatencyProperty = serializedObject.FindProperty("m_SimulatedLatency"); + m_PacketLossPercentageProperty = serializedObject.FindProperty("m_PacketLossPercentage"); + } + + static void ShowPropertySuffix(GUIContent content, SerializedProperty prop, string suffix) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(prop, content); + GUILayout.Label(suffix, EditorStyles.miniLabel, GUILayout.Width(64)); + EditorGUILayout.EndHorizontal(); + } + + protected void ShowSimulatorInfo() + { + EditorGUILayout.PropertyField(m_UseSimulatorProperty, m_UseSimulatorLabel); + + if (m_UseSimulatorProperty.boolValue) + { + EditorGUI.indentLevel += 1; + + if (Application.isPlaying && m_NetworkManager.client != null) + { + // read only at runtime + EditorGUILayout.LabelField(m_LatencyLabel, new GUIContent(m_NetworkManager.simulatedLatency + " milliseconds")); + EditorGUILayout.LabelField(m_PacketLossPercentageLabel, new GUIContent(m_NetworkManager.packetLossPercentage + "%")); + } + else + { + // Latency + int oldLatency = m_NetworkManager.simulatedLatency; + EditorGUILayout.BeginHorizontal(); + int newLatency = EditorGUILayout.IntSlider(m_LatencyLabel, oldLatency, 1, 400); + GUILayout.Label("millsec", EditorStyles.miniLabel, GUILayout.Width(64)); + EditorGUILayout.EndHorizontal(); + if (newLatency != oldLatency) + { + m_SimulatedLatencyProperty.intValue = newLatency; + } + + // Packet Loss + float oldPacketLoss = m_NetworkManager.packetLossPercentage; + EditorGUILayout.BeginHorizontal(); + float newPacketLoss = EditorGUILayout.Slider(m_PacketLossPercentageLabel, oldPacketLoss, 0f, 20f); + GUILayout.Label("%", EditorStyles.miniLabel, GUILayout.Width(64)); + EditorGUILayout.EndHorizontal(); + if (newPacketLoss != oldPacketLoss) + { + m_PacketLossPercentageProperty.floatValue = newPacketLoss; + } + } + + EditorGUI.indentLevel -= 1; + } + } + + protected void ShowConfigInfo() + { + bool oldCustomConfig = m_NetworkManager.customConfig; + EditorGUILayout.PropertyField(m_CustomConfigProperty, m_AdvancedConfigurationLabel); + + // Populate default channels first time a custom config is created. + if (m_CustomConfigProperty.boolValue) + { + if (!oldCustomConfig) + { + if (m_NetworkManager.channels.Count == 0) + { + m_NetworkManager.channels.Add(QosType.ReliableSequenced); + m_NetworkManager.channels.Add(QosType.Unreliable); + m_NetworkManager.customConfig = true; + m_CustomConfigProperty.serializedObject.Update(); + m_ChannelList.serializedProperty.serializedObject.Update(); + } + } + } + + if (m_NetworkManager.customConfig) + { + EditorGUI.indentLevel += 1; + var maxConn = serializedObject.FindProperty("m_MaxConnections"); + ShowPropertySuffix(m_MaxConnectionsLabel, maxConn, "connections"); + + m_ChannelList.DoLayoutList(); + + maxConn.isExpanded = EditorGUILayout.Foldout(maxConn.isExpanded, "Timeouts"); + if (maxConn.isExpanded) + { + EditorGUI.indentLevel += 1; + var minUpdateTimeout = serializedObject.FindProperty("m_ConnectionConfig.m_MinUpdateTimeout"); + var connectTimeout = serializedObject.FindProperty("m_ConnectionConfig.m_ConnectTimeout"); + var disconnectTimeout = serializedObject.FindProperty("m_ConnectionConfig.m_DisconnectTimeout"); + var pingTimeout = serializedObject.FindProperty("m_ConnectionConfig.m_PingTimeout"); + + ShowPropertySuffix(m_MinUpdateTimeoutLabel, minUpdateTimeout, "millisec"); + ShowPropertySuffix(m_ConnectTimeoutLabel, connectTimeout, "millisec"); + ShowPropertySuffix(m_DisconnectTimeoutLabel, disconnectTimeout, "millisec"); + ShowPropertySuffix(m_PingTimeoutLabel, pingTimeout, "millisec"); + EditorGUI.indentLevel -= 1; + } + + var threadAwakeTimeout = serializedObject.FindProperty("m_GlobalConfig.m_ThreadAwakeTimeout"); + threadAwakeTimeout.isExpanded = EditorGUILayout.Foldout(threadAwakeTimeout.isExpanded, "Global Config"); + if (threadAwakeTimeout.isExpanded) + { + EditorGUI.indentLevel += 1; + var reactorModel = serializedObject.FindProperty("m_GlobalConfig.m_ReactorModel"); + var reactorMaximumReceivedMessages = serializedObject.FindProperty("m_GlobalConfig.m_ReactorMaximumReceivedMessages"); + var reactorMaximumSentMessages = serializedObject.FindProperty("m_GlobalConfig.m_ReactorMaximumSentMessages"); + + ShowPropertySuffix(m_ThreadAwakeTimeoutLabel, threadAwakeTimeout, "millisec"); + EditorGUILayout.PropertyField(reactorModel, m_ReactorModelLabel); + ShowPropertySuffix(m_ReactorMaximumReceivedMessagesLabel, reactorMaximumReceivedMessages, "messages"); + ShowPropertySuffix(m_ReactorMaximumSentMessagesLabel, reactorMaximumSentMessages, "messages"); + EditorGUI.indentLevel -= 1; + } + + EditorGUI.indentLevel -= 1; + } + } + + protected void ShowSpawnInfo() + { + m_PlayerPrefabProperty.isExpanded = EditorGUILayout.Foldout(m_PlayerPrefabProperty.isExpanded, m_ShowSpawnLabel); + if (!m_PlayerPrefabProperty.isExpanded) + { + return; + } + + EditorGUI.indentLevel += 1; + + //The NetworkLobbyManager doesnt use playerPrefab, it has its own player prefab slots, so dont show this + if (!typeof(NetworkLobbyManager).IsAssignableFrom(m_NetworkManager.GetType())) + { + EditorGUILayout.PropertyField(m_PlayerPrefabProperty, m_PlayerPrefabLabel); + } + + EditorGUILayout.PropertyField(m_AutoCreatePlayerProperty, m_AutoCreatePlayerLabel); + EditorGUILayout.PropertyField(m_PlayerSpawnMethodProperty, m_PlayerSpawnMethodLabel); + + + EditorGUI.BeginChangeCheck(); + m_SpawnList.DoLayoutList(); + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + } + + EditorGUI.indentLevel -= 1; + } + + protected SceneAsset GetSceneObject(string sceneObjectName) + { + if (string.IsNullOrEmpty(sceneObjectName)) + { + return null; + } + + foreach (var editorScene in EditorBuildSettings.scenes) + { + var sceneNameWithoutExtension = Path.GetFileNameWithoutExtension(editorScene.path); + if (sceneNameWithoutExtension == sceneObjectName) + { + return AssetDatabase.LoadAssetAtPath(editorScene.path, typeof(SceneAsset)) as SceneAsset; + } + } + if (LogFilter.logWarn) { Debug.LogWarning("Scene [" + sceneObjectName + "] cannot be used with networking. Add this scene to the 'Scenes in the Build' in build settings."); } + return null; + } + + protected void ShowNetworkInfo() + { + m_NetworkAddressProperty.isExpanded = EditorGUILayout.Foldout(m_NetworkAddressProperty.isExpanded, m_ShowNetworkLabel); + if (!m_NetworkAddressProperty.isExpanded) + { + return; + } + EditorGUI.indentLevel += 1; + + if (EditorGUILayout.PropertyField(m_UseWebSocketsProperty, m_UseWebSocketsLabel)) + { + NetworkServer.useWebSockets = m_NetworkManager.useWebSockets; + } + + EditorGUILayout.PropertyField(m_NetworkAddressProperty, m_NetworkAddressLabel); + EditorGUILayout.PropertyField(m_NetworkPortProperty, m_NetworkPortLabel); + EditorGUILayout.PropertyField(m_ServerBindToIPProperty, m_ServerBindToIPLabel); + if (m_NetworkManager.serverBindToIP) + { + EditorGUI.indentLevel += 1; + EditorGUILayout.PropertyField(m_ServerBindAddressProperty, m_ServerBindAddressLabel); + EditorGUI.indentLevel -= 1; + } + EditorGUILayout.PropertyField(m_ScriptCRCCheckProperty, m_ScriptCRCCheckLabel); + EditorGUILayout.PropertyField(m_MaxDelayProperty, m_MaxDelayLabel); + EditorGUILayout.PropertyField(m_MaxBufferedPacketsProperty, m_MaxBufferedPacketsLabel); + EditorGUILayout.PropertyField(m_AllowFragmentationProperty, m_AllowFragmentationLabel); + EditorGUILayout.PropertyField(m_MatchHostProperty, m_MatchHostLabel); + EditorGUILayout.PropertyField(m_MatchPortProperty, m_MatchPortLabel); + EditorGUILayout.PropertyField(m_MatchNameProperty, m_MatchNameLabel); + EditorGUILayout.PropertyField(m_MatchSizeProperty, m_MatchSizeLabel); + + EditorGUI.indentLevel -= 1; + } + + protected void ShowScenes() + { + var offlineObj = GetSceneObject(m_NetworkManager.offlineScene); + var newOfflineScene = EditorGUILayout.ObjectField(m_OfflineSceneLabel, offlineObj, typeof(SceneAsset), false); + if (newOfflineScene == null) + { + var prop = serializedObject.FindProperty("m_OfflineScene"); + prop.stringValue = ""; + EditorUtility.SetDirty(target); + } + else + { + if (newOfflineScene.name != m_NetworkManager.offlineScene) + { + var sceneObj = GetSceneObject(newOfflineScene.name); + if (sceneObj == null) + { + Debug.LogWarning("The scene " + newOfflineScene.name + " cannot be used. To use this scene add it to the build settings for the project"); + } + else + { + var prop = serializedObject.FindProperty("m_OfflineScene"); + prop.stringValue = newOfflineScene.name; + EditorUtility.SetDirty(target); + } + } + } + + var onlineObj = GetSceneObject(m_NetworkManager.onlineScene); + var newOnlineScene = EditorGUILayout.ObjectField(m_OnlineSceneLabel, onlineObj, typeof(SceneAsset), false); + if (newOnlineScene == null) + { + var prop = serializedObject.FindProperty("m_OnlineScene"); + prop.stringValue = ""; + EditorUtility.SetDirty(target); + } + else + { + if (newOnlineScene.name != m_NetworkManager.onlineScene) + { + var sceneObj = GetSceneObject(newOnlineScene.name); + if (sceneObj == null) + { + Debug.LogWarning("The scene " + newOnlineScene.name + " cannot be used. To use this scene add it to the build settings for the project"); + } + else + { + var prop = serializedObject.FindProperty("m_OnlineScene"); + prop.stringValue = newOnlineScene.name; + EditorUtility.SetDirty(target); + } + } + } + } + + protected void ShowDerivedProperties(Type baseType, Type superType) + { + bool first = true; + + SerializedProperty property = serializedObject.GetIterator(); + bool expanded = true; + while (property.NextVisible(expanded)) + { + // ignore properties from base class. + var f = baseType.GetField(property.name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + var p = baseType.GetProperty(property.name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + + if (f == null && superType != null) + { + f = superType.GetField(property.name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + } + + if (p == null && superType != null) + { + p = superType.GetProperty(property.name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + } + + if (f == null && p == null) + { + if (first) + { + first = false; + EditorGUI.BeginChangeCheck(); + serializedObject.Update(); + + EditorGUILayout.Separator(); + } + EditorGUILayout.PropertyField(property, true); + expanded = false; + } + } + if (!first) + { + serializedObject.ApplyModifiedProperties(); + EditorGUI.EndChangeCheck(); + } + } + + public override void OnInspectorGUI() + { + if (m_DontDestroyOnLoadProperty == null || m_DontDestroyOnLoadLabel == null) + m_Initialized = false; + + Init(); + + serializedObject.Update(); + EditorGUILayout.PropertyField(m_DontDestroyOnLoadProperty, m_DontDestroyOnLoadLabel); + EditorGUILayout.PropertyField(m_RunInBackgroundProperty , m_RunInBackgroundLabel); + + if (EditorGUILayout.PropertyField(m_LogLevelProperty)) + { + LogFilter.currentLogLevel = (int)m_NetworkManager.logLevel; + } + + ShowScenes(); + ShowNetworkInfo(); + ShowSpawnInfo(); + ShowConfigInfo(); + ShowSimulatorInfo(); + serializedObject.ApplyModifiedProperties(); + + ShowDerivedProperties(typeof(NetworkManager), null); + } + + static void DrawHeader(Rect headerRect) + { + GUI.Label(headerRect, "Registered Spawnable Prefabs:"); + } + + internal void DrawChild(Rect r, int index, bool isActive, bool isFocused) + { + SerializedProperty prefab = m_SpawnListProperty.GetArrayElementAtIndex(index); + GameObject go = (GameObject)prefab.objectReferenceValue; + + GUIContent label; + if (go == null) + { + label = TextUtility.TextContent("Empty", "Drag a prefab with a NetworkIdentity here"); + } + else + { + var uv = go.GetComponent(); + if (uv != null) + { + label = new GUIContent(go.name, "AssetId: [" + uv.assetId + "]"); + } + else + { + label = new GUIContent(go.name, "No Network Identity"); + } + } + + var newGameObject = (GameObject)EditorGUI.ObjectField(r, label, go, typeof(GameObject), false); + + if (newGameObject != go) + { + if (newGameObject != null && !newGameObject.GetComponent()) + { + if (LogFilter.logError) { Debug.LogError("Prefab " + newGameObject + " cannot be added as spawnable as it doesn't have a NetworkIdentity."); } + return; + } + prefab.objectReferenceValue = newGameObject; + } + } + + internal void Changed(ReorderableList list) + { + EditorUtility.SetDirty(target); + } + + internal void AddButton(ReorderableList list) + { + m_SpawnListProperty.arraySize += 1; + list.index = m_SpawnListProperty.arraySize - 1; + + var obj = m_SpawnListProperty.GetArrayElementAtIndex(m_SpawnListProperty.arraySize - 1); + if (obj.objectReferenceValue != null) + obj.objectReferenceValue = null; + + m_SpawnList.index = m_SpawnList.count - 1; + + Changed(list); + } + + internal void RemoveButton(ReorderableList list) + { + m_SpawnListProperty.DeleteArrayElementAtIndex(m_SpawnList.index); + if (list.index >= m_SpawnListProperty.arraySize) + { + list.index = m_SpawnListProperty.arraySize - 1; + } + } + + // List widget functions + + static void ChannelDrawHeader(Rect headerRect) + { + GUI.Label(headerRect, "Qos Channels:"); + } + + internal void ChannelDrawChild(Rect r, int index, bool isActive, bool isFocused) + { + QosType qos = (QosType)m_ChannelListProperty.GetArrayElementAtIndex(index).enumValueIndex; + QosType newValue = (QosType)EditorGUI.EnumPopup(r, "Channel #" + index, qos); + if (newValue != qos) + { + var obj = m_ChannelListProperty.GetArrayElementAtIndex(index); + obj.enumValueIndex = (int)newValue; + } + } + + internal void ChannelChanged(ReorderableList list) + { + EditorUtility.SetDirty(target); + } + + internal void ChannelAddButton(Rect rect, ReorderableList list) + { + m_ChannelListProperty.arraySize += 1; + var obj = m_ChannelListProperty.GetArrayElementAtIndex(m_ChannelListProperty.arraySize - 1); + obj.enumValueIndex = (int)QosType.ReliableSequenced; + list.index = m_ChannelListProperty.arraySize - 1; + } + + internal void ChannelRemoveButton(ReorderableList list) + { + if (m_NetworkManager.channels.Count == 1) + { + if (LogFilter.logError) { Debug.LogError("Cannot remove channel. There must be at least one QoS channel."); } + return; + } + m_ChannelListProperty.DeleteArrayElementAtIndex(m_ChannelList.index); + if (list.index >= m_ChannelListProperty.arraySize - 1) + { + list.index = m_ChannelListProperty.arraySize - 1; + } + } + } +} +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerEditor.cs.meta new file mode 100644 index 00000000..33d2ae78 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30930285266be4ea587d2942bc4392ff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerHUDEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerHUDEditor.cs new file mode 100644 index 00000000..874a0883 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerHUDEditor.cs @@ -0,0 +1,471 @@ +#if ENABLE_UNET +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Networking; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkManagerHUD), true)] + [CanEditMultipleObjects] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkManagerHUDEditor : Editor + { + SerializedProperty m_ShowGUIProperty; + SerializedProperty m_OffsetXProperty; + SerializedProperty m_OffsetYProperty; + + protected GUIContent m_ShowNetworkLabel; + protected GUIContent m_ShowServerLabel; + protected GUIContent m_ShowServerConnectionsLabel; + protected GUIContent m_ShowServerObjectsLabel; + protected GUIContent m_ShowClientLabel; + protected GUIContent m_ShowClientObjectsLabel; + protected GUIContent m_ShowMatchMakerLabel; + protected GUIContent m_ShowControlsLabel; + protected GUIContent m_ShowRuntimeGuiLabel; + protected GUIContent m_OffsetXLabel; + protected GUIContent m_OffsetYLabel; + + bool m_ShowServer; + bool m_ShowServerConnections; + bool m_ShowServerObjects; + bool m_ShowClient; + bool m_ShowClientObjects; + bool m_ShowMatchMaker; + + bool m_ShowControls; + + bool m_Initialized; + + + NetworkManagerHUD m_ManagerHud; + NetworkManager m_Manager; + + void Init() + { + if (m_Initialized) + { + if (m_ShowGUIProperty == null) + { + // initialize again.. something got broken + } + else + { + return; + } + } + m_Initialized = true; + m_ManagerHud = target as NetworkManagerHUD; + if (m_ManagerHud != null) + { + m_Manager = m_ManagerHud.manager; + } + + m_ShowGUIProperty = serializedObject.FindProperty("showGUI"); + m_OffsetXProperty = serializedObject.FindProperty("offsetX"); + m_OffsetYProperty = serializedObject.FindProperty("offsetY"); + + m_ShowServerLabel = TextUtility.TextContent("Server Info", "Details of internal server state"); + m_ShowServerConnectionsLabel = TextUtility.TextContent("Server Connections", "List of local and remote network connections to the server"); + m_ShowServerObjectsLabel = TextUtility.TextContent("Server Objects", "Networked objects spawned by the server"); + m_ShowClientLabel = TextUtility.TextContent("Client Info", "Details of internal client state"); + m_ShowClientObjectsLabel = TextUtility.TextContent("Client Objects", "Networked objects created on the client"); + m_ShowMatchMakerLabel = TextUtility.TextContent("MatchMaker Info", "Details about the matchmaker state"); + m_ShowControlsLabel = TextUtility.TextContent("Runtime Controls", "Buttons for controlling network state at runtime"); + m_ShowRuntimeGuiLabel = TextUtility.TextContent("Show Runtime GUI", "Show the default network control GUI when the game is running"); + m_OffsetXLabel = TextUtility.TextContent("GUI Horizontal Offset", "Horizontal offset of runtime GUI"); + m_OffsetYLabel = TextUtility.TextContent("GUI Vertical Offset", "Vertical offset of runtime GUI"); + } + + List m_ShowDetailForConnections; + List m_ShowPlayersForConnections; + List m_ShowVisibleForConnections; + List m_ShowOwnedForConnections; + + void ShowServerConnections() + { + m_ShowServerConnections = EditorGUILayout.Foldout(m_ShowServerConnections, m_ShowServerConnectionsLabel); + if (m_ShowServerConnections) + { + EditorGUI.indentLevel += 1; + + // ensure arrays of bools exists and are large enough + if (m_ShowDetailForConnections == null) + { + m_ShowDetailForConnections = new List(); + m_ShowPlayersForConnections = new List(); + m_ShowVisibleForConnections = new List(); + m_ShowOwnedForConnections = new List(); + } + while (m_ShowDetailForConnections.Count < NetworkServer.connections.Count) + { + m_ShowDetailForConnections.Add(false); + m_ShowPlayersForConnections.Add(false); + m_ShowVisibleForConnections.Add(false); + m_ShowOwnedForConnections.Add(false); + } + + // all connections + int index = 0; + foreach (var con in NetworkServer.connections) + { + if (con == null) + { + index += 1; + continue; + } + + m_ShowDetailForConnections[index] = EditorGUILayout.Foldout(m_ShowDetailForConnections[index], "Conn: " + con.connectionId + " (" + con.address + ")"); + if (m_ShowDetailForConnections[index]) + { + EditorGUI.indentLevel += 1; + + m_ShowPlayersForConnections[index] = EditorGUILayout.Foldout(m_ShowPlayersForConnections[index], "Players"); + if (m_ShowPlayersForConnections[index]) + { + EditorGUI.indentLevel += 1; + foreach (var player in con.playerControllers) + { + EditorGUILayout.ObjectField("Player: " + player.playerControllerId, player.gameObject, typeof(GameObject), true); + } + EditorGUI.indentLevel -= 1; + } + + m_ShowVisibleForConnections[index] = EditorGUILayout.Foldout(m_ShowVisibleForConnections[index], "Visible Objects"); + if (m_ShowVisibleForConnections[index]) + { + EditorGUI.indentLevel += 1; + foreach (var v in con.visList) + { + EditorGUILayout.ObjectField("NetId: " + v.netId, v, typeof(NetworkIdentity), true); + } + EditorGUI.indentLevel -= 1; + } + + if (con.clientOwnedObjects != null) + { + m_ShowOwnedForConnections[index] = EditorGUILayout.Foldout(m_ShowOwnedForConnections[index], "Owned Objects"); + if (m_ShowOwnedForConnections[index]) + { + EditorGUI.indentLevel += 1; + foreach (var netId in con.clientOwnedObjects) + { + var obj = NetworkServer.FindLocalObject(netId); + EditorGUILayout.ObjectField("Owned: " + netId, obj, typeof(NetworkIdentity), true); + } + EditorGUI.indentLevel -= 1; + } + } + EditorGUI.indentLevel -= 1; + } + index += 1; + } + EditorGUI.indentLevel -= 1; + } + } + + void ShowServerObjects() + { + m_ShowServerObjects = EditorGUILayout.Foldout(m_ShowServerObjects, m_ShowServerObjectsLabel); + if (m_ShowServerObjects) + { + EditorGUI.indentLevel += 1; + + foreach (var obj in NetworkServer.objects) + { + string first = "NetId:" + obj.Key; + GameObject value = null; + if (obj.Value != null) + { + NetworkIdentity uv = obj.Value.GetComponent(); + first += " SceneId:" + uv.sceneId; + value = obj.Value.gameObject; + } + EditorGUILayout.ObjectField(first, value, typeof(GameObject), true); + } + EditorGUI.indentLevel -= 1; + } + } + + void ShowServerInfo() + { + if (!NetworkServer.active) + { + return; + } + + m_ShowServer = EditorGUILayout.Foldout(m_ShowServer, m_ShowServerLabel); + if (!m_ShowServer) + { + return; + } + + EditorGUI.indentLevel += 1; + EditorGUILayout.BeginVertical(); + ShowServerConnections(); + ShowServerObjects(); + EditorGUILayout.EndVertical(); + EditorGUI.indentLevel -= 1; + } + + void ShowClientObjects() + { + m_ShowClientObjects = EditorGUILayout.Foldout(m_ShowClientObjects, m_ShowClientObjectsLabel); + if (m_ShowClientObjects) + { + EditorGUI.indentLevel += 1; + foreach (var obj in ClientScene.objects) + { + string first = "NetId:" + obj.Key; + GameObject value = null; + if (obj.Value != null) + { + NetworkIdentity id = obj.Value.GetComponent(); + first += " SceneId:" + id.sceneId; + value = obj.Value.gameObject; + } + EditorGUILayout.ObjectField(first, value, typeof(GameObject), true); + } + EditorGUI.indentLevel -= 1; + } + } + + void ShowClientInfo() + { + if (!NetworkClient.active) + { + return; + } + + m_ShowClient = EditorGUILayout.Foldout(m_ShowClient, m_ShowClientLabel); + if (!m_ShowClient) + { + return; + } + + EditorGUI.indentLevel += 1; + EditorGUILayout.BeginVertical(); + + int count = 0; + foreach (var cl in NetworkClient.allClients) + { + if (cl.connection == null) + { + EditorGUILayout.TextField("client " + count + ": ", cl.GetType().Name + " Conn: null"); + } + else + { + EditorGUILayout.TextField("client " + count + ":" , cl.GetType().Name + " Conn: " + cl.connection); + EditorGUI.indentLevel += 1; + foreach (var p in cl.connection.playerControllers) + { + EditorGUILayout.LabelField("Player", p.ToString()); + } + EditorGUI.indentLevel -= 1; + } + count++; + } + + ShowClientObjects(); + EditorGUILayout.EndVertical(); + EditorGUI.indentLevel -= 1; + } + + void ShowMatchMakerInfo() + { + if (m_Manager == null || m_Manager.matchMaker == null) + { + return; + } + + m_ShowMatchMaker = EditorGUILayout.Foldout(m_ShowMatchMaker, m_ShowMatchMakerLabel); + if (!m_ShowMatchMaker) + { + return; + } + + EditorGUI.indentLevel += 1; + EditorGUILayout.BeginVertical(); + + EditorGUILayout.LabelField("Match Information", m_Manager.matchInfo == null ? "None" : m_Manager.matchInfo.ToString()); + + EditorGUILayout.EndVertical(); + EditorGUI.indentLevel -= 1; + } + + static UnityObject GetSceneObject(string sceneObjectName) + { + if (string.IsNullOrEmpty(sceneObjectName)) + { + return null; + } + + foreach (var editorScene in EditorBuildSettings.scenes) + { + if (editorScene.path.IndexOf(sceneObjectName) != -1) + { + return AssetDatabase.LoadAssetAtPath(editorScene.path, typeof(UnityObject)); + } + } + return null; + } + + static Rect GetButtonRect() + { + Rect rect = EditorGUILayout.GetControlRect(); + float endcap = rect.width / 6; + Rect newRect = new Rect(rect.xMin + endcap, rect.yMin, rect.width - (endcap * 2), rect.height); + return newRect; + } + + void ShowControls() + { + m_ShowControls = EditorGUILayout.Foldout(m_ShowControls, m_ShowControlsLabel); + if (!m_ShowControls) + { + return; + } + + if (!string.IsNullOrEmpty(NetworkManager.networkSceneName)) + { + EditorGUILayout.ObjectField("Current Scene:", GetSceneObject(NetworkManager.networkSceneName), typeof(UnityObject), true); + } + EditorGUILayout.Separator(); + + if (!NetworkClient.active && !NetworkServer.active && m_Manager.matchMaker == null) + { + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Toggle(false, "LAN Host", EditorStyles.miniButton)) + { + m_Manager.StartHost(); + } + if (GUILayout.Toggle(false, "LAN Server", EditorStyles.miniButton)) + { + m_Manager.StartServer(); + } + if (GUILayout.Toggle(false, "LAN Client", EditorStyles.miniButton)) + { + m_Manager.StartClient(); + } + if (GUILayout.Toggle(false, "Start Matchmaker", EditorStyles.miniButton)) + { + m_Manager.StartMatchMaker(); + m_ShowMatchMaker = true; + } + EditorGUILayout.EndHorizontal(); + } + + if (NetworkClient.active && !ClientScene.ready) + { + if (GUI.Button(GetButtonRect(), "Client Ready")) + { + ClientScene.Ready(m_Manager.client.connection); + + if (ClientScene.localPlayers.Count == 0) + { + ClientScene.AddPlayer(0); + } + } + } + + if (NetworkServer.active || NetworkClient.active) + { + if (GUI.Button(GetButtonRect(), "Stop")) + { + m_Manager.StopServer(); + m_Manager.StopClient(); + } + } + if (!NetworkServer.active && !NetworkClient.active) + { + EditorGUILayout.Separator(); + if (m_Manager.matchMaker != null) + { + if (m_Manager.matchInfo == null) + { + if (m_Manager.matches == null) + { + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Toggle(false, "Create Internet Match", EditorStyles.miniButton)) + { + m_Manager.matchMaker.CreateMatch(m_Manager.matchName, m_Manager.matchSize, true, "", "", "", 0, 0, m_Manager.OnMatchCreate); + } + if (GUILayout.Toggle(false, "Find Internet Match", EditorStyles.miniButton)) + { + m_Manager.matchMaker.ListMatches(0, 20, "", false, 0, 0, m_Manager.OnMatchList); + } + if (GUILayout.Toggle(false, "Stop MatchMaker", EditorStyles.miniButton)) + { + m_Manager.StopMatchMaker(); + } + EditorGUILayout.EndHorizontal(); + m_Manager.matchName = EditorGUILayout.TextField("Room Name:", m_Manager.matchName); + m_Manager.matchSize = (uint)EditorGUILayout.IntField("Room Size:", (int)m_Manager.matchSize); + + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Toggle(false, "Use Local Relay", EditorStyles.miniButton)) + { + m_Manager.SetMatchHost("localhost", 1337, false); + } + if (GUILayout.Toggle(false, "Use Internet Relay", EditorStyles.miniButton)) + { + m_Manager.SetMatchHost("mm.unet.unity3d.com", 443, true); + } + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.Separator(); + } + else + { + foreach (var match in m_Manager.matches) + { + if (GUI.Button(GetButtonRect(), "Join Match:" + match.name)) + { + m_Manager.matchName = match.name; + m_Manager.matchSize = (uint)match.currentSize; + m_Manager.matchMaker.JoinMatch(match.networkId, "", "", "", 0, 0, m_Manager.OnMatchJoined); + } + } + if (GUI.Button(GetButtonRect(), "Stop MatchMaker")) + { + m_Manager.StopMatchMaker(); + } + } + } + } + } + + EditorGUILayout.Separator(); + } + + public override void OnInspectorGUI() + { + Init(); + + serializedObject.Update(); + EditorGUILayout.PropertyField(m_ShowGUIProperty, m_ShowRuntimeGuiLabel); + + if (m_ManagerHud.showGUI) + { + EditorGUI.indentLevel += 1; + EditorGUILayout.PropertyField(m_OffsetXProperty, m_OffsetXLabel); + EditorGUILayout.PropertyField(m_OffsetYProperty, m_OffsetYLabel); + EditorGUI.indentLevel -= 1; + } + serializedObject.ApplyModifiedProperties(); + + if (!Application.isPlaying) + { + return; + } + + ShowControls(); + ShowServerInfo(); + ShowClientInfo(); + ShowMatchMakerInfo(); + } + } +} +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerHUDEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerHUDEditor.cs.meta new file mode 100644 index 00000000..24677d77 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerHUDEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 89ba576713e5745dfbe479146356752d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerPreview.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerPreview.cs new file mode 100644 index 00000000..279206ea --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerPreview.cs @@ -0,0 +1,113 @@ +#if ENABLE_UNET +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Networking; +using UnityObject = UnityEngine.Object; + +#pragma warning disable 618 +namespace UnityEditor.Networking +{ + [CustomPreview(typeof(NetworkManager))] + class NetworkManagerPreview : ObjectPreview + { + NetworkManager m_Manager; + GUIContent m_Title; + + protected GUIContent m_ShowServerMessagesLabel; + protected GUIContent m_ShowClientMessagesLabel; + + const int k_Padding = 4; + const int k_ColumnWidth = 120; + const int k_RowHeight = 16; + + public override void Initialize(UnityObject[] targets) + { + base.Initialize(targets); + GetNetworkInformation(target as NetworkManager); + + m_ShowServerMessagesLabel = TextUtility.TextContent("Server Message Handlers:", "Registered network message handler functions"); + m_ShowClientMessagesLabel = TextUtility.TextContent("Client Message Handlers:", "Registered network message handler functions"); + } + + public override GUIContent GetPreviewTitle() + { + if (m_Title == null) + { + m_Title = TextUtility.TextContent("NetworkManager Message Handlers"); + } + return m_Title; + } + + public override bool HasPreviewGUI() + { + return m_Manager != null; + } + + public override void OnPreviewGUI(Rect r, GUIStyle background) + { + if (Event.current.type != EventType.Repaint) + return; + + if (m_Manager == null) + return; + + int posY = (int)(r.yMin + k_Padding); + + posY = ShowServerMessageHandlers(r, posY); + posY = ShowClientMessageHandlers(r, posY); + } + + static string FormatHandler(KeyValuePair handler) + { + return string.Format("{0}:{1}()", + handler.Value.Method.DeclaringType.Name, + handler.Value.Method.Name); + } + + int ShowServerMessageHandlers(Rect r, int posY) + { + if (NetworkServer.handlers.Count == 0) + return posY; + + GUI.Label(new Rect(r.xMin + k_Padding, posY, 400, k_RowHeight), m_ShowServerMessagesLabel); + posY += k_RowHeight; + + foreach (var handler in NetworkServer.handlers) + { + GUI.Label(new Rect(r.xMin + k_Padding * 4, posY, 400, k_RowHeight), MsgType.MsgTypeToString(handler.Key)); + GUI.Label(new Rect(r.xMin + k_Padding * 4 + k_ColumnWidth, posY, 400, k_RowHeight), FormatHandler(handler)); + posY += k_RowHeight; + } + return posY; + } + + int ShowClientMessageHandlers(Rect r, int posY) + { + if (NetworkClient.allClients.Count == 0) + return posY; + + NetworkClient client = NetworkClient.allClients[0]; + if (client == null) + return posY; + + GUI.Label(new Rect(r.xMin + k_Padding, posY, 400, k_RowHeight), m_ShowClientMessagesLabel); + posY += k_RowHeight; + + foreach (var handler in client.handlers) + { + GUI.Label(new Rect(r.xMin + k_Padding * 4, posY, 400, k_RowHeight), MsgType.MsgTypeToString(handler.Key)); + GUI.Label(new Rect(r.xMin + k_Padding * 4 + k_ColumnWidth, posY, 400, k_RowHeight), FormatHandler(handler)); + posY += k_RowHeight; + } + return posY; + } + + void GetNetworkInformation(NetworkManager man) + { + m_Manager = man; + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerPreview.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerPreview.cs.meta new file mode 100644 index 00000000..330039bc --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkManagerPreview.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cfd89ea227d3743d4a5944bb6a83e50d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkMigrationManagerEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkMigrationManagerEditor.cs new file mode 100644 index 00000000..48abedcb --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkMigrationManagerEditor.cs @@ -0,0 +1,134 @@ +#if ENABLE_UNET +using System; +using UnityEngine; +using UnityEngine.Networking; + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkMigrationManager), true)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkMigrationManagerEditor : Editor + { + bool m_Initialized; + NetworkMigrationManager m_Manager; + + SerializedProperty m_HostMigrationProperty; + SerializedProperty m_ShowGUIProperty; + SerializedProperty m_OffsetXProperty; + SerializedProperty m_OffsetYProperty; + + GUIContent m_HostMigrationLabel; + GUIContent m_ShowGUILabel; + GUIContent m_OffsetXLabel; + GUIContent m_OffsetYLabel; + + bool m_ShowPeers; + bool m_ShowPlayers; + + void Init() + { + if (m_Initialized) + { + if (m_HostMigrationProperty == null) + { + // need to re-init. don't return + } + else + { + return; + } + } + + m_Initialized = true; + m_Manager = target as NetworkMigrationManager; + + m_HostMigrationProperty = serializedObject.FindProperty("m_HostMigration"); + m_ShowGUIProperty = serializedObject.FindProperty("m_ShowGUI"); + m_OffsetXProperty = serializedObject.FindProperty("m_OffsetX"); + m_OffsetYProperty = serializedObject.FindProperty("m_OffsetY"); + + m_ShowGUILabel = TextUtility.TextContent("Show GUI", "Enable to display the default UI."); + m_OffsetXLabel = TextUtility.TextContent("Offset X", "The horizonal offset of the GUI."); + m_OffsetYLabel = TextUtility.TextContent("Offset Y", "The vertical offset of the GUI."); + + m_HostMigrationLabel = TextUtility.TextContent("Use Host Migration", "Enable to use host migration."); + } + + public override void OnInspectorGUI() + { + Init(); + serializedObject.Update(); + DrawControls(); + serializedObject.ApplyModifiedProperties(); + } + + void DrawControls() + { + if (m_Manager == null) + return; + + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.PropertyField(m_HostMigrationProperty, m_HostMigrationLabel); + EditorGUILayout.PropertyField(m_ShowGUIProperty, m_ShowGUILabel); + if (m_Manager.showGUI) + { + EditorGUILayout.PropertyField(m_OffsetXProperty, m_OffsetXLabel); + EditorGUILayout.PropertyField(m_OffsetYProperty, m_OffsetYLabel); + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + } + + if (Application.isPlaying) + { + EditorGUILayout.Separator(); + + //runtime data + EditorGUILayout.LabelField("Disconnected From Host", m_Manager.disconnectedFromHost.ToString()); + EditorGUILayout.LabelField("Waiting to become New Host", m_Manager.waitingToBecomeNewHost.ToString()); + EditorGUILayout.LabelField("Waitingto Reconnect to New Host", m_Manager.waitingReconnectToNewHost.ToString()); + EditorGUILayout.LabelField("Your ConnectionId", m_Manager.oldServerConnectionId.ToString()); + EditorGUILayout.LabelField("New Host Address", m_Manager.newHostAddress); + + if (m_Manager.peers != null) + { + m_ShowPeers = EditorGUILayout.Foldout(m_ShowPeers, "Peers"); + if (m_ShowPeers) + { + EditorGUI.indentLevel += 1; + foreach (var peer in m_Manager.peers) + { + EditorGUILayout.LabelField("Peer: ", peer.ToString()); + } + EditorGUI.indentLevel -= 1; + } + } + + if (m_Manager.pendingPlayers != null) + { + m_ShowPlayers = EditorGUILayout.Foldout(m_ShowPlayers, "Pending Players"); + if (m_ShowPlayers) + { + EditorGUI.indentLevel += 1; + foreach (var connId in m_Manager.pendingPlayers.Keys) + { + EditorGUILayout.LabelField("Connection: ", connId.ToString()); + EditorGUI.indentLevel += 1; + var players = m_Manager.pendingPlayers[connId].players; + foreach (var p in players) + { + EditorGUILayout.ObjectField("Player netId:" + p.netId + " contId:" + p.playerControllerId, p.obj, typeof(GameObject), false); + } + EditorGUI.indentLevel -= 1; + } + EditorGUI.indentLevel -= 1; + } + } + } + } + } +} +#endif diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkMigrationManagerEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkMigrationManagerEditor.cs.meta new file mode 100644 index 00000000..372a7e26 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkMigrationManagerEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f96c8cbba01948a1ad47a06bbe5359b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkScenePostProcess.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkScenePostProcess.cs new file mode 100644 index 00000000..0b3b6de7 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkScenePostProcess.cs @@ -0,0 +1,55 @@ +#if ENABLE_UNET +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.Callbacks; +using UnityEngine; +using UnityEngine.Networking; + +namespace UnityEditor +{ + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkScenePostProcess : MonoBehaviour + { + [PostProcessScene] + public static void OnPostProcessScene() + { + var prefabWarnings = new HashSet(); + + int nextSceneId = 1; + foreach (NetworkIdentity uv in FindObjectsOfType().OrderBy(identity => identity.name)) + { + // if we had a [ConflictComponent] attribute that would be better than this check. + // also there is no context about which scene this is in. + if (uv.GetComponent() != null) + { + Debug.LogError("NetworkManager has a NetworkIdentity component. This will cause the NetworkManager object to be disabled, so it is not recommended."); + } + + if (uv.isClient || uv.isServer) + continue; + + uv.gameObject.SetActive(false); + uv.ForceSceneId(nextSceneId++); + + var prefabGO = UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(uv.gameObject) as GameObject; + if (prefabGO) + { + var prefabRootGO = prefabGO.transform.root.gameObject; + if (prefabRootGO) + { + var identities = prefabRootGO.GetComponentsInChildren(); + if (identities.Length > 1 && !prefabWarnings.Contains(prefabRootGO.name)) + { + // make sure we only print one error per prefab + prefabWarnings.Add(prefabRootGO.name); + + Debug.LogWarningFormat("Prefab '{0}' has several NetworkIdentity components attached to itself or its children, this is not supported.", prefabRootGO.name); + } + } + } + } + } + } +} +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkScenePostProcess.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkScenePostProcess.cs.meta new file mode 100644 index 00000000..a83d870a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkScenePostProcess.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3839f0fe23bbc40d0af7037b7a2e4b42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformChildEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformChildEditor.cs new file mode 100644 index 00000000..3e18a59d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformChildEditor.cs @@ -0,0 +1,142 @@ +#if ENABLE_UNET +using System; +using UnityEditor; +using UnityEngine; +using System.Collections; +using UnityEngine.Networking; + + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkTransformChild), true)] + [CanEditMultipleObjects] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkTransformChildEditor : Editor + { + private static GUIContent[] axisOptions = {TextUtility.TextContent("None"), new GUIContent("X"), TextUtility.TextContent("Y (Top-Down 2D)"), TextUtility.TextContent("Z (Side-on 2D)"), TextUtility.TextContent("XY (FPS)"), new GUIContent("XZ"), new GUIContent("YZ"), TextUtility.TextContent("XYZ (full 3D)")}; + + bool m_Initialized = false; + NetworkTransformChild sync; + + SerializedProperty m_Target; + SerializedProperty m_MovementThreshold; + + SerializedProperty m_InterpolateRotation; + SerializedProperty m_InterpolateMovement; + SerializedProperty m_RotationSyncCompression; + + protected GUIContent m_TargetLabel; + protected GUIContent m_MovementThresholdLabel; + + protected GUIContent m_InterpolateRotationLabel; + protected GUIContent m_InterpolateMovementLabel; + protected GUIContent m_RotationSyncCompressionLabel; + protected GUIContent m_RotationAxisLabel; + + SerializedProperty m_NetworkSendIntervalProperty; + GUIContent m_NetworkSendIntervalLabel; + + public void Init() + { + if (m_Initialized) + return; + + m_Initialized = true; + sync = target as NetworkTransformChild; + + m_Target = serializedObject.FindProperty("m_Target"); + if (sync.GetComponent() == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkTransformChild must be on the root object with the NetworkTransform, not on the child node"); } + m_Target.objectReferenceValue = null; + } + + m_MovementThreshold = serializedObject.FindProperty("m_MovementThreshold"); + + m_InterpolateRotation = serializedObject.FindProperty("m_InterpolateRotation"); + m_InterpolateMovement = serializedObject.FindProperty("m_InterpolateMovement"); + m_RotationSyncCompression = serializedObject.FindProperty("m_RotationSyncCompression"); + + m_NetworkSendIntervalProperty = serializedObject.FindProperty("m_SendInterval"); + + m_TargetLabel = TextUtility.TextContent("Target", "The child transform to be synchronized."); + m_NetworkSendIntervalLabel = TextUtility.TextContent("Network Send Rate", "Number of network updates per second."); + EditorGUI.indentLevel += 1; + m_MovementThresholdLabel = TextUtility.TextContent("Movement Threshold", "The distance that this object can move without sending a movement synchronization update."); + + m_InterpolateRotationLabel = TextUtility.TextContent("Interpolate Rotation Factor", "The larger this number is, the faster the object will interpolate to the target facing direction."); + m_InterpolateMovementLabel = TextUtility.TextContent("Interpolate Movement Factor", "The larger this number is, the faster the object will interpolate to the target position."); + m_RotationSyncCompressionLabel = TextUtility.TextContent("Compress Rotation", "How much to compress rotation sync updates.\n\nChoose None for no compression.\n\nChoose Low for a low amount of compression that preserves accuracy.\n\nChoose High for a high amount of compression that sacrifices accuracy."); + m_RotationAxisLabel = TextUtility.TextContent("Rotation Axis", "Which axis to use for rotation."); + + EditorGUI.indentLevel -= 1; + } + + protected void ShowControls() + { + if (m_Target == null) + { + m_Initialized = false; + } + Init(); + + serializedObject.Update(); + + int sendRate = 0; + if (m_NetworkSendIntervalProperty.floatValue != 0) + { + sendRate = (int)(1 / m_NetworkSendIntervalProperty.floatValue); + } + int newSendRate = EditorGUILayout.IntSlider(m_NetworkSendIntervalLabel, sendRate, 0, 30); + if (newSendRate != sendRate) + { + if (newSendRate == 0) + { + m_NetworkSendIntervalProperty.floatValue = 0; + } + else + { + m_NetworkSendIntervalProperty.floatValue = 1.0f / newSendRate; + } + } + if (EditorGUILayout.PropertyField(m_Target, m_TargetLabel)) + { + if (sync.GetComponent() == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkTransformChild must be on the root object with the NetworkTransform, not on the child node"); } + m_Target.objectReferenceValue = null; + } + } + + EditorGUILayout.PropertyField(m_MovementThreshold, m_MovementThresholdLabel); + if (m_MovementThreshold.floatValue < 0) + { + m_MovementThreshold.floatValue = 0; + EditorUtility.SetDirty(sync); + } + EditorGUILayout.PropertyField(m_InterpolateMovement, m_InterpolateMovementLabel); + + EditorGUILayout.PropertyField(m_InterpolateRotation, m_InterpolateRotationLabel); + + int newRotation = EditorGUILayout.Popup( + m_RotationAxisLabel, + (int)sync.syncRotationAxis, + axisOptions); + if ((NetworkTransform.AxisSyncMode)newRotation != sync.syncRotationAxis) + { + sync.syncRotationAxis = (NetworkTransform.AxisSyncMode)newRotation; + EditorUtility.SetDirty(sync); + } + + EditorGUILayout.PropertyField(m_RotationSyncCompression, m_RotationSyncCompressionLabel); + + serializedObject.ApplyModifiedProperties(); + } + + public override void OnInspectorGUI() + { + ShowControls(); + } + } +} +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformChildEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformChildEditor.cs.meta new file mode 100644 index 00000000..be802cea --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformChildEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fce3ecfbdfd154ffc972acfe449f9d22 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformEditor.cs new file mode 100644 index 00000000..b659d219 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformEditor.cs @@ -0,0 +1,213 @@ +#if ENABLE_UNET +using System; +using UnityEngine; +using UnityEngine.Networking; + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkTransform), true)] + [CanEditMultipleObjects] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkTransformEditor : Editor + { + private static GUIContent[] axisOptions = {TextUtility.TextContent("None"), new GUIContent("X"), TextUtility.TextContent("Y (Top-Down 2D)"), TextUtility.TextContent("Z (Side-on 2D)"), TextUtility.TextContent("XY (FPS)"), new GUIContent("XZ"), new GUIContent("YZ"), TextUtility.TextContent("XYZ (full 3D)")}; + + bool m_Initialized; + NetworkTransform m_SyncTransform; + + SerializedProperty m_TransformSyncMode; + SerializedProperty m_MovementTheshold; + SerializedProperty m_VelocityThreshold; + SerializedProperty m_SnapThreshold; + + SerializedProperty m_InterpolateRotation; + SerializedProperty m_InterpolateMovement; + SerializedProperty m_RotationSyncCompression; + SerializedProperty m_SyncSpin; + + protected GUIContent m_MovementThesholdLabel; + protected GUIContent m_VelocityThresholdLabel; + protected GUIContent m_SnapThresholdLabel; + + protected GUIContent m_InterpolateRotationLabel; + protected GUIContent m_InterpolateMovementLabel; + protected GUIContent m_RotationSyncCompressionLabel; + protected GUIContent m_RotationAxisLabel; + protected GUIContent m_SyncSpinLabel; + + SerializedProperty m_NetworkSendIntervalProperty; + GUIContent m_NetworkSendIntervalLabel; + + public void Init() + { + if (m_Initialized) + return; + + m_Initialized = true; + m_SyncTransform = target as NetworkTransform; + + if (m_SyncTransform.transformSyncMode == NetworkTransform.TransformSyncMode.SyncNone) + { + if (m_SyncTransform.GetComponent() != null) + { + m_SyncTransform.transformSyncMode = NetworkTransform.TransformSyncMode.SyncRigidbody3D; + m_SyncTransform.syncRotationAxis = NetworkTransform.AxisSyncMode.AxisXYZ; + EditorUtility.SetDirty(m_SyncTransform); + } + else if (m_SyncTransform.GetComponent() != null) + { + m_SyncTransform.transformSyncMode = NetworkTransform.TransformSyncMode.SyncRigidbody2D; + m_SyncTransform.syncRotationAxis = NetworkTransform.AxisSyncMode.AxisZ; + EditorUtility.SetDirty(m_SyncTransform); + } + else if (m_SyncTransform.GetComponent() != null) + { + m_SyncTransform.transformSyncMode = NetworkTransform.TransformSyncMode.SyncCharacterController; + m_SyncTransform.syncRotationAxis = NetworkTransform.AxisSyncMode.AxisXYZ; + EditorUtility.SetDirty(m_SyncTransform); + } + else + { + m_SyncTransform.transformSyncMode = NetworkTransform.TransformSyncMode.SyncTransform; + m_SyncTransform.syncRotationAxis = NetworkTransform.AxisSyncMode.AxisXYZ; + EditorUtility.SetDirty(m_SyncTransform); + } + } + m_TransformSyncMode = serializedObject.FindProperty("m_TransformSyncMode"); + m_MovementTheshold = serializedObject.FindProperty("m_MovementTheshold"); + m_VelocityThreshold = serializedObject.FindProperty("m_VelocityThreshold"); + m_SnapThreshold = serializedObject.FindProperty("m_SnapThreshold"); + + m_InterpolateRotation = serializedObject.FindProperty("m_InterpolateRotation"); + m_InterpolateMovement = serializedObject.FindProperty("m_InterpolateMovement"); + m_RotationSyncCompression = serializedObject.FindProperty("m_RotationSyncCompression"); + m_SyncSpin = serializedObject.FindProperty("m_SyncSpin"); + + m_NetworkSendIntervalProperty = serializedObject.FindProperty("m_SendInterval"); + m_NetworkSendIntervalLabel = TextUtility.TextContent("Network Send Rate", "Number of network updates per second."); + EditorGUI.indentLevel += 1; + m_MovementThesholdLabel = TextUtility.TextContent("Movement Threshold", "The distance that this object can move without sending a movement synchronization update."); + m_VelocityThresholdLabel = TextUtility.TextContent("Velocity Threshold", "The minimum velocity difference that will be synchronized over the network."); + m_SnapThresholdLabel = TextUtility.TextContent("Snap Threshold", "If a movement update puts this object further from its current position that this value, it will snap to the updated position instead of moving smoothly."); + + m_InterpolateRotationLabel = TextUtility.TextContent("Interpolate Rotation Factor", "The larger this number is, the faster the object will interpolate to the target facing direction."); + m_InterpolateMovementLabel = TextUtility.TextContent("Interpolate Movement Factor", "The larger this number is, the faster the object will interpolate to the target position."); + m_RotationSyncCompressionLabel = TextUtility.TextContent("Compress Rotation", "How much to compress rotation sync updates.\n\nChoose None for no compression.\n\nChoose Low for a low amount of compression that preserves accuracy.\n\nChoose High for a high amount of compression that sacrifices accuracy."); + m_RotationAxisLabel = TextUtility.TextContent("Rotation Axis", "Which axis to use for rotation."); + m_SyncSpinLabel = TextUtility.TextContent("Sync Angular Velocity", "Enable to sync angular velocity."); + EditorGUI.indentLevel -= 1; + } + + protected void ShowControls() + { + if (m_TransformSyncMode == null) + { + m_Initialized = false; + } + Init(); + + serializedObject.Update(); + + int sendRate = 0; + if (m_NetworkSendIntervalProperty.floatValue != 0) + { + sendRate = (int)(1 / m_NetworkSendIntervalProperty.floatValue); + } + int newSendRate = EditorGUILayout.IntSlider(m_NetworkSendIntervalLabel, sendRate, 0, 30); + if (newSendRate != sendRate) + { + if (newSendRate == 0) + { + m_NetworkSendIntervalProperty.floatValue = 0; + } + else + { + m_NetworkSendIntervalProperty.floatValue = 1.0f / newSendRate; + } + } + EditorGUILayout.PropertyField(m_TransformSyncMode); + if (m_TransformSyncMode.enumValueIndex == (int)NetworkTransform.TransformSyncMode.SyncRigidbody3D) + { + Rigidbody r3D = m_SyncTransform.GetComponent(); + if (r3D == null) + { + Debug.LogError("Object has no Rigidbody component."); + m_TransformSyncMode.enumValueIndex = (int)NetworkTransform.TransformSyncMode.SyncTransform; + EditorUtility.SetDirty(m_SyncTransform); + } + } + if (m_TransformSyncMode.enumValueIndex == (int)NetworkTransform.TransformSyncMode.SyncRigidbody2D) + { + Rigidbody2D r2D = m_SyncTransform.GetComponent(); + if (r2D == null) + { + Debug.LogError("Object has no Rigidbody2D component."); + m_TransformSyncMode.enumValueIndex = (int)NetworkTransform.TransformSyncMode.SyncTransform; + EditorUtility.SetDirty(m_SyncTransform); + } + } + if (m_TransformSyncMode.enumValueIndex == (int)NetworkTransform.TransformSyncMode.SyncCharacterController) + { + var cc = m_SyncTransform.GetComponent(); + if (cc == null) + { + Debug.LogError("Object has no CharacterController component."); + m_TransformSyncMode.enumValueIndex = (int)NetworkTransform.TransformSyncMode.SyncTransform; + EditorUtility.SetDirty(m_SyncTransform); + } + } + + EditorGUILayout.LabelField("Movement:"); + EditorGUI.indentLevel += 1; + EditorGUILayout.PropertyField(m_MovementTheshold, m_MovementThesholdLabel); + + + if (m_VelocityThreshold.floatValue < 0) + { + m_VelocityThreshold.floatValue = 0; + EditorUtility.SetDirty(m_SyncTransform); + } + + if ((m_TransformSyncMode.enumValueIndex == (int)NetworkTransform.TransformSyncMode.SyncRigidbody3D) || (m_TransformSyncMode.enumValueIndex == (int)NetworkTransform.TransformSyncMode.SyncRigidbody2D)) + { + EditorGUILayout.PropertyField(m_VelocityThreshold, m_VelocityThresholdLabel); + } + + if (m_MovementTheshold.floatValue < 0) + { + m_MovementTheshold.floatValue = 0; + EditorUtility.SetDirty(m_SyncTransform); + } + EditorGUILayout.PropertyField(m_SnapThreshold, m_SnapThresholdLabel); + EditorGUILayout.PropertyField(m_InterpolateMovement, m_InterpolateMovementLabel); + EditorGUI.indentLevel -= 1; + + EditorGUILayout.LabelField("Rotation:"); + EditorGUI.indentLevel += 1; + + int newRotation = EditorGUILayout.Popup( + m_RotationAxisLabel, + (int)m_SyncTransform.syncRotationAxis, + axisOptions); + if ((NetworkTransform.AxisSyncMode)newRotation != m_SyncTransform.syncRotationAxis) + { + m_SyncTransform.syncRotationAxis = (NetworkTransform.AxisSyncMode)newRotation; + EditorUtility.SetDirty(m_SyncTransform); + } + + EditorGUILayout.PropertyField(m_InterpolateRotation, m_InterpolateRotationLabel); + EditorGUILayout.PropertyField(m_RotationSyncCompression, m_RotationSyncCompressionLabel); + EditorGUILayout.PropertyField(m_SyncSpin, m_SyncSpinLabel); + + EditorGUI.indentLevel -= 1; + + serializedObject.ApplyModifiedProperties(); + } + + public override void OnInspectorGUI() + { + ShowControls(); + } + } +} +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformEditor.cs.meta new file mode 100644 index 00000000..86240d6c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2a5966e186e4448a39d76ae040a24113 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformPreview.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformPreview.cs new file mode 100644 index 00000000..19601292 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformPreview.cs @@ -0,0 +1,88 @@ +#if ENABLE_UNET +using System; +using UnityEngine; +using UnityEngine.Networking; +using UnityObject = UnityEngine.Object; + +#pragma warning disable 618 +namespace UnityEditor.Networking +{ + [CustomPreview(typeof(GameObject))] + class NetworkTransformPreview : ObjectPreview + { + NetworkTransform m_Transform; + Rigidbody m_Rigidbody3D; + Rigidbody2D m_Rigidbody2D; + + GUIContent m_Title; + + public override void Initialize(UnityObject[] targets) + { + base.Initialize(targets); + GetNetworkInformation(target as GameObject); + } + + public override GUIContent GetPreviewTitle() + { + if (m_Title == null) + { + m_Title = TextUtility.TextContent("Network Transform"); + } + return m_Title; + } + + public override bool HasPreviewGUI() + { + return m_Transform != null; + } + + public override void OnPreviewGUI(Rect r, GUIStyle background) + { + if (Event.current.type != EventType.Repaint) + return; + + if (m_Transform == null) + return; + + const int padding = 4; + int posY = 4; + + float posDiff = (m_Transform.transform.position - m_Transform.targetSyncPosition).magnitude; + GUI.Label(new Rect(r.xMin + padding, r.y + posY, 600, 20), "Position: " + m_Transform.transform.position + " Target: " + m_Transform.targetSyncPosition + " Diff: " + posDiff); + posY += 20; + + if (m_Rigidbody3D != null) + { + float angleDiff3D = Quaternion.Angle(m_Transform.rigidbody3D.rotation, m_Transform.targetSyncRotation3D); + GUI.Label(new Rect(r.xMin + padding, r.y + posY, 600, 20), "Angle: " + m_Transform.rigidbody3D.rotation + " Target: " + m_Transform.targetSyncRotation3D + " Diff: " + angleDiff3D); + posY += 20; + + GUI.Label(new Rect(r.xMin + padding, r.y + posY, 600, 20), "Velocity: " + m_Transform.rigidbody3D.velocity + " Target: " + m_Transform.targetSyncVelocity); + posY += 20; + } + + if (m_Rigidbody2D != null) + { + float angleDiff2D = m_Transform.rigidbody2D.rotation - m_Transform.targetSyncRotation2D; + GUI.Label(new Rect(r.xMin + padding, r.y + posY, 600, 20), "Angle: " + m_Transform.rigidbody2D.rotation + " Target: " + m_Transform.targetSyncRotation2D + " Diff: " + angleDiff2D); + posY += 20; + + GUI.Label(new Rect(r.xMin + padding, r.y + posY, 600, 20), "Velocity: " + m_Transform.rigidbody2D.velocity + " Target: " + m_Transform.targetSyncVelocity); + posY += 20; + } + + GUI.Label(new Rect(r.xMin + padding, r.y + posY, 200, 20), "Last SyncTime: " + (Time.time - m_Transform.lastSyncTime)); + posY += 20; + } + + void GetNetworkInformation(GameObject gameObject) + { + m_Transform = gameObject.GetComponent(); + + m_Rigidbody3D = gameObject.GetComponent(); + m_Rigidbody2D = gameObject.GetComponent(); + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformPreview.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformPreview.cs.meta new file mode 100644 index 00000000..e634664b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformPreview.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6b22fa05492b04d078c62cbf7d899c64 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformVisualizerEditor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformVisualizerEditor.cs new file mode 100644 index 00000000..d43d87d2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformVisualizerEditor.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using UnityEngine.Networking; + +namespace UnityEditor +{ + [CustomEditor(typeof(NetworkTransformVisualizer), true)] + [CanEditMultipleObjects] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkTransformVisualizerEditor : NetworkBehaviourInspector + { + internal override bool hideScriptField + { + get + { + return true; + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformVisualizerEditor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformVisualizerEditor.cs.meta new file mode 100644 index 00000000..64b320c9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/NetworkTransformVisualizerEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ff4711ffc62514deab33acef33724c56 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties.meta new file mode 100644 index 00000000..29d0844d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8d3141d29a41d4582ae61a3d22acc664 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties/AssemblyInfo.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..fb35d4f6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("UnityEditor.Networking")] +[assembly: AssemblyDescription("Networking High Level API Editor part")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Unity Technologies")] +[assembly: AssemblyProduct("UnityEditor.Networking")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5f32cd94-baa9-4578-a686-d4b9d6b660f7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties/AssemblyInfo.cs.meta new file mode 100644 index 00000000..4ce14caa --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Properties/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cd591913f7bda4fb0a8cb812fe4d9761 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools.meta new file mode 100644 index 00000000..6dcdc05e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21f0f3a1706ca475ba2da1c3838e38ee +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/MiniJSON.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/MiniJSON.cs new file mode 100644 index 00000000..4bcf87f3 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/MiniJSON.cs @@ -0,0 +1,637 @@ +/* + * Copyright (c) 2013 Calvin Rien + * + * Based on the JSON parser by Patrick van Bergen + * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html + * + * Simplified it so that it doesn't throw exceptions + * and can be used in Unity iPhone with maximum code stripping. + * + * 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. + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.IO; +using System.Linq; +using System.Text; + +namespace UnityEditor.Networking +{ + // Example usage: + // + // using UnityEngine; + // using UnityEditor; + // using System.Collections; + // using System.Collections.Generic; + // + // public class MiniJSONTest : MonoBehaviour { + // void Start () { + // var jsonString = "{ \"array\": [1.44,2,3], " + + // "\"object\": {\"key1\":\"value1\", \"key2\":256}, " + + // "\"string\": \"The quick brown fox \\\"jumps\\\" over the lazy dog \", " + + // "\"unicode\": \"\\u3041 Men\u00fa sesi\u00f3n\", " + + // "\"int\": 65536, " + + // "\"float\": 3.1415926, " + + // "\"bool\": true, " + + // "\"null\": null }"; + // + // var dict = Json.Deserialize (jsonString) as Dictionary; + // + // Debug.Log ("deserialized: " + dict.GetType ()); + // Debug.Log ("dict['array'][0]: " + ((List) dict["array"])[0]); + // Debug.Log ("dict['string']: " + (string) dict["string"]); + // Debug.Log ("dict['float']: " + (double) dict["float"]); // floats come out as doubles + // Debug.Log ("dict['int']: " + (long) dict["int"]); // ints come out as longs + // Debug.Log ("dict['unicode']: " + (string) dict["unicode"]); + // + // var str = Json.Serialize (dict); + // + // Debug.Log ("serialized: " + str); + // } + // } + + /// + /// This class encodes and decodes JSON strings. + /// Spec. details, see http://www.json.org/ + /// + /// JSON uses Arrays and Objects. These correspond here to the datatypes IList and IDictionary. + /// All numbers are parsed to doubles. + /// + internal static class Json + { + /// + /// Parses the string json into a value + /// + /// A JSON string. + /// An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false + public static object Deserialize (string json) + { + // save the string for debug information + if (json == null) + { + return null; + } + + return Parser.Parse (json); + } + + sealed class Parser : IDisposable + { + const string WORD_BREAK = "{}[],:\""; + + public static bool IsWordBreak (char c) + { + return Char.IsWhiteSpace (c) || WORD_BREAK.IndexOf (c) != -1; + } + + enum TOKEN + { + NONE, + CURLY_OPEN, + CURLY_CLOSE, + SQUARED_OPEN, + SQUARED_CLOSE, + COLON, + COMMA, + STRING, + NUMBER, + TRUE, + FALSE, + NULL + }; + + StringReader json; + + Parser (string jsonString) + { + json = new StringReader (jsonString); + } + + public static object Parse (string jsonString) + { + using (var instance = new Parser (jsonString)) + { + return instance.ParseValue (); + } + } + + public void Dispose () + { + json.Dispose (); + json = null; + } + + Dictionary ParseObject () + { + Dictionary table = new Dictionary (); + + // ditch opening brace + json.Read (); + + // { + while (true) + { + switch (NextToken) + { + case TOKEN.NONE: + return null; + case TOKEN.COMMA: + continue; + case TOKEN.CURLY_CLOSE: + return table; + default: + // name + string name = ParseString (); + if (name == null) + { + return null; + } + + // : + if (NextToken != TOKEN.COLON) + { + return null; + } + // ditch the colon + json.Read (); + + // value + table[name] = ParseValue (); + break; + } + } + } + + List ParseArray () + { + List array = new List (); + + // ditch opening bracket + json.Read (); + + // [ + var parsing = true; + while (parsing) + { + TOKEN nextToken = NextToken; + + switch (nextToken) + { + case TOKEN.NONE: + return null; + case TOKEN.COMMA: + continue; + case TOKEN.SQUARED_CLOSE: + parsing = false; + break; + default: + object value = ParseByToken (nextToken); + + array.Add (value); + break; + } + } + + return array; + } + + object ParseValue () + { + TOKEN nextToken = NextToken; + return ParseByToken (nextToken); + } + + object ParseByToken (TOKEN token) + { + switch (token) + { + case TOKEN.STRING: + return ParseString (); + case TOKEN.NUMBER: + return ParseNumber (); + case TOKEN.CURLY_OPEN: + return ParseObject (); + case TOKEN.SQUARED_OPEN: + return ParseArray (); + case TOKEN.TRUE: + return true; + case TOKEN.FALSE: + return false; + case TOKEN.NULL: + return null; + default: + return null; + } + } + + string ParseString () + { + StringBuilder s = new StringBuilder (); + char c; + + // ditch opening quote + json.Read (); + + bool parsing = true; + while (parsing) + { + + if (json.Peek () == -1) + { + parsing = false; + break; + } + + c = NextChar; + switch (c) + { + case '"': + parsing = false; + break; + case '\\': + if (json.Peek () == -1) + { + parsing = false; + break; + } + + c = NextChar; + switch (c) + { + case '"': + case '\\': + case '/': + s.Append (c); + break; + case 'b': + s.Append ('\b'); + break; + case 'f': + s.Append ('\f'); + break; + case 'n': + s.Append ('\n'); + break; + case 'r': + s.Append ('\r'); + break; + case 't': + s.Append ('\t'); + break; + case 'u': + var hex = new char[4]; + + for (int i=0; i< 4; i++) + { + hex[i] = NextChar; + } + + s.Append ((char) Convert.ToInt32 (new string (hex), 16)); + break; + } + break; + default: + s.Append (c); + break; + } + } + + return s.ToString (); + } + + object ParseNumber () + { + string number = NextWord; + + if (number.IndexOf ('.') == -1) + { + long parsedInt; + Int64.TryParse (number, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out parsedInt); + return parsedInt; + } + + double parsedDouble; + Double.TryParse (number, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out parsedDouble); + return parsedDouble; + } + + void EatWhitespace () + { + while (Char.IsWhiteSpace (PeekChar)) + { + json.Read (); + + if (json.Peek () == -1) + { + break; + } + } + } + + char PeekChar + { + get + { + return Convert.ToChar (json.Peek ()); + } + } + + char NextChar + { + get + { + return Convert.ToChar (json.Read ()); + } + } + + string NextWord + { + get + { + StringBuilder word = new StringBuilder (); + + while (!IsWordBreak (PeekChar)) + { + word.Append (NextChar); + + if (json.Peek () == -1) + { + break; + } + } + + return word.ToString (); + } + } + + TOKEN NextToken + { + get + { + EatWhitespace (); + + if (json.Peek () == -1) + { + return TOKEN.NONE; + } + + switch (PeekChar) + { + case '{': + return TOKEN.CURLY_OPEN; + case '}': + json.Read (); + return TOKEN.CURLY_CLOSE; + case '[': + return TOKEN.SQUARED_OPEN; + case ']': + json.Read (); + return TOKEN.SQUARED_CLOSE; + case ',': + json.Read (); + return TOKEN.COMMA; + case '"': + return TOKEN.STRING; + case ':': + return TOKEN.COLON; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + return TOKEN.NUMBER; + } + + switch (NextWord) + { + case "false": + return TOKEN.FALSE; + case "true": + return TOKEN.TRUE; + case "null": + return TOKEN.NULL; + } + + return TOKEN.NONE; + } + } + } + + /// + /// Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string + /// + /// A Dictionary<string, object> / List<object> + /// A JSON encoded string, or null if object 'json' is not serializable + public static string Serialize (object obj) + { + return Serializer.Serialize (obj); + } + + sealed class Serializer + { + StringBuilder builder; + + Serializer () + { + builder = new StringBuilder (); + } + + public static string Serialize (object obj) + { + var instance = new Serializer (); + + instance.SerializeValue (obj); + + return instance.builder.ToString (); + } + + void SerializeValue (object value) + { + IList asList; + IDictionary asDict; + string asStr; + + if (value == null || value is Delegate) + { + builder.Append ("null"); + } + else if ((asStr = value as string) != null) + { + SerializeString (asStr); + } + else if (value is bool) + { + builder.Append ((bool) value ? "true" : "false"); + } + else if ((asList = value as IList) != null) + { + SerializeArray (asList); + } + else if ((asDict = value as IDictionary) != null) + { + SerializeObject (asDict); + } + else if (value is char) + { + SerializeString (new string ((char) value, 1)); + } + else + { + SerializeOther (value); + } + } + + void SerializeObject (IDictionary obj) + { + bool first = true; + + builder.Append ('{'); + + foreach (object e in obj.Keys) + { + if (!first) + { + builder.Append (','); + } + + SerializeString (e.ToString ()); + builder.Append (':'); + + SerializeValue (obj[e]); + + first = false; + } + + builder.Append ('}'); + } + + void SerializeArray (IList anArray) + { + builder.Append ('['); + + bool first = true; + + foreach (object obj in anArray) + { + if (!first) + { + builder.Append (','); + } + + SerializeValue (obj); + + first = false; + } + + builder.Append (']'); + } + + void SerializeString (string str) + { + builder.Append ('\"'); + + char[] charArray = str.ToCharArray (); + foreach (var c in charArray) + { + switch (c) + { + case '"': + builder.Append ("\\\""); + break; + case '\\': + builder.Append ("\\\\"); + break; + case '\b': + builder.Append ("\\b"); + break; + case '\f': + builder.Append ("\\f"); + break; + case '\n': + builder.Append ("\\n"); + break; + case '\r': + builder.Append ("\\r"); + break; + case '\t': + builder.Append ("\\t"); + break; + default: + int codepoint = Convert.ToInt32 (c); + if ((codepoint >= 32) && (codepoint <= 126)) + { + builder.Append (c); + } + else + { + builder.Append ("\\u"); + builder.Append (codepoint.ToString ("x4")); + } + break; + } + } + + builder.Append ('\"'); + } + + void SerializeOther (object value) + { + // NOTE: decimals lose precision during serialization. + // They always have, I'm just letting you know. + // Previously floats and doubles lost precision too. + if (value is float) + { + builder.Append (((float) value).ToString ("R", System.Globalization.CultureInfo.InvariantCulture)); + } + else if (value is int || value is uint || value is long || value is sbyte || value is byte || value is short || value is ushort || value is ulong) + { + builder.Append (value); + } + else if (value is double || value is decimal) + { + builder.Append (Convert.ToDouble (value).ToString ("R", System.Globalization.CultureInfo.InvariantCulture)); + } + else + { + Dictionary map = new Dictionary (); + List fields = value.GetType ().GetFields (BindingFlags.Instance | BindingFlags.Public).ToList (); + foreach (FieldInfo field in fields) + { + map.Add (field.Name, field.GetValue (value)); + } + List properties = value.GetType ().GetProperties (BindingFlags.Instance | BindingFlags.Public).ToList (); + foreach (PropertyInfo property in properties) + { + map.Add (property.Name, property.GetValue (value, null)); + } + SerializeObject (map); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/MiniJSON.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/MiniJSON.cs.meta new file mode 100644 index 00000000..b8533209 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/MiniJSON.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8a61bb6a34a2bb47a6a79c63630403b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/TextUtility.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/TextUtility.cs new file mode 100644 index 00000000..5dbc2a54 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/TextUtility.cs @@ -0,0 +1,16 @@ +using UnityEngine; + +public static class TextUtility +{ + public static GUIContent TextContent(string name, string tooltip) + { + GUIContent newContent = new GUIContent(name); + newContent.tooltip = tooltip; + return newContent; + } + + public static GUIContent TextContent(string name) + { + return new GUIContent(name); + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/TextUtility.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/TextUtility.cs.meta new file mode 100644 index 00000000..9dee9975 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/TextUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e4564215d0bf24062a88653a05c93204 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver.meta new file mode 100644 index 00000000..2fd17e30 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f383c53b6d574cc8a08ad3b38859c1f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/AssemblyInfo.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/AssemblyInfo.cs new file mode 100644 index 00000000..15a55055 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/AssemblyInfo.cs @@ -0,0 +1,28 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("Unity.UNetWeaver")] +[assembly: AssemblyDescription("UNET assembly post processor for code generation.")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Unity Technologies")] +[assembly: AssemblyProduct("Unity.UNetWeaver")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/AssemblyInfo.cs.meta new file mode 100644 index 00000000..4395e703 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b5845527112194aa9896ba4e4cf0de33 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Helpers.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Helpers.cs new file mode 100644 index 00000000..5e4b1458 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Helpers.cs @@ -0,0 +1,227 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using Mono.Cecil; +using Mono.Cecil.Cil; +using Mono.Cecil.Mdb; +using Mono.Cecil.Pdb; + +namespace Unity.UNetWeaver +{ + class Helpers + { + // This code is taken from SerializationWeaver + + class AddSearchDirectoryHelper + { + delegate void AddSearchDirectoryDelegate(string directory); + readonly AddSearchDirectoryDelegate _addSearchDirectory; + + public AddSearchDirectoryHelper(IAssemblyResolver assemblyResolver) + { + // reflection is used because IAssemblyResolver doesn't implement AddSearchDirectory but both DefaultAssemblyResolver and NuGetAssemblyResolver do + var addSearchDirectory = assemblyResolver.GetType().GetMethod("AddSearchDirectory", BindingFlags.Instance | BindingFlags.Public, null, new Type[] { typeof(string) }, null); + if (addSearchDirectory == null) + throw new Exception("Assembly resolver doesn't implement AddSearchDirectory method."); + _addSearchDirectory = (AddSearchDirectoryDelegate)Delegate.CreateDelegate(typeof(AddSearchDirectoryDelegate), assemblyResolver, addSearchDirectory); + } + + public void AddSearchDirectory(string directory) + { + _addSearchDirectory(directory); + } + } + + public static string UnityEngineDLLDirectoryName() + { + var directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase); + return directoryName != null ? directoryName.Replace(@"file:\", "") : null; + } + + public static ISymbolReaderProvider GetSymbolReaderProvider(string inputFile) + { + string nakedFileName = inputFile.Substring(0, inputFile.Length - 4); + if (File.Exists(nakedFileName + ".pdb")) + { + Console.WriteLine("Symbols will be read from " + nakedFileName + ".pdb"); + return new PdbReaderProvider(); + } + if (File.Exists(nakedFileName + ".dll.mdb")) + { + Console.WriteLine("Symbols will be read from " + nakedFileName + ".dll.mdb"); + return new MdbReaderProvider(); + } + Console.WriteLine("No symbols for " + inputFile); + return null; + } + + public static bool InheritsFromSyncList(TypeReference typeRef, Weaver weaver) + { + try + { + // value types cant inherit from SyncList + if (typeRef.IsValueType) + { + return false; + } + + foreach (var type in ResolveInheritanceHierarchy(typeRef, weaver)) + { + // only need to check for generic instances, as we're looking for SyncList + if (type.IsGenericInstance) + { + // resolves the instance type to it's generic type definition, for example SyncList to SyncList + var typeDef = type.Resolve(); + if (typeDef.HasGenericParameters && typeDef.FullName == weaver.SyncListType.FullName) + { + return true; + } + } + } + } + catch + { + // sometimes this will fail if we reference a weird library that can't be resolved, so we just swallow that exception and return false + } + + return false; + } + + public static IEnumerable ResolveInheritanceHierarchy(TypeReference type, Weaver weaver) + { + // for value types the hierarchy is pre-defined as " : System.ValueType : System.Object" + if (type.IsValueType) + { + yield return type; + yield return weaver.valueTypeType; + yield return weaver.objectType; + yield break; + } + + // resolve entire hierarchy from to System.Object + while (type != null && type.FullName != weaver.objectType.FullName) + { + yield return type; + + try + { + var typeDef = type.Resolve(); + if (typeDef == null) + { + break; + } + else + { + type = typeDef.BaseType; + } + } + catch + { + // when calling type.Resolve() we can sometimes get an exception if some dependant library + // could not be loaded (for whatever reason) so just swallow it and break out of the loop + break; + } + } + + + yield return weaver.objectType; + } + + public static string DestinationFileFor(string outputDir, string assemblyPath) + { + var fileName = Path.GetFileName(assemblyPath); + Debug.Assert(fileName != null, "fileName != null"); + + return Path.Combine(outputDir, fileName); + } + + public static string PrettyPrintType(TypeReference type) + { + // generic instances, such as List + if (type.IsGenericInstance) + { + var giType = (GenericInstanceType)type; + return giType.Name.Substring(0, giType.Name.Length - 2) + "<" + String.Join(", ", giType.GenericArguments.Select(PrettyPrintType).ToArray()) + ">"; + } + + // generic types, such as List + if (type.HasGenericParameters) + { + return type.Name.Substring(0, type.Name.Length - 2) + "<" + String.Join(", ", type.GenericParameters.Select(x => x.Name).ToArray()) + ">"; + } + + // non-generic type such as Int + return type.Name; + } + + public static ReaderParameters ReaderParameters(string assemblyPath, IEnumerable extraPaths, IAssemblyResolver assemblyResolver, string unityEngineDLLPath, string unityUNetDLLPath) + { + var parameters = new ReaderParameters() {ReadWrite = true}; + if (assemblyResolver == null) + assemblyResolver = new DefaultAssemblyResolver(); + var helper = new AddSearchDirectoryHelper(assemblyResolver); + helper.AddSearchDirectory(Path.GetDirectoryName(assemblyPath)); + helper.AddSearchDirectory(Helpers.UnityEngineDLLDirectoryName()); + helper.AddSearchDirectory(Path.GetDirectoryName(unityEngineDLLPath)); + helper.AddSearchDirectory(Path.GetDirectoryName(unityUNetDLLPath)); + if (extraPaths != null) + { + foreach (var path in extraPaths) + helper.AddSearchDirectory(path); + } + parameters.AssemblyResolver = assemblyResolver; + parameters.SymbolReaderProvider = GetSymbolReaderProvider(assemblyPath); + return parameters; + } + + public static WriterParameters GetWriterParameters(ReaderParameters readParams) + { + var writeParams = new WriterParameters(); + if (readParams.SymbolReaderProvider is PdbReaderProvider) + { + //Log("Will export symbols of pdb format"); + writeParams.SymbolWriterProvider = new PdbWriterProvider(); + } + else if (readParams.SymbolReaderProvider is MdbReaderProvider) + { + //Log("Will export symbols of mdb format"); + writeParams.SymbolWriterProvider = new MdbWriterProvider(); + } + return writeParams; + } + + public static TypeReference MakeGenericType(TypeReference self, params TypeReference[] arguments) + { + if (self.GenericParameters.Count != arguments.Length) + throw new ArgumentException(); + + var instance = new GenericInstanceType(self); + foreach (var argument in arguments) + instance.GenericArguments.Add(argument); + + return instance; + } + + // used to get a specialized method on a generic class, such as SyncList::HandleMsg() + public static MethodReference MakeHostInstanceGeneric(MethodReference self, params TypeReference[] arguments) + { + var reference = new MethodReference(self.Name, self.ReturnType, MakeGenericType(self.DeclaringType, arguments)) + { + HasThis = self.HasThis, + ExplicitThis = self.ExplicitThis, + CallingConvention = self.CallingConvention + }; + + foreach (var parameter in self.Parameters) + reference.Parameters.Add(new ParameterDefinition(parameter.ParameterType)); + + foreach (var genericParameter in self.GenericParameters) + reference.GenericParameters.Add(new GenericParameter(genericParameter.Name, reference)); + + return reference; + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Helpers.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Helpers.cs.meta new file mode 100644 index 00000000..de5d2c37 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Helpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 85e3f4d73b6744abeaecdc46a61d00a3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MessageClassProcessor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MessageClassProcessor.cs new file mode 100644 index 00000000..37c1867a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MessageClassProcessor.cs @@ -0,0 +1,154 @@ +using System; +using Mono.Cecil; +using Mono.Cecil.Cil; + +namespace Unity.UNetWeaver +{ + class MessageClassProcessor + { + TypeDefinition m_td; + Weaver m_Weaver; + + public MessageClassProcessor(TypeDefinition td, Weaver weaver) + { + m_td = td; + m_Weaver = weaver; + m_Weaver.DLog(td, "MessageClassProcessor for " + td.Name); + } + + public void Process() + { + m_Weaver.DLog(m_td, "MessageClassProcessor Start"); + + m_Weaver.ResetRecursionCount(); + + GenerateSerialization(); + if (m_Weaver.fail) + { + return; + } + + GenerateDeSerialization(); + m_Weaver.DLog(m_td, "MessageClassProcessor Done"); + } + + void GenerateSerialization() + { + m_Weaver.DLog(m_td, " GenerateSerialization"); + foreach (var m in m_td.Methods) + { + if (m.Name == "Serialize") + return; + } + + if (m_td.Fields.Count == 0) + { + return; + } + + // check for self-referencing types + foreach (var field in m_td.Fields) + { + if (field.FieldType.FullName == m_td.FullName) + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + m_td.Name + " [" + field.FullName + "]. [MessageBase] member cannot be self referencing."); + return; + } + } + + MethodDefinition serializeFunc = new MethodDefinition("Serialize", MethodAttributes.Public | + MethodAttributes.Virtual | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + serializeFunc.Parameters.Add(new ParameterDefinition("writer", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkWriterType))); + ILProcessor serWorker = serializeFunc.Body.GetILProcessor(); + + foreach (var field in m_td.Fields) + { + if (field.IsStatic || field.IsPrivate || field.IsSpecialName) + continue; + + if (field.FieldType.Resolve().HasGenericParameters) + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + m_td.Name + " [" + field.FieldType + "/" + field.FieldType.FullName + "]. [MessageBase] member cannot have generic parameters."); + return; + } + + if (field.FieldType.Resolve().IsInterface) + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + m_td.Name + " [" + field.FieldType + "/" + field.FieldType.FullName + "]. [MessageBase] member cannot be an interface."); + return; + } + + MethodReference writeFunc = m_Weaver.GetWriteFunc(field.FieldType); + if (writeFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldfld, field)); + serWorker.Append(serWorker.Create(OpCodes.Call, writeFunc)); + } + else + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + m_td.Name + " unknown type [" + field.FieldType + "/" + field.FieldType.FullName + "]. [MessageBase] member variables must be basic types."); + return; + } + } + serWorker.Append(serWorker.Create(OpCodes.Ret)); + + m_td.Methods.Add(serializeFunc); + } + + void GenerateDeSerialization() + { + m_Weaver.DLog(m_td, " GenerateDeserialization"); + foreach (var m in m_td.Methods) + { + if (m.Name == "Deserialize") + return; + } + + if (m_td.Fields.Count == 0) + { + return; + } + + MethodDefinition serializeFunc = new MethodDefinition("Deserialize", MethodAttributes.Public | + MethodAttributes.Virtual | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + serializeFunc.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkReaderType))); + ILProcessor serWorker = serializeFunc.Body.GetILProcessor(); + + foreach (var field in m_td.Fields) + { + if (field.IsStatic || field.IsPrivate || field.IsSpecialName) + continue; + + MethodReference readerFunc = m_Weaver.GetReadFunc(field.FieldType); + if (readerFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Call, readerFunc)); + serWorker.Append(serWorker.Create(OpCodes.Stfld, field)); + } + else + { + m_Weaver.fail = true; + Log.Error("GenerateDeSerialization for " + m_td.Name + " unknown type [" + field.FieldType + "]. [SyncVar] member variables must be basic types."); + return; + } + } + serWorker.Append(serWorker.Create(OpCodes.Ret)); + + m_td.Methods.Add(serializeFunc); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MessageClassProcessor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MessageClassProcessor.cs.meta new file mode 100644 index 00000000..32986022 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MessageClassProcessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5de30b9c54a274b90b0f8d625299c6e9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MonoBehaviourProcessor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MonoBehaviourProcessor.cs new file mode 100644 index 00000000..e0770d42 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MonoBehaviourProcessor.cs @@ -0,0 +1,97 @@ +using System; +using System.Linq; +using Mono.Cecil; + +namespace Unity.UNetWeaver +{ + class MonoBehaviourProcessor + { + TypeDefinition m_td; + Weaver m_Weaver; + + public MonoBehaviourProcessor(TypeDefinition td, Weaver weaver) + { + m_td = td; + m_Weaver = weaver; + } + + public void Process() + { + ProcessSyncVars(); + ProcessMethods(); + } + + void ProcessSyncVars() + { + // find syncvars + foreach (FieldDefinition fd in m_td.Fields) + { + foreach (var ca in fd.CustomAttributes) + { + if (ca.AttributeType.FullName == m_Weaver.SyncVarType.FullName) + { + Log.Error("Script " + m_td.FullName + " uses [SyncVar] " + fd.Name + " but is not a NetworkBehaviour."); + m_Weaver.fail = true; + } + } + + if (Helpers.InheritsFromSyncList(fd.FieldType, m_Weaver)) + { + Log.Error(string.Format("Script {0} defines field {1} with type {2}, but it's not a NetworkBehaviour", m_td.FullName, fd.Name, Helpers.PrettyPrintType(fd.FieldType))); + m_Weaver.fail = true; + } + } + } + + void ProcessMethods() + { + // find command and RPC functions + foreach (MethodDefinition md in m_td.Methods) + { + foreach (var ca in md.CustomAttributes) + { + if (ca.AttributeType.FullName == m_Weaver.CommandType.FullName) + { + Log.Error("Script " + m_td.FullName + " uses [Command] " + md.Name + " but is not a NetworkBehaviour."); + m_Weaver.fail = true; + } + + if (ca.AttributeType.FullName == m_Weaver.ClientRpcType.FullName) + { + Log.Error("Script " + m_td.FullName + " uses [ClientRpc] " + md.Name + " but is not a NetworkBehaviour."); + m_Weaver.fail = true; + } + + if (ca.AttributeType.FullName == m_Weaver.TargetRpcType.FullName) + { + Log.Error("Script " + m_td.FullName + " uses [TargetRpc] " + md.Name + " but is not a NetworkBehaviour."); + m_Weaver.fail = true; + } + + var attrName = ca.Constructor.DeclaringType.ToString(); + + if (attrName == "UnityEngine.Networking.ServerAttribute") + { + Log.Error("Script " + m_td.FullName + " uses the attribute [Server] on the method " + md.Name + " but is not a NetworkBehaviour."); + m_Weaver.fail = true; + } + else if (attrName == "UnityEngine.Networking.ServerCallbackAttribute") + { + Log.Error("Script " + m_td.FullName + " uses the attribute [ServerCallback] on the method " + md.Name + " but is not a NetworkBehaviour."); + m_Weaver.fail = true; + } + else if (attrName == "UnityEngine.Networking.ClientAttribute") + { + Log.Error("Script " + m_td.FullName + " uses the attribute [Client] on the method " + md.Name + " but is not a NetworkBehaviour."); + m_Weaver.fail = true; + } + else if (attrName == "UnityEngine.Networking.ClientCallbackAttribute") + { + Log.Error("Script " + m_td.FullName + " uses the attribute [ClientCallback] on the method " + md.Name + " but is not a NetworkBehaviour."); + m_Weaver.fail = true; + } + } + } + } + }; +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MonoBehaviourProcessor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MonoBehaviourProcessor.cs.meta new file mode 100644 index 00000000..9cd72627 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/MonoBehaviourProcessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 22a0f062d3ade4486b4b39e2e8fa7201 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Program.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Program.cs new file mode 100644 index 00000000..1ab0e63a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Program.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Mono.Cecil; + +namespace Unity.UNetWeaver +{ + public static class Log + { + public static Action WarningMethod; + public static Action ErrorMethod; + + public static void Warning(string msg) + { + WarningMethod("UNetWeaver warning: " + msg); + } + + public static void Error(string msg) + { + ErrorMethod("UNetWeaver error: " + msg); + } + } + + public class Program + { + public static bool Process(string unityEngine, string unetDLL, string outputDirectory, string[] assemblies, string[] extraAssemblyPaths, Action printWarning, Action printError) + { + CheckDLLPath(unityEngine); + CheckDLLPath(unetDLL); + CheckOutputDirectory(outputDirectory); + CheckAssemblies(assemblies); + Log.WarningMethod = printWarning; + Log.ErrorMethod = printError; + Weaver weaver = new Weaver(); + return weaver.WeaveAssemblies(assemblies, extraAssemblyPaths, null, outputDirectory, unityEngine, unetDLL); + } + + private static void CheckDLLPath(string path) + { + if (!File.Exists(path)) + throw new Exception("dll could not be located at " + path + "!"); + } + + private static void CheckAssemblies(IEnumerable assemblyPaths) + { + foreach (var assemblyPath in assemblyPaths) + CheckAssemblyPath(assemblyPath); + } + + private static void CheckAssemblyPath(string assemblyPath) + { + if (!File.Exists(assemblyPath)) + throw new Exception("Assembly " + assemblyPath + " does not exist!"); + } + + private static void CheckOutputDirectory(string outputDir) + { + if (!Directory.Exists(outputDir)) + Directory.CreateDirectory(outputDir); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Program.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Program.cs.meta new file mode 100644 index 00000000..e3ef3259 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/Program.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: df865d34c500d456e8421a5b680b6864 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/SyncListStructProcessor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/SyncListStructProcessor.cs new file mode 100644 index 00000000..81a457d5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/SyncListStructProcessor.cs @@ -0,0 +1,341 @@ +using System; +using Mono.Cecil; +using Mono.Cecil.Cil; + +namespace Unity.UNetWeaver +{ + class SyncListStructProcessor + { + TypeDefinition m_TypeDef; + TypeReference m_ItemType; + Weaver m_Weaver; + const MethodAttributes kPublicStaticHide = MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig; + const MethodAttributes kPublicVirtualHide = MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.HideBySig; + + public SyncListStructProcessor(TypeDefinition typeDef, Weaver weaver) + { + m_TypeDef = typeDef; + m_Weaver = weaver; + m_Weaver.DLog(typeDef, "SyncListStructProcessor for " + typeDef.Name); + } + + public void Process() + { + // find item type + var gt = (GenericInstanceType)m_TypeDef.BaseType; + if (gt.GenericArguments.Count == 0) + { + m_Weaver.fail = true; + Log.Error("SyncListStructProcessor no generic args"); + return; + } + m_ItemType = m_Weaver.m_ScriptDef.MainModule.ImportReference(gt.GenericArguments[0]); + + m_Weaver.DLog(m_TypeDef, "SyncListStructProcessor Start item:" + m_ItemType.FullName); + + m_Weaver.ResetRecursionCount(); + var writeItemFunc = GenerateSerialization(); + if (m_Weaver.fail) + { + return; + } + + var readItemFunc = GenerateDeserialization(); + + if (readItemFunc == null || writeItemFunc == null) + return; + + GenerateReadFunc(readItemFunc); + GenerateWriteFunc(writeItemFunc); + + m_Weaver.DLog(m_TypeDef, "SyncListStructProcessor Done"); + } + + /* deserialization of entire list. generates code like: + * + static public void ReadStructBuf(NetworkReader reader, SyncListBuf instance) + { + ushort count = reader.ReadUInt16(); + instance.Clear() + for (ushort i = 0; i < count; i++) + { + instance.AddInternal(instance.DeserializeItem(reader)); + } + } + */ + void GenerateReadFunc(MethodReference readItemFunc) + { + var functionName = "_ReadStruct" + m_TypeDef.Name + "_"; + if (m_TypeDef.DeclaringType != null) + { + functionName += m_TypeDef.DeclaringType.Name; + } + else + { + functionName += "None"; + } + + // create new reader for this type + MethodDefinition readerFunc = new MethodDefinition(functionName, kPublicStaticHide, m_Weaver.voidType); + + readerFunc.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkReaderType))); + readerFunc.Parameters.Add(new ParameterDefinition("instance", ParameterAttributes.None, m_TypeDef)); + + readerFunc.Body.Variables.Add(new VariableDefinition(m_Weaver.uint16Type)); + readerFunc.Body.Variables.Add(new VariableDefinition(m_Weaver.uint16Type)); + readerFunc.Body.InitLocals = true; + + ILProcessor worker = readerFunc.Body.GetILProcessor(); + + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Callvirt, m_Weaver.NetworkReadUInt16)); + worker.Append(worker.Create(OpCodes.Stloc_0)); + + // Call Clear() from the base class + worker.Append(worker.Create(OpCodes.Ldarg_1)); + MethodReference genericClearMethod = Helpers.MakeHostInstanceGeneric(m_Weaver.SyncListClear, m_ItemType); + worker.Append(worker.Create(OpCodes.Callvirt, genericClearMethod)); + + worker.Append(worker.Create(OpCodes.Ldc_I4_0)); + worker.Append(worker.Create(OpCodes.Stloc_1)); + var loopCheckLabel = worker.Create(OpCodes.Nop); + worker.Append(worker.Create(OpCodes.Br, loopCheckLabel)); + + // loop body + var loopHeadLabel = worker.Create(OpCodes.Nop); + worker.Append(loopHeadLabel); + + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Ldarg_1)); + + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Callvirt, readItemFunc)); + + // call the generic AddInternal from the base class + var addInternal = m_Weaver.ResolveMethod(m_Weaver.SyncListStructType, "AddInternal"); + var addInternalTyped = Helpers.MakeHostInstanceGeneric(addInternal, m_ItemType); + worker.Append(worker.Create(OpCodes.Callvirt, addInternalTyped)); + + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ldc_I4_1)); + worker.Append(worker.Create(OpCodes.Add)); + worker.Append(worker.Create(OpCodes.Conv_U2)); + worker.Append(worker.Create(OpCodes.Stloc_1)); + + // loop check + worker.Append(loopCheckLabel); + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ldloc_0)); + worker.Append(worker.Create(OpCodes.Blt, loopHeadLabel)); + + // done + //worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ret)); + + m_Weaver.RegisterReadByReferenceFunc(m_TypeDef.FullName, readerFunc); + } + + /*serialization of entire list. generates code like: + * + static public void WriteStructBuf(NetworkWriter writer, SyncListBuf items) + { + ushort count = (ushort)items.Count; + writer.Write(count); + for (ushort i=0; i < count; i++) + { + items.SerializeItem(writer, items.GetItem(i)); + } + } + */ + void GenerateWriteFunc(MethodReference writeItemFunc) + { + var functionName = "_WriteStruct" + m_TypeDef.GetElementType().Name + "_"; + if (m_TypeDef.DeclaringType != null) + { + functionName += m_TypeDef.DeclaringType.Name; + } + else + { + functionName += "None"; + } + + // create new writer for this type + MethodDefinition writerFunc = new MethodDefinition(functionName, kPublicStaticHide, m_Weaver.voidType); + + writerFunc.Parameters.Add(new ParameterDefinition("writer", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkWriterType))); + writerFunc.Parameters.Add(new ParameterDefinition("value", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_TypeDef))); + + writerFunc.Body.Variables.Add(new VariableDefinition(m_Weaver.uint16Type)); + writerFunc.Body.Variables.Add(new VariableDefinition(m_Weaver.uint16Type)); + writerFunc.Body.InitLocals = true; + + ILProcessor worker = writerFunc.Body.GetILProcessor(); + + worker.Append(worker.Create(OpCodes.Ldarg_1)); + + // call the generic Count from the base class + var getCount = m_Weaver.ResolveMethod(m_Weaver.SyncListStructType, "get_Count"); + var getCountTyped = Helpers.MakeHostInstanceGeneric(getCount, m_ItemType); + worker.Append(worker.Create(OpCodes.Callvirt, getCountTyped)); + + worker.Append(worker.Create(OpCodes.Stloc_0)); + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Ldloc_0)); + worker.Append(worker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriteUInt16)); + worker.Append(worker.Create(OpCodes.Ldc_I4_0)); + worker.Append(worker.Create(OpCodes.Stloc_1)); + + var loopCheckLabel = worker.Create(OpCodes.Nop); + worker.Append(worker.Create(OpCodes.Br, loopCheckLabel)); + + //loop start + var loopStartLabel = worker.Create(OpCodes.Nop); + worker.Append(loopStartLabel); + + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Ldloc_1)); + + // call the generic [] from the base class + var getItem = m_Weaver.ResolveMethod(m_Weaver.SyncListStructType, "GetItem"); + var getItemTyped = Helpers.MakeHostInstanceGeneric(getItem, m_ItemType); + worker.Append(worker.Create(OpCodes.Callvirt, getItemTyped)); + worker.Append(worker.Create(OpCodes.Callvirt, writeItemFunc)); + + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ldc_I4_1)); + worker.Append(worker.Create(OpCodes.Add)); + worker.Append(worker.Create(OpCodes.Conv_U2)); + worker.Append(worker.Create(OpCodes.Stloc_1)); + + worker.Append(loopCheckLabel); + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ldloc_0)); + worker.Append(worker.Create(OpCodes.Blt, loopStartLabel)); + + worker.Append(worker.Create(OpCodes.Ret)); + + m_Weaver.RegisterWriteFunc(m_TypeDef.FullName, writerFunc); + } + + // serialization of individual element + MethodReference GenerateSerialization() + { + m_Weaver.DLog(m_TypeDef, " GenerateSerialization"); + foreach (var m in m_TypeDef.Methods) + { + if (m.Name == "SerializeItem") + return m; + } + + MethodDefinition serializeFunc = new MethodDefinition("SerializeItem", kPublicVirtualHide, m_Weaver.voidType); + + serializeFunc.Parameters.Add(new ParameterDefinition("writer", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkWriterType))); + serializeFunc.Parameters.Add(new ParameterDefinition("item", ParameterAttributes.None, m_ItemType)); + ILProcessor serWorker = serializeFunc.Body.GetILProcessor(); + + if (m_ItemType.IsGenericInstance) + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + Helpers.PrettyPrintType(m_ItemType) + " failed. Struct passed into SyncListStruct can't have generic parameters"); + return null; + } + + foreach (var field in m_ItemType.Resolve().Fields) + { + if (field.IsStatic || field.IsPrivate || field.IsSpecialName) + continue; + + var importedField = m_Weaver.m_ScriptDef.MainModule.ImportReference(field); + var ft = importedField.FieldType.Resolve(); + + if (ft.HasGenericParameters) + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + m_TypeDef.Name + " [" + ft + "/" + ft.FullName + "]. UNet [MessageBase] member cannot have generic parameters."); + return null; + } + + if (ft.IsInterface) + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + m_TypeDef.Name + " [" + ft + "/" + ft.FullName + "]. UNet [MessageBase] member cannot be an interface."); + return null; + } + + MethodReference writeFunc = m_Weaver.GetWriteFunc(field.FieldType); + if (writeFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_2)); + serWorker.Append(serWorker.Create(OpCodes.Ldfld, importedField)); + serWorker.Append(serWorker.Create(OpCodes.Call, writeFunc)); + } + else + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + m_TypeDef.Name + " unknown type [" + ft + "/" + ft.FullName + "]. UNet [MessageBase] member variables must be basic types."); + return null; + } + } + serWorker.Append(serWorker.Create(OpCodes.Ret)); + + m_TypeDef.Methods.Add(serializeFunc); + return serializeFunc; + } + + MethodReference GenerateDeserialization() + { + m_Weaver.DLog(m_TypeDef, " GenerateDeserialization"); + foreach (var m in m_TypeDef.Methods) + { + if (m.Name == "DeserializeItem") + return m; + } + + MethodDefinition serializeFunc = new MethodDefinition("DeserializeItem", kPublicVirtualHide, m_ItemType); + + serializeFunc.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkReaderType))); + + ILProcessor serWorker = serializeFunc.Body.GetILProcessor(); + + serWorker.Body.InitLocals = true; + serWorker.Body.Variables.Add(new VariableDefinition(m_ItemType)); + + // init item instance + serWorker.Append(serWorker.Create(OpCodes.Ldloca, 0)); + serWorker.Append(serWorker.Create(OpCodes.Initobj, m_ItemType)); + + + foreach (var field in m_ItemType.Resolve().Fields) + { + if (field.IsStatic || field.IsPrivate || field.IsSpecialName) + continue; + + var importedField = m_Weaver.m_ScriptDef.MainModule.ImportReference(field); + var ft = importedField.FieldType.Resolve(); + + MethodReference readerFunc = m_Weaver.GetReadFunc(field.FieldType); + if (readerFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ldloca, 0)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Call, readerFunc)); + serWorker.Append(serWorker.Create(OpCodes.Stfld, importedField)); + } + else + { + m_Weaver.fail = true; + Log.Error("GenerateDeserialization for " + m_TypeDef.Name + " unknown type [" + ft + "]. UNet [SyncVar] member variables must be basic types."); + return null; + } + } + serWorker.Append(serWorker.Create(OpCodes.Ldloc_0)); + serWorker.Append(serWorker.Create(OpCodes.Ret)); + + m_TypeDef.Methods.Add(serializeFunc); + return serializeFunc; + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/SyncListStructProcessor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/SyncListStructProcessor.cs.meta new file mode 100644 index 00000000..d05abfc0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/SyncListStructProcessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4ed025af7151d426c91a1e3c03b85978 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetBehaviourProcessor.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetBehaviourProcessor.cs new file mode 100644 index 00000000..2c303b68 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetBehaviourProcessor.cs @@ -0,0 +1,2352 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using Mono.Cecil; +using Mono.Cecil.Cil; + +namespace Unity.UNetWeaver +{ + class NetworkBehaviourProcessor + { + List m_SyncVars = new List(); + List m_SyncLists = new List(); + List m_SyncVarNetIds = new List(); + List m_Cmds = new List(); + List m_Rpcs = new List(); + List m_TargetRpcs = new List(); + List m_Events = new List(); + List m_SyncListStaticFields = new List(); + List m_CmdInvocationFuncs = new List(); + List m_SyncListInvocationFuncs = new List(); + List m_RpcInvocationFuncs = new List(); + List m_TargetRpcInvocationFuncs = new List(); + List m_EventInvocationFuncs = new List(); + + List m_CmdCallFuncs = new List(); + List m_RpcCallFuncs = new List(); + List m_TargetRpcCallFuncs = new List(); + + const int k_SyncVarLimit = 32; + int m_QosChannel; + + Weaver m_Weaver; + TypeDefinition m_td; + int m_NetIdFieldCounter; + + const string k_CmdPrefix = "InvokeCmd"; + const string k_RpcPrefix = "InvokeRpc"; + const string k_TargetRpcPrefix = "InvokeTargetRpc"; + + public NetworkBehaviourProcessor(TypeDefinition td, Weaver weaver) + { + m_td = td; + m_Weaver = weaver; + m_Weaver.DLog(td, "NetworkBehaviourProcessor"); + } + + public void Process() + { + if (m_td.HasGenericParameters) + { + m_Weaver.fail = true; + Log.Error("NetworkBehaviour " + m_td.Name + " cannot have generic parameters"); + return; + } + m_Weaver.DLog(m_td, "Process Start"); + ProcessVersion(); + ProcessSyncVars(); + m_Weaver.ResetRecursionCount(); + + ProcessMethods(); + + ProcessEvents(); + if (m_Weaver.fail) + { + return; + } + GenerateNetworkSettings(); + GenerateConstants(); + + m_Weaver.ResetRecursionCount(); + GenerateSerialization(); + if (m_Weaver.fail) + { + return; + } + + GenerateDeSerialization(); + GeneratePreStartClient(); + m_Weaver.DLog(m_td, "Process Done"); + } + + void WriteClientActiveCheck(ILProcessor worker, string mdName, Instruction label, string errString) + { + // client active check + worker.Append(worker.Create(OpCodes.Call, m_Weaver.NetworkClientGetActive)); + worker.Append(worker.Create(OpCodes.Brtrue, label)); + + worker.Append(worker.Create(OpCodes.Ldstr, errString + " " + mdName + " called on server.")); + worker.Append(worker.Create(OpCodes.Call, m_Weaver.logErrorReference)); + worker.Append(worker.Create(OpCodes.Ret)); + worker.Append(label); + } + + void WriteServerActiveCheck(ILProcessor worker, string mdName, Instruction label, string errString) + { + // server active check + worker.Append(worker.Create(OpCodes.Call, m_Weaver.NetworkServerGetActive)); + worker.Append(worker.Create(OpCodes.Brtrue, label)); + + worker.Append(worker.Create(OpCodes.Ldstr, errString + " " + mdName + " called on client.")); + worker.Append(worker.Create(OpCodes.Call, m_Weaver.logErrorReference)); + worker.Append(worker.Create(OpCodes.Ret)); + worker.Append(label); + } + + void WriteSetupLocals(ILProcessor worker) + { + worker.Body.InitLocals = true; + worker.Body.Variables.Add(new VariableDefinition(m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkWriterType))); + } + + void WriteCreateWriter(ILProcessor worker) + { + // create writer + worker.Append(worker.Create(OpCodes.Newobj, m_Weaver.NetworkWriterCtor)); + worker.Append(worker.Create(OpCodes.Stloc_0)); + worker.Append(worker.Create(OpCodes.Ldloc_0)); + } + + void WriteMessageSize(ILProcessor worker) + { + //write size + worker.Append(worker.Create(OpCodes.Ldc_I4_0)); + worker.Append(worker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWriteInt16)); + } + + void WriteMessageId(ILProcessor worker, int msgId) + { + // write msg id + worker.Append(worker.Create(OpCodes.Ldloc_0)); + worker.Append(worker.Create(OpCodes.Ldc_I4, msgId)); + worker.Append(worker.Create(OpCodes.Conv_U2)); + worker.Append(worker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWriteInt16)); + } + + bool WriteArguments(ILProcessor worker, MethodDefinition md, string errString, bool skipFirst) + { + // write each argument + short argNum = 1; + foreach (ParameterDefinition pd in md.Parameters) + { + if (argNum == 1 && skipFirst) + { + argNum += 1; + continue; + } + + MethodReference writeFunc = m_Weaver.GetWriteFunc(pd.ParameterType); + if (writeFunc == null) + { + Log.Error("WriteArguments for " + md.Name + " type " + pd.ParameterType + " not supported"); + m_Weaver.fail = true; + return false; + } + // use built-in writer func on writer object + worker.Append(worker.Create(OpCodes.Ldloc_0)); // writer object + worker.Append(worker.Create(OpCodes.Ldarg, argNum)); // argument + worker.Append(worker.Create(OpCodes.Call, writeFunc));// call writer func on writer object + argNum += 1; + } + return true; + } + + void ProcessVersion() + { + foreach (MethodDefinition md in m_td.Methods) + { + if (md.Name == "UNetVersion") + { + return; + } + } + + MethodDefinition versionMethod = new MethodDefinition("UNetVersion", MethodAttributes.Private, m_Weaver.voidType); + ILProcessor worker = versionMethod.Body.GetILProcessor(); + worker.Append(worker.Create(OpCodes.Ret)); + m_td.Methods.Add(versionMethod); + } + + void GenerateConstants() + { + if (m_Cmds.Count == 0 && m_Rpcs.Count == 0 && m_TargetRpcs.Count == 0 && m_Events.Count == 0 && m_SyncLists.Count == 0) + return; + + m_Weaver.DLog(m_td, " GenerateConstants "); + + // find static constructor + MethodDefinition cctor = null; + bool cctorFound = false; + foreach (MethodDefinition md in m_td.Methods) + { + if (md.Name == ".cctor") + { + cctor = md; + cctorFound = true; + } + } + if (cctor != null) + { + // remove the return opcode from end of function. will add our own later. + if (cctor.Body.Instructions.Count != 0) + { + Instruction ret = cctor.Body.Instructions[cctor.Body.Instructions.Count - 1]; + if (ret.OpCode == OpCodes.Ret) + { + cctor.Body.Instructions.RemoveAt(cctor.Body.Instructions.Count - 1); + } + else + { + Log.Error("No cctor for " + m_td.Name); + m_Weaver.fail = true; + return; + } + } + } + else + { + // make one! + cctor = new MethodDefinition(".cctor", MethodAttributes.Private | + MethodAttributes.HideBySig | + MethodAttributes.SpecialName | + MethodAttributes.RTSpecialName | + MethodAttributes.Static, + m_Weaver.voidType); + } + + // find instance constructor + MethodDefinition ctor = null; + + foreach (MethodDefinition md in m_td.Methods) + { + if (md.Name == ".ctor") + { + ctor = md; + + var ret = ctor.Body.Instructions[ctor.Body.Instructions.Count - 1]; + if (ret.OpCode == OpCodes.Ret) + { + ctor.Body.Instructions.RemoveAt(ctor.Body.Instructions.Count - 1); + } + else + { + m_Weaver.fail = true; + Log.Error("No ctor for " + m_td.Name); + return; + } + + break; + } + } + + if (ctor == null) + { + m_Weaver.fail = true; + Log.Error("No ctor for " + m_td.Name); + return; + } + + ILProcessor ctorWorker = ctor.Body.GetILProcessor(); + ILProcessor cctorWorker = cctor.Body.GetILProcessor(); + + int cmdIndex = 0; + foreach (MethodDefinition md in m_Cmds) + { + FieldReference cmdConstant = m_Weaver.ResolveField(m_td, "kCmd" + md.Name); + + int cmdHash = GetHashCode(m_td.Name + ":Cmd:" + md.Name); + cctorWorker.Append(cctorWorker.Create(OpCodes.Ldc_I4, cmdHash)); + cctorWorker.Append(cctorWorker.Create(OpCodes.Stsfld, cmdConstant)); + //m_Weaver.DLog(m_td, " Constant " + m_td.Name + ":Cmd:" + md.Name); + + GenerateCommandDelegate(cctorWorker, m_Weaver.registerCommandDelegateReference, m_CmdInvocationFuncs[cmdIndex], cmdConstant); + cmdIndex += 1; + } + + int rpcIndex = 0; + foreach (MethodDefinition md in m_Rpcs) + { + FieldReference rpcConstant = m_Weaver.ResolveField(m_td, "kRpc" + md.Name); + + int rpcHash = GetHashCode(m_td.Name + ":Rpc:" + md.Name); + cctorWorker.Append(cctorWorker.Create(OpCodes.Ldc_I4, rpcHash)); + cctorWorker.Append(cctorWorker.Create(OpCodes.Stsfld, rpcConstant)); + //m_Weaver.DLog(m_td, " Constant " + m_td.Name + ":Rpc:" + md.Name); + + GenerateCommandDelegate(cctorWorker, m_Weaver.registerRpcDelegateReference, m_RpcInvocationFuncs[rpcIndex], rpcConstant); + rpcIndex += 1; + } + + int targetRpcIndex = 0; + foreach (MethodDefinition md in m_TargetRpcs) + { + FieldReference targetRpcConstant = m_Weaver.ResolveField(m_td, "kTargetRpc" + md.Name); + + int targetRpcHash = GetHashCode(m_td.Name + ":TargetRpc:" + md.Name); + cctorWorker.Append(cctorWorker.Create(OpCodes.Ldc_I4, targetRpcHash)); + cctorWorker.Append(cctorWorker.Create(OpCodes.Stsfld, targetRpcConstant)); + //m_Weaver.DLog(m_td, " Constant " + m_td.Name + ":Rpc:" + md.Name); + + GenerateCommandDelegate(cctorWorker, m_Weaver.registerRpcDelegateReference, m_TargetRpcInvocationFuncs[targetRpcIndex], targetRpcConstant); + targetRpcIndex += 1; + } + + int eventIndex = 0; + foreach (EventDefinition ed in m_Events) + { + FieldReference eventConstant = m_Weaver.ResolveField(m_td, "kEvent" + ed.Name); + + int eventHash = GetHashCode(m_td.Name + ":Event:" + ed.Name); + cctorWorker.Append(cctorWorker.Create(OpCodes.Ldc_I4, eventHash)); + cctorWorker.Append(cctorWorker.Create(OpCodes.Stsfld, eventConstant)); + //m_Weaver.DLog(m_td, " Constant " + m_td.Name + ":Event:" + ed.Name); + + GenerateCommandDelegate(cctorWorker, m_Weaver.registerEventDelegateReference, m_EventInvocationFuncs[eventIndex], eventConstant); + eventIndex += 1; + } + + int syncListIndex = 0; + foreach (FieldDefinition fd in m_SyncLists) + { + FieldReference listConstant = m_Weaver.ResolveField(m_td, "kList" + fd.Name); + + int listHash = GetHashCode(m_td.Name + ":List:" + fd.Name); + cctorWorker.Append(cctorWorker.Create(OpCodes.Ldc_I4, listHash)); + cctorWorker.Append(cctorWorker.Create(OpCodes.Stsfld, listConstant)); + //m_Weaver.DLog(m_td, " Constant " + m_td.Name + ":List:" + fd.Name); + + + GenerateSyncListInstanceInitializer(ctorWorker, fd); + + GenerateCommandDelegate(cctorWorker, m_Weaver.registerSyncListDelegateReference, m_SyncListInvocationFuncs[syncListIndex], listConstant); + syncListIndex += 1; + } + + // register CRC entry + // "NetworkCRC.RegisterBehaviour('MyScript', 2);" + cctorWorker.Append(cctorWorker.Create(OpCodes.Ldstr, m_td.Name)); + cctorWorker.Append(cctorWorker.Create(OpCodes.Ldc_I4, m_QosChannel)); + cctorWorker.Append(cctorWorker.Create(OpCodes.Call, m_Weaver.RegisterBehaviourReference)); + + cctorWorker.Append(cctorWorker.Create(OpCodes.Ret)); + if (!cctorFound) + { + m_td.Methods.Add(cctor); + } + + // finish ctor + ctorWorker.Append(ctorWorker.Create(OpCodes.Ret)); + + // in case class had no cctor, it might have BeforeFieldInit, so injected cctor would be called too late + m_td.Attributes = m_td.Attributes & ~TypeAttributes.BeforeFieldInit; + + if (m_SyncLists.Count == 0) + return; + + // find constructor + MethodDefinition awake = null; + bool awakeFound = false; + foreach (MethodDefinition md in m_td.Methods) + { + if (md.Name == "Awake") + { + awake = md; + awakeFound = true; + } + } + if (awake != null) + { + // remove the return opcode from end of function. will add our own later. + if (awake.Body.Instructions.Count != 0) + { + Instruction ret = awake.Body.Instructions[awake.Body.Instructions.Count - 1]; + if (ret.OpCode == OpCodes.Ret) + { + awake.Body.Instructions.RemoveAt(awake.Body.Instructions.Count - 1); + } + else + { + Log.Error("No awake for " + m_td.Name); + m_Weaver.fail = true; + return; + } + } + } + else + { + awake = new MethodDefinition("Awake", MethodAttributes.Private, m_Weaver.voidType); + } + + ILProcessor awakeWorker = awake.Body.GetILProcessor(); + + if (!awakeFound) + { + // if we're not directly inheriting from NetworkBehaviour, we have to + // go up the inheritance chain and check for awake calls that we are overriding by "mistake" + CheckForCustomBaseClassAwakeMethod(awakeWorker); + } + + int syncListFieldOffset = 0; + foreach (FieldDefinition fd in m_SyncLists) + { + GenerateSyncListInitializer(awakeWorker, fd, syncListFieldOffset); + syncListFieldOffset += 1; + } + awakeWorker.Append(awakeWorker.Create(OpCodes.Ret)); + if (!awakeFound) + { + m_td.Methods.Add(awake); + } + } + + void CheckForCustomBaseClassAwakeMethod(ILProcessor awakeWorker) + { + // start from base type + var t = m_td.BaseType; + + // as long as basetype is not NetworkBehaviour + while (t.FullName != m_Weaver.NetworkBehaviourType.FullName) + { + // check for the first Awake() method in the hierarchy + var awake = t.Resolve().Methods.FirstOrDefault(x => x.Name == "Awake" && !x.HasParameters); + if (awake != null) + { + // if found, invoke it so we don't loose the behaviour by implicitly overriding Awake + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldarg_0)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Call, awake)); + return; + } + t = t.Resolve().BaseType; + } + } + + void GenerateSyncListInstanceInitializer(ILProcessor ctorWorker, FieldDefinition fd) + { + // check the ctor's instructions for an Stfld op-code for this specific sync list field. + foreach (var ins in ctorWorker.Body.Instructions) + { + if (ins.OpCode.Code == Code.Stfld) + { + var field = (FieldDefinition)ins.Operand; + if (field.DeclaringType == fd.DeclaringType && field.Name == fd.Name) + { + // Already initialized by the user in the field definition, e.g: + // public SyncListInt Foo = new SyncListInt(); + return; + } + } + } + + // Not initialized by the user in the field definition, e.g: + // public SyncListInt Foo; + var listCtor = m_Weaver.m_ScriptDef.MainModule.ImportReference(fd.FieldType.Resolve().Methods.First(x => x.Name == ".ctor" && !x.HasParameters)); + + ctorWorker.Append(ctorWorker.Create(OpCodes.Ldarg_0)); + ctorWorker.Append(ctorWorker.Create(OpCodes.Newobj, listCtor)); + ctorWorker.Append(ctorWorker.Create(OpCodes.Stfld, fd)); + } + + /* + // This generates code like: + NetworkBehaviour.RegisterCommandDelegate(base.GetType(), ShipControl.kCmdCmdThrust, new NetworkBehaviour.CmdDelegate(ShipControl.InvokeCmdCmdThrust)); + */ + void GenerateCommandDelegate(ILProcessor awakeWorker, MethodReference registerMethod, MethodDefinition func, FieldReference field) + { + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldtoken, m_td)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Call, m_Weaver.getTypeFromHandleReference)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldsfld, field)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldnull)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldftn, func)); + + awakeWorker.Append(awakeWorker.Create(OpCodes.Newobj, m_Weaver.CmdDelegateConstructor)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Call, registerMethod)); + } + + /* + // generates code like: + m_sizes.InitializeBehaviour(this, km_sizesCmdHash); + */ + void GenerateSyncListInitializer(ILProcessor awakeWorker, FieldReference fd, int index) + { + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldarg_0)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldfld, fd)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldarg_0)); + awakeWorker.Append(awakeWorker.Create(OpCodes.Ldsfld, m_SyncListStaticFields[index])); + + GenericInstanceType syncListGeneric = (GenericInstanceType)fd.FieldType.Resolve().BaseType; + syncListGeneric = (GenericInstanceType)m_Weaver.m_ScriptDef.MainModule.ImportReference(syncListGeneric); + + TypeReference listValueType = syncListGeneric.GenericArguments[0]; + MethodReference genericInitBehaviourMethod = Helpers.MakeHostInstanceGeneric(m_Weaver.SyncListInitBehaviourReference, listValueType); + awakeWorker.Append(awakeWorker.Create(OpCodes.Callvirt, genericInitBehaviourMethod)); + + m_Weaver.m_ScriptDef.MainModule.ImportReference(genericInitBehaviourMethod); + } + + void GenerateSerialization() + { + m_Weaver.DLog(m_td, " GenerateSerialization"); + + foreach (var m in m_td.Methods) + { + if (m.Name == "OnSerialize") + return; + } + + MethodDefinition serialize = new MethodDefinition("OnSerialize", MethodAttributes.Public | + MethodAttributes.Virtual | + MethodAttributes.HideBySig, + m_Weaver.boolType); + + serialize.Parameters.Add(new ParameterDefinition("writer", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkWriterType))); + serialize.Parameters.Add(new ParameterDefinition("forceAll", ParameterAttributes.None, m_Weaver.boolType)); + ILProcessor serWorker = serialize.Body.GetILProcessor(); + + + serialize.Body.InitLocals = true; + VariableDefinition dirtyLocal = new VariableDefinition(m_Weaver.boolType); + + serialize.Body.Variables.Add(dirtyLocal); + + // call base class + bool baseClassSerialize = false; + if (m_td.BaseType.FullName != m_Weaver.NetworkBehaviourType.FullName) + { + MethodReference baseSerialize = m_Weaver.ResolveMethod(m_td.BaseType, "OnSerialize"); + if (baseSerialize != null) + { + VariableDefinition baseResult = new VariableDefinition(m_Weaver.boolType); + serialize.Body.Variables.Add(baseResult); + + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); // base + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); // writer + serWorker.Append(serWorker.Create(OpCodes.Ldarg_2)); // forceAll + serWorker.Append(serWorker.Create(OpCodes.Call, baseSerialize)); + serWorker.Append(serWorker.Create(OpCodes.Stloc_1)); // set baseResult to result of base.OnSerialize() + baseClassSerialize = true; + } + } + + if (m_SyncVars.Count == 0) + { + if (baseClassSerialize) + { + serWorker.Append(serWorker.Create(OpCodes.Ldloc_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldloc_1)); + serWorker.Append(serWorker.Create(OpCodes.Or)); + } + else + { + serWorker.Append(serWorker.Create(OpCodes.Ldloc_0)); + } + serWorker.Append(serWorker.Create(OpCodes.Ret)); + m_td.Methods.Add(serialize); + return; + } + + // Generates: if (initialState); + Instruction initialStateLabel = serWorker.Create(OpCodes.Nop); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_2)); + serWorker.Append(serWorker.Create(OpCodes.Brfalse, initialStateLabel)); + + foreach (FieldDefinition syncVar in m_SyncVars) + { + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldfld, syncVar)); + MethodReference writeFunc = m_Weaver.GetWriteFunc(syncVar.FieldType); + if (writeFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Call, writeFunc)); + } + else + { + m_Weaver.fail = true; + Log.Error("GenerateSerialization for " + m_td.Name + " unknown type [" + syncVar.FieldType + "]. UNet [SyncVar] member variables must be basic types."); + return; + } + } + + serWorker.Append(serWorker.Create(OpCodes.Ldc_I4_1)); + serWorker.Append(serWorker.Create(OpCodes.Ret)); + + // Generates: end if (initialState); + serWorker.Append(initialStateLabel); + + // Generates: dirty = 0; + serWorker.Append(serWorker.Create(OpCodes.Ldc_I4_0)); + serWorker.Append(serWorker.Create(OpCodes.Stloc_0)); + + // write syncvars + int dirtyBit = m_Weaver.GetSyncVarStart(m_td.BaseType.FullName); // start at number of syncvars in parent + foreach (FieldDefinition syncVar in m_SyncVars) + { + Instruction varLabel = serWorker.Create(OpCodes.Nop); + + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Call, m_Weaver.NetworkBehaviourDirtyBitsReference)); + serWorker.Append(serWorker.Create(OpCodes.Ldc_I4, 1 << dirtyBit)); + serWorker.Append(serWorker.Create(OpCodes.And)); + serWorker.Append(serWorker.Create(OpCodes.Brfalse, varLabel)); + + WriteDirtyCheck(serWorker, true); + + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldfld, syncVar)); + + MethodReference writeFunc = m_Weaver.GetWriteFunc(syncVar.FieldType); + if (writeFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Call, writeFunc)); + } + else + { + Log.Error("GenerateSerialization for " + m_td.Name + " unknown type [" + syncVar.FieldType + "]. UNet [SyncVar] member variables must be basic types."); + m_Weaver.fail = true; + return; + } + serWorker.Append(varLabel); + dirtyBit += 1; + } + + WriteDirtyCheck(serWorker, false); + + if (m_Weaver.generateLogErrors) + { + serWorker.Append(serWorker.Create(OpCodes.Ldstr, "Injected Serialize " + m_td.Name)); + serWorker.Append(serWorker.Create(OpCodes.Call, m_Weaver.logErrorReference)); + } + + if (baseClassSerialize) + { + serWorker.Append(serWorker.Create(OpCodes.Ldloc_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldloc_1)); + serWorker.Append(serWorker.Create(OpCodes.Or)); + } + else + { + serWorker.Append(serWorker.Create(OpCodes.Ldloc_0)); + } + serWorker.Append(serWorker.Create(OpCodes.Ret)); + m_td.Methods.Add(serialize); + } + + void WriteDirtyCheck(ILProcessor serWorker, bool reset) + { + //m_Weaver.DLog(m_td, " GenerateSerialization dirtyCheck"); + + // Generates: if (!dirty) { write dirty bits, set dirty bool } + Instruction dirtyLabel = serWorker.Create(OpCodes.Nop); + serWorker.Append(serWorker.Create(OpCodes.Ldloc_0)); + + serWorker.Append(serWorker.Create(OpCodes.Brtrue, dirtyLabel)); + + // write dirty bits + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Call, m_Weaver.NetworkBehaviourDirtyBitsReference)); + serWorker.Append(serWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWritePacked32)); + if (reset) + { + serWorker.Append(serWorker.Create(OpCodes.Ldc_I4_1)); + serWorker.Append(serWorker.Create(OpCodes.Stloc_0)); + } + + // Generates: end if (!dirty) + serWorker.Append(dirtyLabel); + } + + int GetChannelId(FieldDefinition field) + { + int channel = 0; + foreach (var ca in field.CustomAttributes) + { + if (ca.AttributeType.FullName == m_Weaver.SyncVarType.FullName) + { + foreach (CustomAttributeNamedArgument customField in ca.Fields) + { + if (customField.Name == "channel") + { + channel = (int)customField.Argument.Value; + break; + } + } + } + } + return channel; + } + + // returns false for error, not for no-hook-exists + bool CheckForHookFunction(FieldDefinition syncVar, out MethodDefinition foundMethod) + { + foundMethod = null; + foreach (var ca in syncVar.CustomAttributes) + { + if (ca.AttributeType.FullName == m_Weaver.SyncVarType.FullName) + { + foreach (CustomAttributeNamedArgument customField in ca.Fields) + { + if (customField.Name == "hook") + { + string hookFunctionName = customField.Argument.Value as string; + + foreach (var m in m_td.Methods) + { + if (m.Name == hookFunctionName) + { + if (m.Parameters.Count == 1) + { + if (m.Parameters[0].ParameterType != syncVar.FieldType) + { + Log.Error("SyncVar Hook function " + hookFunctionName + " has wrong type signature for " + m_td.Name); + m_Weaver.fail = true; + return false; + } + foundMethod = m; + return true; + } + Log.Error("SyncVar Hook function " + hookFunctionName + " must have one argument " + m_td.Name); + m_Weaver.fail = true; + return false; + } + } + Log.Error("SyncVar Hook function " + hookFunctionName + " not found for " + m_td.Name); + m_Weaver.fail = true; + return false; + } + } + } + } + return true; + } + + void GenerateNetworkChannelSetting(int channel) + { + MethodDefinition meth = new MethodDefinition("GetNetworkChannel", MethodAttributes.Public | + MethodAttributes.Virtual | + MethodAttributes.HideBySig, + m_Weaver.int32Type); + + ILProcessor worker = meth.Body.GetILProcessor(); + + worker.Append(worker.Create(OpCodes.Ldc_I4, channel)); + worker.Append(worker.Create(OpCodes.Ret)); + m_td.Methods.Add(meth); + } + + void GenerateNetworkIntervalSetting(float interval) + { + MethodDefinition meth = new MethodDefinition("GetNetworkSendInterval", MethodAttributes.Public | + MethodAttributes.Virtual | + MethodAttributes.HideBySig, + m_Weaver.singleType); + + ILProcessor worker = meth.Body.GetILProcessor(); + + worker.Append(worker.Create(OpCodes.Ldc_R4, interval)); + worker.Append(worker.Create(OpCodes.Ret)); + m_td.Methods.Add(meth); + } + + void GenerateNetworkSettings() + { + // look for custom attribute + foreach (var ca in m_td.CustomAttributes) + { + if (ca.AttributeType.FullName == m_Weaver.NetworkSettingsType.FullName) + { + // generate virtual functions + foreach (var field in ca.Fields) + { + if (field.Name == "channel") + { + // 0 is Channels.DefaultChannel + if ((int)field.Argument.Value == 0) + continue; + + if (HasMethod("GetNetworkChannel")) + { + Log.Error( + "GetNetworkChannel, is already implemented, please make sure you either use NetworkSettings or GetNetworkChannel"); + m_Weaver.fail = true; + return; + } + m_QosChannel = (int)field.Argument.Value; + GenerateNetworkChannelSetting(m_QosChannel); + } + if (field.Name == "sendInterval") + { + const float stdValue = 0.1f; + const float epsilon = 0.00001f; + + if ((Math.Abs((float)field.Argument.Value - stdValue) <= epsilon)) + continue; + + if (HasMethod("GetNetworkSendInterval")) + { + Log.Error( + "GetNetworkSendInterval, is already implemented, please make sure you either use NetworkSettings or GetNetworkSendInterval"); + m_Weaver.fail = true; + return; + } + GenerateNetworkIntervalSetting((float)field.Argument.Value); + } + } + } + } + } + + void GeneratePreStartClient() + { + m_NetIdFieldCounter = 0; + MethodDefinition preStartMethod = null; + ILProcessor serWorker = null; + + foreach (var m in m_td.Methods) + { + if (m.Name == "PreStartClient") + return; + } + + preStartMethod = new MethodDefinition("PreStartClient", MethodAttributes.Public | + MethodAttributes.Virtual | + MethodAttributes.HideBySig, + m_Weaver.voidType); + serWorker = preStartMethod.Body.GetILProcessor(); + //Add base class + if (m_td.BaseType.FullName != m_Weaver.NetworkBehaviourType.FullName) + { + MethodReference basePreStartMethod = m_Weaver.ResolveMethod(m_td.BaseType, "PreStartClient"); + if (basePreStartMethod != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); // base + + serWorker.Append(serWorker.Create(OpCodes.Call, basePreStartMethod)); + } + } + if (m_SyncVars.Count == 0) + { + serWorker.Append(serWorker.Create(OpCodes.Ret)); + m_td.Methods.Add(preStartMethod); + return; + } + + foreach (FieldDefinition syncVar in m_SyncVars) + { + if (syncVar.FieldType.FullName == m_Weaver.gameObjectType.FullName) + { + FieldDefinition netIdField = m_SyncVarNetIds[m_NetIdFieldCounter]; + m_NetIdFieldCounter += 1; + + // Generates: if (!_crateNetId.IsEmpty()) { crate = ClientScene.FindLocalObject(_crateNetId); } + Instruction nullLabel = serWorker.Create(OpCodes.Nop); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldflda, netIdField)); + serWorker.Append(serWorker.Create(OpCodes.Call, m_Weaver.NetworkInstanceIsEmpty)); + serWorker.Append(serWorker.Create(OpCodes.Brtrue, nullLabel)); + + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldfld, netIdField)); + serWorker.Append(serWorker.Create(OpCodes.Call, m_Weaver.FindLocalObjectReference)); + + // return value of FindLocalObjectReference is on stack, assign it to the syncvar + serWorker.Append(serWorker.Create(OpCodes.Stfld, syncVar)); + + // Generates: end crateNetId != 0 + serWorker.Append(nullLabel); + } + } + if (preStartMethod != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ret)); + m_td.Methods.Add(preStartMethod); + } + } + + void GenerateDeSerialization() + { + m_Weaver.DLog(m_td, " GenerateDeSerialization"); + m_NetIdFieldCounter = 0; + + foreach (var m in m_td.Methods) + { + if (m.Name == "OnDeserialize") + return; + } + + MethodDefinition serialize = new MethodDefinition("OnDeserialize", MethodAttributes.Public | + MethodAttributes.Virtual | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + serialize.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkReaderType))); + serialize.Parameters.Add(new ParameterDefinition("initialState", ParameterAttributes.None, m_Weaver.boolType)); + ILProcessor serWorker = serialize.Body.GetILProcessor(); + + // call base class + if (m_td.BaseType.FullName != m_Weaver.NetworkBehaviourType.FullName) + { + MethodReference baseDeserialize = m_Weaver.ResolveMethod(m_td.BaseType, "OnDeserialize"); + if (baseDeserialize != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); // base + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); // reader + serWorker.Append(serWorker.Create(OpCodes.Ldarg_2)); // initialState + serWorker.Append(serWorker.Create(OpCodes.Call, baseDeserialize)); + } + } + + if (m_SyncVars.Count == 0) + { + serWorker.Append(serWorker.Create(OpCodes.Ret)); + m_td.Methods.Add(serialize); + return; + } + + // Generates: if (initialState); + Instruction initialStateLabel = serWorker.Create(OpCodes.Nop); + + serWorker.Append(serWorker.Create(OpCodes.Ldarg_2)); + serWorker.Append(serWorker.Create(OpCodes.Brfalse, initialStateLabel)); + + foreach (var syncVar in m_SyncVars) + { + MethodReference readByReferenceFunc = m_Weaver.GetReadByReferenceFunc(syncVar.FieldType); + if (readByReferenceFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldfld, syncVar)); + serWorker.Append(serWorker.Create(OpCodes.Call, readByReferenceFunc)); + } + else + { + // assign value + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + + if (syncVar.FieldType.FullName == m_Weaver.gameObjectType.FullName) + { + // GameObject SyncVar - assign to generated netId var + FieldDefinition netIdField = m_SyncVarNetIds[m_NetIdFieldCounter]; + m_NetIdFieldCounter += 1; + + serWorker.Append(serWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkReaderReadNetworkInstanceId)); + serWorker.Append(serWorker.Create(OpCodes.Stfld, netIdField)); + } + else + { + MethodReference readFunc = m_Weaver.GetReadFunc(syncVar.FieldType); + if (readFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Call, readFunc)); + } + else + { + Log.Error("GenerateDeSerialization for " + m_td.Name + " unknown type [" + syncVar.FieldType + "]. UNet [SyncVar] member variables must be basic types."); + m_Weaver.fail = true; + return; + } + serWorker.Append(serWorker.Create(OpCodes.Stfld, syncVar)); + } + } + } + + serWorker.Append(serWorker.Create(OpCodes.Ret)); + + // Generates: end if (initialState); + serWorker.Append(initialStateLabel); + + + // setup local for dirty bits + serialize.Body.InitLocals = true; + VariableDefinition dirtyBitsLocal = new VariableDefinition(m_Weaver.int32Type); + serialize.Body.Variables.Add(dirtyBitsLocal); + + // get dirty bits + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkReaderReadPacked32)); + serWorker.Append(serWorker.Create(OpCodes.Stloc_0)); + + // conditionally read each syncvar + int dirtyBit = m_Weaver.GetSyncVarStart(m_td.BaseType.FullName); // start at number of syncvars in parent + foreach (FieldDefinition syncVar in m_SyncVars) + { + Instruction varLabel = serWorker.Create(OpCodes.Nop); + + // check if dirty bit is set + serWorker.Append(serWorker.Create(OpCodes.Ldloc_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldc_I4, 1 << dirtyBit)); + serWorker.Append(serWorker.Create(OpCodes.And)); + serWorker.Append(serWorker.Create(OpCodes.Brfalse, varLabel)); + + MethodReference readByReferenceFunc = m_Weaver.GetReadByReferenceFunc(syncVar.FieldType); + if (readByReferenceFunc != null) + { + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldfld, syncVar)); + serWorker.Append(serWorker.Create(OpCodes.Call, readByReferenceFunc)); + } + else + { + MethodReference readFunc = m_Weaver.GetReadFunc(syncVar.FieldType); + if (readFunc == null) + { + Log.Error("GenerateDeSerialization for " + m_td.Name + " unknown type [" + syncVar.FieldType + "]. UNet [SyncVar] member variables must be basic types."); + m_Weaver.fail = true; + return; + } + + // check for Hook function + MethodDefinition foundMethod; + if (!CheckForHookFunction(syncVar, out foundMethod)) + { + return; + } + + if (foundMethod == null) + { + // just assign value + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Call, readFunc)); + serWorker.Append(serWorker.Create(OpCodes.Stfld, syncVar)); + } + else + { + // call hook instead + serWorker.Append(serWorker.Create(OpCodes.Ldarg_0)); + serWorker.Append(serWorker.Create(OpCodes.Ldarg_1)); + serWorker.Append(serWorker.Create(OpCodes.Call, readFunc)); + serWorker.Append(serWorker.Create(OpCodes.Call, foundMethod)); + } + } + serWorker.Append(varLabel); + dirtyBit += 1; + } + + if (m_Weaver.generateLogErrors) + { + serWorker.Append(serWorker.Create(OpCodes.Ldstr, "Injected Deserialize " + m_td.Name)); + serWorker.Append(serWorker.Create(OpCodes.Call, m_Weaver.logErrorReference)); + } + + serWorker.Append(serWorker.Create(OpCodes.Ret)); + m_td.Methods.Add(serialize); + } + + bool ProcessNetworkReaderParameters(MethodDefinition md, ILProcessor worker, bool skipFirst) + { + int count = 0; + + // read cmd args from NetworkReader + foreach (ParameterDefinition arg in md.Parameters) + { + if (count++ == 0 && skipFirst) + { + continue; + } + MethodReference readFunc = m_Weaver.GetReadFunc(arg.ParameterType); //? + + if (readFunc != null) + { + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Call, readFunc)); + + // conversion.. is this needed? + if (arg.ParameterType.FullName == m_Weaver.singleType.FullName) + { + worker.Append(worker.Create(OpCodes.Conv_R4)); + } + else if (arg.ParameterType.FullName == m_Weaver.doubleType.FullName) + { + worker.Append(worker.Create(OpCodes.Conv_R8)); + } + } + else + { + Log.Error("ProcessNetworkReaderParameters for " + m_td.Name + ":" + md.Name + " type " + arg.ParameterType + " not supported"); + m_Weaver.fail = true; + return false; + } + } + return true; + } + + /* + // generates code like: + protected static void InvokeCmdCmdThrust(NetworkBehaviour obj, NetworkReader reader) + { + if (!NetworkServer.active) + { + return; + } + ((ShipControl)obj).CmdThrust(reader.ReadSingle(), (int)reader.ReadPackedUInt32()); + } + */ + MethodDefinition ProcessCommandInvoke(MethodDefinition md) + { + MethodDefinition cmd = new MethodDefinition(k_CmdPrefix + md.Name, MethodAttributes.Family | + MethodAttributes.Static | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + ILProcessor cmdWorker = cmd.Body.GetILProcessor(); + Instruction label = cmdWorker.Create(OpCodes.Nop); + + WriteServerActiveCheck(cmdWorker, md.Name, label, "Command"); + + // setup for reader + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Castclass, m_td)); + + if (!ProcessNetworkReaderParameters(md, cmdWorker, false)) + return null; + + // invoke actual command function + cmdWorker.Append(cmdWorker.Create(OpCodes.Callvirt, md)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ret)); + + AddInvokeParameters(cmd.Parameters); + + return cmd; + } + + void AddInvokeParameters(ICollection collection) + { + collection.Add(new ParameterDefinition("obj", ParameterAttributes.None, m_Weaver.NetworkBehaviourType2)); + collection.Add(new ParameterDefinition("reader", ParameterAttributes.None, m_Weaver.m_ScriptDef.MainModule.ImportReference(m_Weaver.NetworkReaderType))); + } + + /* + // generates code like: + public void CallCmdThrust(float thrusting, int spin) + { + Debug.LogError("Call Command function CmdThrust"); + if (!NetworkClient.active) + { + Debug.LogError("Command function CmdThrust called on server."); + return; + } + + if (isServer) + { + // we are ON the server, invoke directly + CmdThrust(thrusting, spin); + return; + } + + NetworkWriter networkWriter = new NetworkWriter(); + networkWriter.Write(0); + networkWriter.Write((ushort)MsgType.SYSTEM_COMMAND); + networkWriter.WritePackedUInt32((uint)ShipControl.kCmdCmdThrust); + networkWriter.WritePackedUInt32((uint)playerId); + networkWriter.Write(thrusting); + networkWriter.WritePackedUInt32((uint)spin); + base.SendCommandInternal(networkWriter); + } + */ + MethodDefinition ProcessCommandCall(MethodDefinition md, CustomAttribute ca) + { + MethodDefinition cmd = new MethodDefinition("Call" + md.Name, MethodAttributes.Public | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + // add paramters + foreach (ParameterDefinition pd in md.Parameters) + { + cmd.Parameters.Add(new ParameterDefinition(pd.Name, ParameterAttributes.None, pd.ParameterType)); + } + + ILProcessor cmdWorker = cmd.Body.GetILProcessor(); + Instruction label = cmdWorker.Create(OpCodes.Nop); + + WriteSetupLocals(cmdWorker); + + if (m_Weaver.generateLogErrors) + { + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldstr, "Call Command function " + md.Name)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Call, m_Weaver.logErrorReference)); + } + + WriteClientActiveCheck(cmdWorker, md.Name, label, "Command function"); + + // local client check + + Instruction localClientLabel = cmdWorker.Create(OpCodes.Nop); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Call, m_Weaver.UBehaviourIsServer)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Brfalse, localClientLabel)); + + // call the cmd function directly. + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0)); + for (int i = 0; i < md.Parameters.Count; i++) + { + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg, i + 1)); + } + cmdWorker.Append(cmdWorker.Create(OpCodes.Call, md)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ret)); + cmdWorker.Append(localClientLabel); + + WriteCreateWriter(cmdWorker); + + WriteMessageSize(cmdWorker); + + WriteMessageId(cmdWorker, 5); //UNetwork.SYSTEM_COMMAND + + // create the command id constant + FieldDefinition cmdConstant = new FieldDefinition("kCmd" + md.Name, + FieldAttributes.Static | FieldAttributes.Private, + m_Weaver.int32Type); + m_td.Fields.Add(cmdConstant); + + // write command constant + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldloc_0)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldsfld, cmdConstant)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWritePacked32)); + + // write playerId from this NetworkBehaviour + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldloc_0)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0)); + // load unetviewfield + cmdWorker.Append(cmdWorker.Create(OpCodes.Call, m_Weaver.getComponentReference)); + // load and write netId field + cmdWorker.Append(cmdWorker.Create(OpCodes.Callvirt, m_Weaver.getUNetIdReference)); + + var writeFunc = m_Weaver.GetWriteFunc(m_Weaver.NetworkInstanceIdType); + cmdWorker.Append(cmdWorker.Create(OpCodes.Callvirt, writeFunc)); + + if (!WriteArguments(cmdWorker, md, "Command", false)) + return null; + + // find channel for Command + int channel = 0; + foreach (var field in ca.Fields) + { + if (field.Name == "channel") + { + channel = (int)field.Argument.Value; + } + } + + var cmdName = md.Name; + int index = cmdName.IndexOf(k_CmdPrefix); + if (index > -1) + { + cmdName = cmdName.Substring(k_CmdPrefix.Length); + } + + // invoke interal send and return + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldloc_0)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldc_I4, channel)); // QoS transport channel (reliable/unreliable) + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldstr, cmdName)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Call, m_Weaver.sendCommandInternal)); + + cmdWorker.Append(cmdWorker.Create(OpCodes.Ret)); + + return cmd; + } + + MethodDefinition ProcessTargetRpcInvoke(MethodDefinition md) + { + MethodDefinition rpc = new MethodDefinition(k_RpcPrefix + md.Name, MethodAttributes.Family | + MethodAttributes.Static | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + ILProcessor rpcWorker = rpc.Body.GetILProcessor(); + Instruction label = rpcWorker.Create(OpCodes.Nop); + + WriteClientActiveCheck(rpcWorker, md.Name, label, "TargetRPC"); + + // setup for reader + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldarg_0)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Castclass, m_td)); + + //ClientScene.readyconnection + rpcWorker.Append(rpcWorker.Create(OpCodes.Call, m_Weaver.ReadyConnectionReference)); + + if (!ProcessNetworkReaderParameters(md, rpcWorker, true)) + return null; + + // invoke actual command function + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, md)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Ret)); + + AddInvokeParameters(rpc.Parameters); + + return rpc; + } + + MethodDefinition ProcessRpcInvoke(MethodDefinition md) + { + MethodDefinition rpc = new MethodDefinition(k_RpcPrefix + md.Name, MethodAttributes.Family | + MethodAttributes.Static | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + ILProcessor rpcWorker = rpc.Body.GetILProcessor(); + Instruction label = rpcWorker.Create(OpCodes.Nop); + + WriteClientActiveCheck(rpcWorker, md.Name, label, "RPC"); + + // setup for reader + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldarg_0)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Castclass, m_td)); + + if (!ProcessNetworkReaderParameters(md, rpcWorker, false)) + return null; + + // invoke actual command function + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, md)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Ret)); + + AddInvokeParameters(rpc.Parameters); + + return rpc; + } + + MethodDefinition ProcessTargetRpcCall(MethodDefinition md, CustomAttribute ca) + { + MethodDefinition rpc = new MethodDefinition("Call" + md.Name, MethodAttributes.Public | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + // add paramters + foreach (ParameterDefinition pd in md.Parameters) + { + rpc.Parameters.Add(new ParameterDefinition(pd.Name, ParameterAttributes.None, pd.ParameterType)); + } + + ILProcessor rpcWorker = rpc.Body.GetILProcessor(); + Instruction label = rpcWorker.Create(OpCodes.Nop); + + WriteSetupLocals(rpcWorker); + + WriteServerActiveCheck(rpcWorker, md.Name, label, "TargetRPC Function"); + + Instruction labelConnectionCheck = rpcWorker.Create(OpCodes.Nop); + + // check specifically for ULocalConnectionToServer so a host is not trying to send + // an TargetRPC to the "server" from it's local client. + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldarg_1)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Isinst, m_Weaver.ULocalConnectionToServerType)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Brfalse, labelConnectionCheck)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldstr, string.Format("TargetRPC Function {0} called on connection to server", md.Name))); + rpcWorker.Append(rpcWorker.Create(OpCodes.Call, m_Weaver.logErrorReference)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Ret)); + rpcWorker.Append(labelConnectionCheck); + + WriteCreateWriter(rpcWorker); + + WriteMessageSize(rpcWorker); + + WriteMessageId(rpcWorker, 2); // UNetwork.SYSTEM_RPC + + // create the command id constant + FieldDefinition rpcConstant = new FieldDefinition("kTargetRpc" + md.Name, + FieldAttributes.Static | FieldAttributes.Private, + m_Weaver.int32Type); + m_td.Fields.Add(rpcConstant); + + // write command constant + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldloc_0)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldsfld, rpcConstant)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWritePacked32)); + + // write this.unetView.netId + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldloc_0)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldarg_0)); + // load unetviewfield + rpcWorker.Append(rpcWorker.Create(OpCodes.Call, m_Weaver.getComponentReference)); + // load and write netId field + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, m_Weaver.getUNetIdReference)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWriteNetworkInstanceId)); + + if (!WriteArguments(rpcWorker, md, "TargetRPC", true)) + return null; + + // find channel for SyncEvent + int channel = 0; + foreach (var field in ca.Fields) + { + if (field.Name == "channel") + { + channel = (int)field.Argument.Value; + } + } + + var rpcName = md.Name; + int index = rpcName.IndexOf(k_TargetRpcPrefix); + if (index > -1) + { + rpcName = rpcName.Substring(k_TargetRpcPrefix.Length); + } + + // invoke SendInternal and return + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldarg_0)); // this + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldarg_1)); // connection + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldloc_0)); // writer + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldc_I4, channel)); // QoS transport channel (reliable/unreliable) + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldstr, rpcName)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, m_Weaver.sendTargetRpcInternal)); + + rpcWorker.Append(rpcWorker.Create(OpCodes.Ret)); + + return rpc; + } + + MethodDefinition ProcessRpcCall(MethodDefinition md, CustomAttribute ca) + { + MethodDefinition rpc = new MethodDefinition("Call" + md.Name, MethodAttributes.Public | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + // add paramters + foreach (ParameterDefinition pd in md.Parameters) + { + rpc.Parameters.Add(new ParameterDefinition(pd.Name, ParameterAttributes.None, pd.ParameterType)); + } + + ILProcessor rpcWorker = rpc.Body.GetILProcessor(); + Instruction label = rpcWorker.Create(OpCodes.Nop); + + WriteSetupLocals(rpcWorker); + + WriteServerActiveCheck(rpcWorker, md.Name, label, "RPC Function"); + + WriteCreateWriter(rpcWorker); + + WriteMessageSize(rpcWorker); + + WriteMessageId(rpcWorker, 2); // UNetwork.SYSTEM_RPC + + // create the command id constant + FieldDefinition rpcConstant = new FieldDefinition("kRpc" + md.Name, + FieldAttributes.Static | FieldAttributes.Private, + m_Weaver.int32Type); + m_td.Fields.Add(rpcConstant); + + // write command constant + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldloc_0)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldsfld, rpcConstant)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWritePacked32)); + + // write this.unetView.netId + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldloc_0)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldarg_0)); + // load unetviewfield + rpcWorker.Append(rpcWorker.Create(OpCodes.Call, m_Weaver.getComponentReference)); + // load and write netId field + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, m_Weaver.getUNetIdReference)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWriteNetworkInstanceId)); + + if (!WriteArguments(rpcWorker, md, "RPC", false)) + return null; + + // find channel for SyncEvent + int channel = 0; + foreach (var field in ca.Fields) + { + if (field.Name == "channel") + { + channel = (int)field.Argument.Value; + } + } + + var rpcName = md.Name; + int index = rpcName.IndexOf(k_RpcPrefix); + if (index > -1) + { + rpcName = rpcName.Substring(k_RpcPrefix.Length); + } + + // invoke SendInternal and return + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldarg_0)); // this + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldloc_0)); // writer + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldc_I4, channel)); // QoS transport channel (reliable/unreliable) + rpcWorker.Append(rpcWorker.Create(OpCodes.Ldstr, rpcName)); + rpcWorker.Append(rpcWorker.Create(OpCodes.Callvirt, m_Weaver.sendRpcInternal)); + + rpcWorker.Append(rpcWorker.Create(OpCodes.Ret)); + + return rpc; + } + + bool ProcessMethodsValidateFunction(MethodReference md, CustomAttribute ca, string actionType) + { + if (md.ReturnType.FullName == m_Weaver.IEnumeratorType.FullName) + { + Log.Error(actionType + " function [" + m_td.FullName + ":" + md.Name + "] cannot be a coroutine"); + m_Weaver.fail = true; + return false; + } + if (md.ReturnType.FullName != m_Weaver.voidType.FullName) + { + Log.Error(actionType + " function [" + m_td.FullName + ":" + md.Name + "] must have a void return type."); + m_Weaver.fail = true; + return false; + } + if (md.HasGenericParameters) + { + Log.Error(actionType + " [" + m_td.FullName + ":" + md.Name + "] cannot have generic parameters"); + m_Weaver.fail = true; + return false; + } + return true; + } + + bool ProcessMethodsValidateParameters(MethodReference md, CustomAttribute ca, string actionType) + { + for (int i = 0; i < md.Parameters.Count; ++i) + { + var p = md.Parameters[i]; + if (p.IsOut) + { + Log.Error(actionType + " function [" + m_td.FullName + ":" + md.Name + "] cannot have out parameters"); + m_Weaver.fail = true; + return false; + } + if (p.IsOptional) + { + Log.Error(actionType + "function [" + m_td.FullName + ":" + md.Name + "] cannot have optional parameters"); + m_Weaver.fail = true; + return false; + } + if (p.ParameterType.Resolve().IsAbstract) + { + Log.Error(actionType + " function [" + m_td.FullName + ":" + md.Name + "] cannot have abstract parameters"); + m_Weaver.fail = true; + return false; + } + if (p.ParameterType.IsByReference) + { + Log.Error(actionType + " function [" + m_td.FullName + ":" + md.Name + "] cannot have ref parameters"); + m_Weaver.fail = true; + return false; + } + // TargetRPC is an exception to this rule and can have a NetworkConnection as first parameter + if (p.ParameterType.FullName == m_Weaver.NetworkConnectionType.FullName && + !(ca.AttributeType.FullName == m_Weaver.TargetRpcType.FullName && i == 0)) + { + Log.Error(actionType + " [" + m_td.FullName + ":" + md.Name + "] cannot use a NetworkConnection as a parameter. To access a player object's connection on the server use connectionToClient"); + Log.Error("Name: " + ca.AttributeType.FullName + " parameter: " + md.Parameters[0].ParameterType.FullName); + m_Weaver.fail = true; + return false; + } + if (m_Weaver.IsDerivedFrom(p.ParameterType.Resolve(), m_Weaver.ComponentType)) + { + if (p.ParameterType.FullName != m_Weaver.NetworkIdentityType.FullName) + { + Log.Error(actionType + " function [" + m_td.FullName + ":" + md.Name + "] parameter [" + p.Name + + "] is of the type [" + + p.ParameterType.Name + + "] which is a Component. You cannot pass a Component to a remote call. Try passing data from within the component."); + m_Weaver.fail = true; + return false; + } + } + } + return true; + } + + private bool ProcessMethodsValidateCommand(MethodDefinition md, CustomAttribute ca) + { + if (md.Name.Length > 2 && md.Name.Substring(0, 3) != "Cmd") + { + Log.Error("Command function [" + m_td.FullName + ":" + md.Name + "] doesnt have 'Cmd' prefix"); + m_Weaver.fail = true; + return false; + } + + if (md.IsStatic) + { + Log.Error("Command function [" + m_td.FullName + ":" + md.Name + "] cant be a static method"); + m_Weaver.fail = true; + return false; + } + + if (!ProcessMethodsValidateFunction(md, ca, "Command")) + { + return false; + } + + if (!ProcessMethodsValidateParameters(md, ca, "Command")) + { + return false; + } + return true; + } + + bool ProcessMethodsValidateTargetRpc(MethodDefinition md, CustomAttribute ca) + { + const string targetPrefix = "Target"; + int prefixLen = targetPrefix.Length; + + if (md.Name.Length > prefixLen && md.Name.Substring(0, prefixLen) != targetPrefix) + { + Log.Error("Target Rpc function [" + m_td.FullName + ":" + md.Name + "] doesnt have 'Target' prefix"); + m_Weaver.fail = true; + return false; + } + + if (md.IsStatic) + { + Log.Error("TargetRpc function [" + m_td.FullName + ":" + md.Name + "] cant be a static method"); + m_Weaver.fail = true; + return false; + } + + if (!ProcessMethodsValidateFunction(md, ca, "Target Rpc")) + { + return false; + } + + if (md.Parameters.Count < 1) + { + Log.Error("Target Rpc function [" + m_td.FullName + ":" + md.Name + "] must have a NetworkConnection as the first parameter"); + m_Weaver.fail = true; + return false; + } + + if (md.Parameters[0].ParameterType.FullName != m_Weaver.NetworkConnectionType.FullName) + { + Log.Error("Target Rpc function [" + m_td.FullName + ":" + md.Name + "] first parameter must be a NetworkConnection"); + m_Weaver.fail = true; + return false; + } + + if (!ProcessMethodsValidateParameters(md, ca, "Target Rpc")) + { + return false; + } + return true; + } + + bool ProcessMethodsValidateRpc(MethodDefinition md, CustomAttribute ca) + { + if (md.Name.Length > 2 && md.Name.Substring(0, 3) != "Rpc") + { + Log.Error("Rpc function [" + m_td.FullName + ":" + md.Name + "] doesnt have 'Rpc' prefix"); + m_Weaver.fail = true; + return false; + } + + if (md.IsStatic) + { + Log.Error("ClientRpc function [" + m_td.FullName + ":" + md.Name + "] cant be a static method"); + m_Weaver.fail = true; + return false; + } + + if (!ProcessMethodsValidateFunction(md, ca, "Rpc")) + { + return false; + } + + if (!ProcessMethodsValidateParameters(md, ca, "Rpc")) + { + return false; + } + return true; + } + + void ProcessMethods() + { + HashSet names = new HashSet(); + + // find command and RPC functions + foreach (MethodDefinition md in m_td.Methods) + { + m_Weaver.ResetRecursionCount(); + foreach (var ca in md.CustomAttributes) + { + if (ca.AttributeType.FullName == m_Weaver.CommandType.FullName) + { + if (!ProcessMethodsValidateCommand(md, ca)) + return; + + if (names.Contains(md.Name)) + { + Log.Error("Duplicate Command name [" + m_td.FullName + ":" + md.Name + "]"); + m_Weaver.fail = true; + return; + } + names.Add(md.Name); + m_Cmds.Add(md); + + MethodDefinition cmdFunc = ProcessCommandInvoke(md); + if (cmdFunc != null) + { + m_CmdInvocationFuncs.Add(cmdFunc); + } + + MethodDefinition cmdCallFunc = ProcessCommandCall(md, ca); + if (cmdCallFunc != null) + { + m_CmdCallFuncs.Add(cmdCallFunc); + m_Weaver.lists.replacedMethods.Add(md); + m_Weaver.lists.replacementMethods.Add(cmdCallFunc); + } + break; + } + + if (ca.AttributeType.FullName == m_Weaver.TargetRpcType.FullName) + { + if (!ProcessMethodsValidateTargetRpc(md, ca)) + return; + + if (names.Contains(md.Name)) + { + Log.Error("Duplicate Target Rpc name [" + m_td.FullName + ":" + md.Name + "]"); + m_Weaver.fail = true; + return; + } + names.Add(md.Name); + m_TargetRpcs.Add(md); + + MethodDefinition rpcFunc = ProcessTargetRpcInvoke(md); + if (rpcFunc != null) + { + m_TargetRpcInvocationFuncs.Add(rpcFunc); + } + + MethodDefinition rpcCallFunc = ProcessTargetRpcCall(md, ca); + if (rpcCallFunc != null) + { + m_TargetRpcCallFuncs.Add(rpcCallFunc); + m_Weaver.lists.replacedMethods.Add(md); + m_Weaver.lists.replacementMethods.Add(rpcCallFunc); + } + break; + } + + if (ca.AttributeType.FullName == m_Weaver.ClientRpcType.FullName) + { + if (!ProcessMethodsValidateRpc(md, ca)) + return; + + if (names.Contains(md.Name)) + { + Log.Error("Duplicate ClientRpc name [" + m_td.FullName + ":" + md.Name + "]"); + m_Weaver.fail = true; + return; + } + names.Add(md.Name); + m_Rpcs.Add(md); + + MethodDefinition rpcFunc = ProcessRpcInvoke(md); + if (rpcFunc != null) + { + m_RpcInvocationFuncs.Add(rpcFunc); + } + + MethodDefinition rpcCallFunc = ProcessRpcCall(md, ca); + if (rpcCallFunc != null) + { + m_RpcCallFuncs.Add(rpcCallFunc); + m_Weaver.lists.replacedMethods.Add(md); + m_Weaver.lists.replacementMethods.Add(rpcCallFunc); + } + break; + } + } + } + + // cmds + foreach (MethodDefinition md in m_CmdInvocationFuncs) + { + m_td.Methods.Add(md); + } + foreach (MethodDefinition md in m_CmdCallFuncs) + { + m_td.Methods.Add(md); + } + + // rpcs + foreach (MethodDefinition md in m_RpcInvocationFuncs) + { + m_td.Methods.Add(md); + } + foreach (MethodDefinition md in m_TargetRpcInvocationFuncs) + { + m_td.Methods.Add(md); + } + foreach (MethodDefinition md in m_RpcCallFuncs) + { + m_td.Methods.Add(md); + } + foreach (MethodDefinition md in m_TargetRpcCallFuncs) + { + m_td.Methods.Add(md); + } + } + + MethodDefinition ProcessEventInvoke(EventDefinition ed) + { + // find the field that matches the event + FieldDefinition eventField = null; + foreach (FieldDefinition fd in m_td.Fields) + { + if (fd.FullName == ed.FullName) + { + eventField = fd; + break; + } + } + if (eventField == null) + { + m_Weaver.DLog(m_td, "ERROR: no event field?!"); + m_Weaver.fail = true; + return null; + } + + MethodDefinition cmd = new MethodDefinition("InvokeSyncEvent" + ed.Name, MethodAttributes.Family | + MethodAttributes.Static | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + ILProcessor cmdWorker = cmd.Body.GetILProcessor(); + Instruction label1 = cmdWorker.Create(OpCodes.Nop); + Instruction label2 = cmdWorker.Create(OpCodes.Nop); + + WriteClientActiveCheck(cmdWorker, ed.Name, label1, "Event"); + + // null event check + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Castclass, m_td)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldfld, eventField)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Brtrue, label2)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ret)); + cmdWorker.Append(label2); + + // setup reader + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Castclass, m_td)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ldfld, eventField)); + + // read the event arguments + MethodReference invoke = m_Weaver.ResolveMethod(eventField.FieldType, "Invoke"); + if (!ProcessNetworkReaderParameters(invoke.Resolve(), cmdWorker, false)) + return null; + + // invoke actual event delegate function + cmdWorker.Append(cmdWorker.Create(OpCodes.Callvirt, invoke)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Ret)); + + AddInvokeParameters(cmd.Parameters); + + return cmd; + } + + MethodDefinition ProcessEventCall(EventDefinition ed, CustomAttribute ca) + { + MethodReference invoke = m_Weaver.ResolveMethod(ed.EventType, "Invoke"); + MethodDefinition evt = new MethodDefinition("Call" + ed.Name, MethodAttributes.Public | + MethodAttributes.HideBySig, + m_Weaver.voidType); + // add paramters + foreach (ParameterDefinition pd in invoke.Parameters) + { + evt.Parameters.Add(new ParameterDefinition(pd.Name, ParameterAttributes.None, pd.ParameterType)); + } + + ILProcessor evtWorker = evt.Body.GetILProcessor(); + Instruction label = evtWorker.Create(OpCodes.Nop); + + WriteSetupLocals(evtWorker); + + WriteServerActiveCheck(evtWorker, ed.Name, label, "Event"); + + WriteCreateWriter(evtWorker); + + WriteMessageSize(evtWorker); + + WriteMessageId(evtWorker, 7); //UNetwork.SYSTEM_SYNCEVENT + + // create the command id constant + FieldDefinition evtConstant = new FieldDefinition("kEvent" + ed.Name, + FieldAttributes.Static | FieldAttributes.Private, + m_Weaver.int32Type); + m_td.Fields.Add(evtConstant); + + // write command constant + evtWorker.Append(evtWorker.Create(OpCodes.Ldloc_0)); // networkWriter + evtWorker.Append(evtWorker.Create(OpCodes.Ldsfld, evtConstant)); + evtWorker.Append(evtWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWritePacked32)); + + // write this.unetView.netId + evtWorker.Append(evtWorker.Create(OpCodes.Ldloc_0)); // networkWriter + evtWorker.Append(evtWorker.Create(OpCodes.Ldarg_0)); // this + evtWorker.Append(evtWorker.Create(OpCodes.Call, m_Weaver.getComponentReference)); // unetView + // load and write netId field + evtWorker.Append(evtWorker.Create(OpCodes.Callvirt, m_Weaver.getUNetIdReference)); // netId + evtWorker.Append(evtWorker.Create(OpCodes.Callvirt, m_Weaver.NetworkWriterWriteNetworkInstanceId)); // networkWriter.Write(this.unetView.netId) + + if (!WriteArguments(evtWorker, invoke.Resolve(), "SyncEvent", false)) + return null; + + // find channel for ClientRpc + int channel = 0; + foreach (var field in ca.Fields) + { + if (field.Name == "channel") + { + channel = (int)field.Argument.Value; + } + } + + // invoke interal send and return + evtWorker.Append(evtWorker.Create(OpCodes.Ldarg_0)); // this + evtWorker.Append(evtWorker.Create(OpCodes.Ldloc_0)); // writer + evtWorker.Append(evtWorker.Create(OpCodes.Ldc_I4, channel)); // QoS transport channel (reliable/unreliable) + evtWorker.Append(evtWorker.Create(OpCodes.Ldstr, ed.Name)); + evtWorker.Append(evtWorker.Create(OpCodes.Call, m_Weaver.sendEventInternal)); + + evtWorker.Append(evtWorker.Create(OpCodes.Ret)); + + return evt; + } + + void ProcessEvents() + { + // find events + foreach (EventDefinition ed in m_td.Events) + { + foreach (var ca in ed.CustomAttributes) + { + if (ca.AttributeType.FullName == m_Weaver.SyncEventType.FullName) + { + if (ed.Name.Length > 4 && ed.Name.Substring(0, 5) != "Event") + { + Log.Error("Event [" + m_td.FullName + ":" + ed.FullName + "] doesnt have 'Event' prefix"); + m_Weaver.fail = true; + return; + } + + if (ed.EventType.Resolve().HasGenericParameters) + { + Log.Error("Event [" + m_td.FullName + ":" + ed.FullName + "] cannot have generic parameters"); + m_Weaver.fail = true; + return; + } + + m_Events.Add(ed); + MethodDefinition eventFunc = ProcessEventInvoke(ed); + if (eventFunc == null) + { + return; + } + + m_td.Methods.Add(eventFunc); + m_EventInvocationFuncs.Add(eventFunc); + + m_Weaver.DLog(m_td, "ProcessEvent " + ed); + + MethodDefinition eventCallFunc = ProcessEventCall(ed, ca); + m_td.Methods.Add(eventCallFunc); + + m_Weaver.lists.replacedEvents.Add(ed); + m_Weaver.lists.replacementEvents.Add(eventCallFunc); + + m_Weaver.DLog(m_td, " Event: " + ed.Name); + break; + } + } + } + } + + static MethodDefinition ProcessSyncVarGet(FieldDefinition fd, string originalName) + { + //Create the get method + MethodDefinition get = new MethodDefinition( + "get_Network" + originalName, MethodAttributes.Public | + MethodAttributes.SpecialName | + MethodAttributes.HideBySig, + fd.FieldType); + + ILProcessor getWorker = get.Body.GetILProcessor(); + + getWorker.Append(getWorker.Create(OpCodes.Ldarg_0)); + getWorker.Append(getWorker.Create(OpCodes.Ldfld, fd)); + getWorker.Append(getWorker.Create(OpCodes.Ret)); + + get.Body.Variables.Add(new VariableDefinition(fd.FieldType)); + get.Body.InitLocals = true; + get.SemanticsAttributes = MethodSemanticsAttributes.Getter; + + return get; + } + + MethodDefinition ProcessSyncVarSet(FieldDefinition fd, string originalName, int dirtyBit, FieldDefinition netFieldId) + { + //Create the set method + MethodDefinition set = new MethodDefinition("set_Network" + originalName, MethodAttributes.Public | + MethodAttributes.SpecialName | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + ILProcessor setWorker = set.Body.GetILProcessor(); + + // this + setWorker.Append(setWorker.Create(OpCodes.Ldarg_0)); + + // new value to set + setWorker.Append(setWorker.Create(OpCodes.Ldarg_1)); + + // reference to field to set + setWorker.Append(setWorker.Create(OpCodes.Ldarg_0)); + setWorker.Append(setWorker.Create(OpCodes.Ldflda, fd)); + + // dirty bit + setWorker.Append(setWorker.Create(OpCodes.Ldc_I4, dirtyBit)); + + MethodDefinition hookFunctionMethod; + CheckForHookFunction(fd, out hookFunctionMethod); + + if (hookFunctionMethod != null) + { + //if (NetworkServer.localClientActive && !syncVarHookGuard) + Instruction label = setWorker.Create(OpCodes.Nop); + setWorker.Append(setWorker.Create(OpCodes.Call, m_Weaver.NetworkServerGetLocalClientActive)); + setWorker.Append(setWorker.Create(OpCodes.Brfalse, label)); + setWorker.Append(setWorker.Create(OpCodes.Ldarg_0)); + setWorker.Append(setWorker.Create(OpCodes.Call, m_Weaver.getSyncVarHookGuard)); + setWorker.Append(setWorker.Create(OpCodes.Brtrue, label)); + + // syncVarHookGuard = true; + setWorker.Append(setWorker.Create(OpCodes.Ldarg_0)); + setWorker.Append(setWorker.Create(OpCodes.Ldc_I4_1)); + setWorker.Append(setWorker.Create(OpCodes.Call, m_Weaver.setSyncVarHookGuard)); + + // call hook + setWorker.Append(setWorker.Create(OpCodes.Ldarg_0)); + setWorker.Append(setWorker.Create(OpCodes.Ldarg_1)); + setWorker.Append(setWorker.Create(OpCodes.Call, hookFunctionMethod)); + + // syncVarHookGuard = false; + setWorker.Append(setWorker.Create(OpCodes.Ldarg_0)); + setWorker.Append(setWorker.Create(OpCodes.Ldc_I4_0)); + setWorker.Append(setWorker.Create(OpCodes.Call, m_Weaver.setSyncVarHookGuard)); + + setWorker.Append(label); + } + + if (fd.FieldType.FullName == m_Weaver.gameObjectType.FullName) + { + // reference to netId Field to set + setWorker.Append(setWorker.Create(OpCodes.Ldarg_0)); + setWorker.Append(setWorker.Create(OpCodes.Ldflda, netFieldId)); + + setWorker.Append(setWorker.Create(OpCodes.Call, m_Weaver.setSyncVarGameObjectReference)); + } + else + { + // make generic version of SetSyncVar with field type + GenericInstanceMethod gm = new GenericInstanceMethod(m_Weaver.setSyncVarReference); + gm.GenericArguments.Add(fd.FieldType); + + // invoke SetSyncVar + setWorker.Append(setWorker.Create(OpCodes.Call, gm)); + } + + setWorker.Append(setWorker.Create(OpCodes.Ret)); + + set.Parameters.Add(new ParameterDefinition("value", ParameterAttributes.In, fd.FieldType)); + set.SemanticsAttributes = MethodSemanticsAttributes.Setter; + + return set; + } + + void ProcessSyncVar(FieldDefinition fd, int dirtyBit) + { + string originalName = fd.Name; + + m_Weaver.lists.replacedFields.Add(fd); + m_Weaver.DLog(m_td, "Sync Var " + fd.Name + " " + fd.FieldType + " " + m_Weaver.gameObjectType); + + // GameObject SyncVars have a new field for netId + FieldDefinition netFieldId = null; + if (fd.FieldType.FullName == m_Weaver.gameObjectType.FullName) + { + netFieldId = new FieldDefinition("___" + fd.Name + "NetId", + FieldAttributes.Private, + m_Weaver.NetworkInstanceIdType); + + m_SyncVarNetIds.Add(netFieldId); + m_Weaver.lists.netIdFields.Add(netFieldId); + } + + var get = ProcessSyncVarGet(fd, originalName); + var set = ProcessSyncVarSet(fd, originalName, dirtyBit, netFieldId); + + //NOTE: is property even needed? Could just use a setter function? + //create the property + PropertyDefinition propertyDefinition = new PropertyDefinition("Network" + originalName, PropertyAttributes.None, fd.FieldType) + { + GetMethod = get, SetMethod = set + }; + + //add the methods and property to the type. + m_td.Methods.Add(get); + m_td.Methods.Add(set); + m_td.Properties.Add(propertyDefinition); + m_Weaver.lists.replacementProperties.Add(set); + } + + /* + Generates code like: + // SyncListTestPlayerBehaviour + protected static void InvokeSyncListm_ints(NetworkBehaviour obj, NetworkReader reader) + { + if (!NetworkClient.active) + { + Debug.LogError("SyncList m_ints called on server."); + return; + } + ((SyncListTestPlayerBehaviour)obj).m_ints.HandleMsg(reader); + } + */ + MethodDefinition ProcessSyncListInvoke(FieldDefinition fd) + { + MethodDefinition cmd = new MethodDefinition("InvokeSyncList" + fd.Name, MethodAttributes.Family | + MethodAttributes.Static | + MethodAttributes.HideBySig, + m_Weaver.voidType); + + ILProcessor syncList = cmd.Body.GetILProcessor(); + Instruction label = syncList.Create(OpCodes.Nop); + + + WriteClientActiveCheck(syncList, fd.Name, label, "SyncList"); + + + syncList.Append(syncList.Create(OpCodes.Ldarg_0)); //this + syncList.Append(syncList.Create(OpCodes.Castclass, fd.DeclaringType)); + syncList.Append(syncList.Create(OpCodes.Ldfld, fd)); // list field + syncList.Append(syncList.Create(OpCodes.Ldarg_1)); // reader + + // make specialized version of HandleMsg + GenericInstanceType syncListGeneric = (GenericInstanceType)fd.FieldType.Resolve().BaseType; + syncListGeneric = (GenericInstanceType)m_Weaver.m_ScriptDef.MainModule.ImportReference(syncListGeneric); + TypeReference listValueType = syncListGeneric.GenericArguments[0]; + MethodReference genericHandleMsgMethod = Helpers.MakeHostInstanceGeneric(m_Weaver.SyncListInitHandleMsg, listValueType); + syncList.Append(syncList.Create(OpCodes.Callvirt, genericHandleMsgMethod)); + + syncList.Append(syncList.Create(OpCodes.Ret)); + + AddInvokeParameters(cmd.Parameters); + + return cmd; + } + + FieldDefinition ProcessSyncList(FieldDefinition fd, int dirtyBit) + { + MethodDefinition syncListFunc = ProcessSyncListInvoke(fd); + m_SyncListInvocationFuncs.Add(syncListFunc); + + // create the command id constant + return new FieldDefinition("kList" + fd.Name, + FieldAttributes.Static | FieldAttributes.Private, + m_Weaver.int32Type); + } + + void ProcessSyncVars() + { + int numSyncVars = 0; + + // the mapping of dirtybits to sync-vars is implicit in the order of the fields here. this order is recorded in m_replacementProperties. + // start assigning syncvars at the place the base class stopped, if any + int dirtyBitCounter = m_Weaver.GetSyncVarStart(m_td.BaseType.FullName); + + m_SyncVarNetIds.Clear(); + List listFields = new List(); + + // find syncvars + foreach (FieldDefinition fd in m_td.Fields) + { + foreach (var ca in fd.CustomAttributes) + { + if (ca.AttributeType.FullName == m_Weaver.SyncVarType.FullName) + { + var resolvedField = fd.FieldType.Resolve(); + + if (m_Weaver.IsDerivedFrom(resolvedField, m_Weaver.NetworkBehaviourType)) + { + Log.Error("SyncVar [" + fd.FullName + "] cannot be derived from NetworkBehaviour."); + m_Weaver.fail = true; + return; + } + + if (m_Weaver.IsDerivedFrom(resolvedField, m_Weaver.ScriptableObjectType)) + { + Log.Error("SyncVar [" + fd.FullName + "] cannot be derived from ScriptableObject."); + m_Weaver.fail = true; + return; + } + + if ((fd.Attributes & FieldAttributes.Static) != 0) + { + Log.Error("SyncVar [" + fd.FullName + "] cannot be static."); + m_Weaver.fail = true; + return; + } + + if (resolvedField.HasGenericParameters) + { + Log.Error("SyncVar [" + fd.FullName + "] cannot have generic parameters."); + m_Weaver.fail = true; + return; + } + + if (resolvedField.IsInterface) + { + Log.Error("SyncVar [" + fd.FullName + "] cannot be an interface."); + m_Weaver.fail = true; + return; + } + + var fieldModuleName = resolvedField.Module.Name; + if (fieldModuleName != m_Weaver.m_ScriptDef.MainModule.Name && + fieldModuleName != m_Weaver.m_UnityAssemblyDefinition.MainModule.Name && + fieldModuleName != m_Weaver.m_UNetAssemblyDefinition.MainModule.Name && + fieldModuleName != m_Weaver.m_CorLib.Name && + fieldModuleName != "netstandard.dll" && + fieldModuleName != "System.Runtime.dll" // this is only for Metro, built-in types are not in corlib on metro + ) + { + Log.Error("SyncVar [" + fd.FullName + "] from " + resolvedField.Module.ToString() + " cannot be a different module."); + m_Weaver.fail = true; + return; + } + + if (fd.FieldType.IsArray) + { + Log.Error("SyncVar [" + fd.FullName + "] cannot be an array. Use a SyncList instead."); + m_Weaver.fail = true; + return; + } + + if (Helpers.InheritsFromSyncList(fd.FieldType, m_Weaver)) + { + Log.Warning(string.Format("Script class [{0}] has [SyncVar] attribute on SyncList field {1}, SyncLists should not be marked with SyncVar.", m_td.FullName, fd.Name)); + break; + } + + m_SyncVars.Add(fd); + + ProcessSyncVar(fd, 1 << dirtyBitCounter); + dirtyBitCounter += 1; + numSyncVars += 1; + + if (dirtyBitCounter == k_SyncVarLimit) + { + Log.Error("Script class [" + m_td.FullName + "] has too many SyncVars (" + k_SyncVarLimit + "). (This could include base classes)"); + m_Weaver.fail = true; + return; + } + break; + } + } + + if (fd.FieldType.FullName.Contains("UnityEngine.Networking.SyncListStruct")) + { + Log.Error("SyncListStruct member variable [" + fd.FullName + "] must use a dervied class, like \"class MySyncList : SyncListStruct {}\"."); + m_Weaver.fail = true; + return; + } + + if (m_Weaver.IsDerivedFrom(fd.FieldType.Resolve(), m_Weaver.SyncListType)) + { + if (fd.IsStatic) + { + Log.Error("SyncList [" + m_td.FullName + ":" + fd.FullName + "] cannot be a static"); + m_Weaver.fail = true; + return; + } + + m_SyncVars.Add(fd); + m_SyncLists.Add(fd); + listFields.Add(ProcessSyncList(fd, 1 << dirtyBitCounter)); + dirtyBitCounter += 1; + numSyncVars += 1; + + if (dirtyBitCounter == k_SyncVarLimit) + { + Log.Error("Script class [" + m_td.FullName + "] has too many SyncVars (" + k_SyncVarLimit + "). (This could include base classes)"); + m_Weaver.fail = true; + return; + } + } + } + + foreach (FieldDefinition fd in listFields) + { + m_td.Fields.Add(fd); + m_SyncListStaticFields.Add(fd); + } + + foreach (FieldDefinition fd in m_SyncVarNetIds) + { + m_td.Fields.Add(fd); + } + + foreach (var func in m_SyncListInvocationFuncs) + { + m_td.Methods.Add(func); + } + + m_Weaver.SetNumSyncVars(m_td.FullName, numSyncVars); + } + + // Copy of Mono string.GetHashCode(), so that we generate same hashes regardless of runtime (mono/MS .NET) + private static int GetHashCode(string s) + { + unsafe + { + int length = s.Length; + fixed(char* c = s) + { + char* cc = c; + char* end = cc + length - 1; + int h = 0; + for (; cc < end; cc += 2) + { + h = (h << 5) - h + *cc; + h = (h << 5) - h + cc[1]; + } + ++end; + if (cc < end) + h = (h << 5) - h + *cc; + return h; + } + } + } + + bool HasMethod(string name) + { + foreach (var method in m_td.Methods) + { + if (method.Name == name) + { + return true; + } + } + return false; + } + }; +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetBehaviourProcessor.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetBehaviourProcessor.cs.meta new file mode 100644 index 00000000..c3a00722 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetBehaviourProcessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 437172d96b389460195d65048ba4a16b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetWeaver.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetWeaver.cs new file mode 100644 index 00000000..61e2d234 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetWeaver.cs @@ -0,0 +1,1906 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using Mono.Cecil; +using Mono.Cecil.Cil; +using System.Linq; +using Mono.Cecil.Pdb; +using Mono.Cecil.Mdb; + +namespace Unity.UNetWeaver +{ + public enum OutSymbolsFormat + { + None, + Pdb, + Mdb + } + + // This data is flushed each time - if we are run multiple times in the same process/domain + class WeaverLists + { + // [SyncVar] member variables that should be replaced + public List replacedFields = new List(); + // setter functions that replace [SyncVar] member variable references + public List replacementProperties = new List(); + // GameObject SyncVar generated netId fields + public List netIdFields = new List(); + + // [Command]/[ClientRpc] functions that should be replaced + public List replacedMethods = new List(); + // remote call functions that replace [Command]/[ClientRpc] references + public List replacementMethods = new List(); + + public HashSet replacementMethodNames = new HashSet(); + + // [SyncEvent] invoke functions that should be replaced + public List replacedEvents = new List(); + // remote call functions that replace [SyncEvent] references + public List replacementEvents = new List(); + + public Dictionary readFuncs; + public Dictionary readByReferenceFuncs; + public Dictionary writeFuncs; + + public List generatedReadFunctions = new List(); + public List generatedWriteFunctions = new List(); + + public TypeDefinition generateContainerClass; + public Dictionary numSyncVars = new Dictionary(); + } + + class Weaver + { + // UNetwork types + public TypeReference NetworkBehaviourType; + public TypeReference NetworkBehaviourType2; + public TypeReference MonoBehaviourType; + public TypeReference ScriptableObjectType; + public TypeReference NetworkConnectionType; + public TypeReference ULocalConnectionToServerType; + public TypeReference ULocalConnectionToClientType; + + public TypeReference MessageBaseType; + public TypeReference SyncListStructType; + + public MethodReference NetworkBehaviourDirtyBitsReference; + public TypeReference NetworkClientType; + public TypeReference NetworkServerType; + public TypeReference NetworkCRCType; + + public TypeReference NetworkReaderType; + public TypeDefinition NetworkReaderDef; + + public TypeReference NetworkWriterType; + public TypeDefinition NetworkWriterDef; + + public MethodReference NetworkWriterCtor; + public MethodReference NetworkReaderCtor; + public TypeReference MemoryStreamType; + public MethodReference MemoryStreamCtor; + public MethodReference getComponentReference; + public MethodReference getUNetIdReference; + public MethodReference getPlayerIdReference; + public TypeReference NetworkIdentityType; + public TypeReference NetworkInstanceIdType; + public TypeReference NetworkSceneIdType; + public TypeReference IEnumeratorType; + + public TypeReference ClientSceneType; + public MethodReference FindLocalObjectReference; + public MethodReference RegisterBehaviourReference; + public MethodReference ReadyConnectionReference; + + public TypeReference ComponentType; + + public TypeReference CmdDelegateReference; + public MethodReference CmdDelegateConstructor; + + public MethodReference NetworkReaderReadInt32; + + public MethodReference NetworkWriterWriteInt32; + public MethodReference NetworkWriterWriteInt16; + + public MethodReference NetworkServerGetActive; + public MethodReference NetworkServerGetLocalClientActive; + public MethodReference NetworkClientGetActive; + public MethodReference UBehaviourIsServer; + public MethodReference NetworkReaderReadPacked32; + public MethodReference NetworkReaderReadPacked64; + public MethodReference NetworkReaderReadByte; + public MethodReference NetworkWriterWritePacked32; + public MethodReference NetworkWriterWritePacked64; + + public MethodReference NetworkWriterWriteNetworkInstanceId; + public MethodReference NetworkWriterWriteNetworkSceneId; + + public MethodReference NetworkReaderReadNetworkInstanceId; + public MethodReference NetworkReaderReadNetworkSceneId; + public MethodReference NetworkInstanceIsEmpty; + + public MethodReference NetworkReadUInt16; + public MethodReference NetworkWriteUInt16; + + // custom attribute types + public TypeReference SyncVarType; + public TypeReference CommandType; + public TypeReference ClientRpcType; + public TypeReference TargetRpcType; + public TypeReference SyncEventType; + public TypeReference SyncListType; + public MethodReference SyncListInitBehaviourReference; + public MethodReference SyncListInitHandleMsg; + public MethodReference SyncListClear; + public TypeReference NetworkSettingsType; + + // sync list types + public TypeReference SyncListFloatType; + public TypeReference SyncListIntType; + public TypeReference SyncListUIntType; + public TypeReference SyncListBoolType; + public TypeReference SyncListStringType; + + public MethodReference SyncListFloatReadType; + public MethodReference SyncListIntReadType; + public MethodReference SyncListUIntReadType; + public MethodReference SyncListStringReadType; + public MethodReference SyncListBoolReadType; + + public MethodReference SyncListFloatWriteType; + public MethodReference SyncListIntWriteType; + public MethodReference SyncListUIntWriteType; + public MethodReference SyncListBoolWriteType; + public MethodReference SyncListStringWriteType; + + // system types + public TypeReference voidType; + public TypeReference singleType; + public TypeReference doubleType; + public TypeReference decimalType; + public TypeReference boolType; + public TypeReference stringType; + public TypeReference int64Type; + public TypeReference uint64Type; + public TypeReference int32Type; + public TypeReference uint32Type; + public TypeReference int16Type; + public TypeReference uint16Type; + public TypeReference byteType; + public TypeReference sbyteType; + public TypeReference charType; + public TypeReference objectType; + public TypeReference valueTypeType; + public TypeReference vector2Type; + public TypeReference vector3Type; + public TypeReference vector4Type; + public TypeReference colorType; + public TypeReference color32Type; + public TypeReference quaternionType; + public TypeReference rectType; + public TypeReference rayType; + public TypeReference planeType; + public TypeReference matrixType; + public TypeReference hashType; + public TypeReference typeType; + public TypeReference gameObjectType; + public TypeReference transformType; + public TypeReference unityObjectType; + public MethodReference gameObjectInequality; + + public MethodReference setSyncVarReference; + public MethodReference setSyncVarHookGuard; + public MethodReference getSyncVarHookGuard; + public MethodReference setSyncVarGameObjectReference; + public MethodReference registerCommandDelegateReference; + public MethodReference registerRpcDelegateReference; + public MethodReference registerEventDelegateReference; + public MethodReference registerSyncListDelegateReference; + public MethodReference getTypeReference; + public MethodReference getTypeFromHandleReference; + public MethodReference logErrorReference; + public MethodReference logWarningReference; + public MethodReference sendCommandInternal; + public MethodReference sendRpcInternal; + public MethodReference sendTargetRpcInternal; + public MethodReference sendEventInternal; + + public WeaverLists lists; + + public AssemblyDefinition m_ScriptDef; + public ModuleDefinition m_CorLib; + public AssemblyDefinition m_UnityAssemblyDefinition; + public AssemblyDefinition m_UNetAssemblyDefinition; + + bool m_DebugFlag = true; + + public bool fail; + public bool generateLogErrors = false; + + // this is used to prevent stack overflows when generating serialization code when there are self-referencing types. + // All the utility classes use GetWriteFunc() to generate serialization code, so the recursion check is implemented there instead of in each utility class. + // A NetworkBehaviour with the max SyncVars (32) can legitimately increment this value to 65 - so max must be higher than that + const int MaxRecursionCount = 128; + int s_RecursionCount; + + public Weaver() { } + public void ResetRecursionCount() + { + s_RecursionCount = 0; + } + + public bool CanBeResolved(TypeReference parent) + { + while (parent != null) + { + if (parent.Scope.Name == "Windows") + { + return false; + } + + if (parent.Scope.Name == "mscorlib") + { + var resolved = parent.Resolve(); + return resolved != null; + } + + try + { + parent = parent.Resolve().BaseType; + } + catch + { + return false; + } + } + return true; + } + + public bool IsArrayType(TypeReference variable) + { + if ((variable.IsArray && ((ArrayType)variable).ElementType.IsArray) || // jagged array + (variable.IsArray && ((ArrayType)variable).Rank > 1)) // multidimensional array + return false; + return true; + } + + public void DLog(TypeDefinition td, string fmt, params object[] args) + { + if (!m_DebugFlag) + return; + + Console.WriteLine("[" + td.Name + "] " + String.Format(fmt, args)); + } + + public int GetSyncVarStart(string className) + { + if (lists.numSyncVars.ContainsKey(className)) + { + int num = lists.numSyncVars[className]; + return num; + } + // start at zero + return 0; + } + + public void SetNumSyncVars(string className, int num) + { + lists.numSyncVars[className] = num; + } + + public MethodReference GetWriteFunc(TypeReference variable) + { + if (s_RecursionCount++ > MaxRecursionCount) + { + Log.Error("GetWriteFunc recursion depth exceeded for " + variable.Name + ". Check for self-referencing member variables."); + fail = true; + return null; + } + + if (lists.writeFuncs.ContainsKey(variable.FullName)) + { + var foundFunc = lists.writeFuncs[variable.FullName]; + if (foundFunc.Parameters[0].ParameterType.IsArray == variable.IsArray) + { + return foundFunc; + } + } + + if (variable.IsByReference) + { + // error?? + Log.Error("GetWriteFunc variable.IsByReference error."); + return null; + } + + MethodDefinition newWriterFunc; + + if (variable.IsArray) + { + var elementType = variable.GetElementType(); + var elemenWriteFunc = GetWriteFunc(elementType); + if (elemenWriteFunc == null) + { + return null; + } + newWriterFunc = GenerateArrayWriteFunc(variable, elemenWriteFunc); + } + else + { + if (variable.Resolve().IsEnum) + { + return NetworkWriterWriteInt32; + } + + newWriterFunc = GenerateWriterFunction(variable); + } + + if (newWriterFunc == null) + { + return null; + } + + RegisterWriteFunc(variable.FullName, newWriterFunc); + return newWriterFunc; + } + + public void RegisterWriteFunc(string name, MethodDefinition newWriterFunc) + { + lists.writeFuncs[name] = newWriterFunc; + lists.generatedWriteFunctions.Add(newWriterFunc); + + ConfirmGeneratedCodeClass(m_ScriptDef.MainModule); + lists.generateContainerClass.Methods.Add(newWriterFunc); + } + + public MethodReference GetReadByReferenceFunc(TypeReference variable) + { + if (lists.readByReferenceFuncs.ContainsKey(variable.FullName)) + { + return lists.readByReferenceFuncs[variable.FullName]; + } + return null; + } + + public MethodReference GetReadFunc(TypeReference variable) + { + if (lists.readFuncs.ContainsKey(variable.FullName)) + { + var foundFunc = lists.readFuncs[variable.FullName]; + if (foundFunc.ReturnType.IsArray == variable.IsArray) + { + return foundFunc; + } + } + + var td = variable.Resolve(); + if (td == null) + { + Log.Error("GetReadFunc unsupported type " + variable.FullName); + return null; + } + + if (variable.IsByReference) + { + // error?? + Log.Error("GetReadFunc variable.IsByReference error."); + return null; + } + + MethodDefinition newReaderFunc; + + if (variable.IsArray) + { + var elementType = variable.GetElementType(); + var elementReadFunc = GetReadFunc(elementType); + if (elementReadFunc == null) + { + return null; + } + newReaderFunc = GenerateArrayReadFunc(variable, elementReadFunc); + } + else + { + if (td.IsEnum) + { + return NetworkReaderReadInt32; + } + + newReaderFunc = GenerateReadFunction(variable); + } + + if (newReaderFunc == null) + { + Log.Error("GetReadFunc unable to generate function for:" + variable.FullName); + return null; + } + RegisterReadFunc(variable.FullName, newReaderFunc); + return newReaderFunc; + } + + public void RegisterReadByReferenceFunc(string name, MethodDefinition newReaderFunc) + { + lists.readByReferenceFuncs[name] = newReaderFunc; + lists.generatedReadFunctions.Add(newReaderFunc); + + ConfirmGeneratedCodeClass(m_ScriptDef.MainModule); + lists.generateContainerClass.Methods.Add(newReaderFunc); + } + + public void RegisterReadFunc(string name, MethodDefinition newReaderFunc) + { + lists.readFuncs[name] = newReaderFunc; + lists.generatedReadFunctions.Add(newReaderFunc); + + ConfirmGeneratedCodeClass(m_ScriptDef.MainModule); + lists.generateContainerClass.Methods.Add(newReaderFunc); + } + + MethodDefinition GenerateArrayReadFunc(TypeReference variable, MethodReference elementReadFunc) + { + if (!IsArrayType(variable)) + { + Log.Error(variable.FullName + " is an unsupported array type. Jagged and multidimensional arrays are not supported"); + return null; + } + var functionName = "_ReadArray" + variable.GetElementType().Name + "_"; + if (variable.DeclaringType != null) + { + functionName += variable.DeclaringType.Name; + } + else + { + functionName += "None"; + } + + // create new reader for this type + MethodDefinition readerFunc = new MethodDefinition(functionName, + MethodAttributes.Public | + MethodAttributes.Static | + MethodAttributes.HideBySig, + variable); + + readerFunc.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, m_ScriptDef.MainModule.ImportReference(NetworkReaderType))); + + readerFunc.Body.Variables.Add(new VariableDefinition(int32Type)); + readerFunc.Body.Variables.Add(new VariableDefinition(variable)); + readerFunc.Body.Variables.Add(new VariableDefinition(int32Type)); + readerFunc.Body.InitLocals = true; + + ILProcessor worker = readerFunc.Body.GetILProcessor(); + + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Call, NetworkReadUInt16)); + worker.Append(worker.Create(OpCodes.Stloc_0)); + worker.Append(worker.Create(OpCodes.Ldloc_0)); + + Instruction labelEmptyArray = worker.Create(OpCodes.Nop); + worker.Append(worker.Create(OpCodes.Brtrue, labelEmptyArray)); + + // return empty array + worker.Append(worker.Create(OpCodes.Ldc_I4_0)); + worker.Append(worker.Create(OpCodes.Newarr, variable.GetElementType())); + worker.Append(worker.Create(OpCodes.Ret)); + + // create the actual array + worker.Append(labelEmptyArray); + worker.Append(worker.Create(OpCodes.Ldloc_0)); + worker.Append(worker.Create(OpCodes.Newarr, variable.GetElementType())); + worker.Append(worker.Create(OpCodes.Stloc_1)); + worker.Append(worker.Create(OpCodes.Ldc_I4_0)); + worker.Append(worker.Create(OpCodes.Stloc_2)); + + // loop start + Instruction labelHead = worker.Create(OpCodes.Nop); + worker.Append(worker.Create(OpCodes.Br, labelHead)); + + // loop body + Instruction labelBody = worker.Create(OpCodes.Nop); + worker.Append(labelBody); + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ldloc_2)); + worker.Append(worker.Create(OpCodes.Ldelema, variable.GetElementType())); + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Call, elementReadFunc)); + worker.Append(worker.Create(OpCodes.Stobj, variable.GetElementType())); + worker.Append(worker.Create(OpCodes.Ldloc_2)); + worker.Append(worker.Create(OpCodes.Ldc_I4_1)); + worker.Append(worker.Create(OpCodes.Add)); + worker.Append(worker.Create(OpCodes.Stloc_2)); + + // loop while check + worker.Append(labelHead); + worker.Append(worker.Create(OpCodes.Ldloc_2)); + worker.Append(worker.Create(OpCodes.Ldloc_0)); + worker.Append(worker.Create(OpCodes.Blt, labelBody)); + + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ret)); + return readerFunc; + } + + MethodDefinition GenerateArrayWriteFunc(TypeReference variable, MethodReference elementWriteFunc) + { + if (!IsArrayType(variable)) + { + Log.Error(variable.FullName + " is an unsupported array type. Jagged and multidimensional arrays are not supported"); + return null; + } + var functionName = "_WriteArray" + variable.GetElementType().Name + "_"; + if (variable.DeclaringType != null) + { + functionName += variable.DeclaringType.Name; + } + else + { + functionName += "None"; + } + + // create new writer for this type + MethodDefinition writerFunc = new MethodDefinition(functionName, + MethodAttributes.Public | + MethodAttributes.Static | + MethodAttributes.HideBySig, + voidType); + + writerFunc.Parameters.Add(new ParameterDefinition("writer", ParameterAttributes.None, m_ScriptDef.MainModule.ImportReference(NetworkWriterType))); + writerFunc.Parameters.Add(new ParameterDefinition("value", ParameterAttributes.None, m_ScriptDef.MainModule.ImportReference(variable))); + + writerFunc.Body.Variables.Add(new VariableDefinition(uint16Type)); + writerFunc.Body.Variables.Add(new VariableDefinition(uint16Type)); + writerFunc.Body.InitLocals = true; + + ILProcessor worker = writerFunc.Body.GetILProcessor(); + + // null check + Instruction labelNull = worker.Create(OpCodes.Nop); + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Brtrue, labelNull)); + + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Ldc_I4_0)); + worker.Append(worker.Create(OpCodes.Call, NetworkWriteUInt16)); + worker.Append(worker.Create(OpCodes.Ret)); + + // setup array length local variable + worker.Append(labelNull); + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Ldlen)); + worker.Append(worker.Create(OpCodes.Conv_I4)); + worker.Append(worker.Create(OpCodes.Conv_U2)); + worker.Append(worker.Create(OpCodes.Stloc_0)); + + //write length + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Ldloc_0)); + worker.Append(worker.Create(OpCodes.Call, NetworkWriteUInt16)); + + // start loop + worker.Append(worker.Create(OpCodes.Ldc_I4_0)); + worker.Append(worker.Create(OpCodes.Stloc_1)); + Instruction labelHead = worker.Create(OpCodes.Nop); + worker.Append(worker.Create(OpCodes.Br, labelHead)); + + // loop body + Instruction labelBody = worker.Create(OpCodes.Nop); + worker.Append(labelBody); + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ldelema, variable.GetElementType())); + worker.Append(worker.Create(OpCodes.Ldobj, variable.GetElementType())); + worker.Append(worker.Create(OpCodes.Call, elementWriteFunc)); + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ldc_I4_1)); + worker.Append(worker.Create(OpCodes.Add)); + worker.Append(worker.Create(OpCodes.Conv_U2)); + worker.Append(worker.Create(OpCodes.Stloc_1)); + + // loop while check + worker.Append(labelHead); + worker.Append(worker.Create(OpCodes.Ldloc_1)); + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Ldlen)); + worker.Append(worker.Create(OpCodes.Conv_I4)); + worker.Append(worker.Create(OpCodes.Blt, labelBody)); + + worker.Append(worker.Create(OpCodes.Ret)); + return writerFunc; + } + + MethodDefinition GenerateWriterFunction(TypeReference variable) + { + if (!IsValidTypeToGenerate(variable.Resolve())) + { + return null; + } + + var functionName = "_Write" + variable.Name + "_"; + if (variable.DeclaringType != null) + { + functionName += variable.DeclaringType.Name; + } + else + { + functionName += "None"; + } + // create new writer for this type + MethodDefinition writerFunc = new MethodDefinition(functionName, + MethodAttributes.Public | + MethodAttributes.Static | + MethodAttributes.HideBySig, + voidType); + + writerFunc.Parameters.Add(new ParameterDefinition("writer", ParameterAttributes.None, m_ScriptDef.MainModule.ImportReference(NetworkWriterType))); + writerFunc.Parameters.Add(new ParameterDefinition("value", ParameterAttributes.None, m_ScriptDef.MainModule.ImportReference(variable))); + + ILProcessor worker = writerFunc.Body.GetILProcessor(); + + uint fields = 0; + foreach (var field in variable.Resolve().Fields) + { + if (field.IsStatic || field.IsPrivate) + continue; + + if (field.FieldType.Resolve().HasGenericParameters) + { + fail = true; + Log.Error("WriteReadFunc for " + field.Name + " [" + field.FieldType + "/" + field.FieldType.FullName + "]. Cannot have generic parameters."); + return null; + } + + if (field.FieldType.Resolve().IsInterface) + { + fail = true; + Log.Error("WriteReadFunc for " + field.Name + " [" + field.FieldType + "/" + field.FieldType.FullName + "]. Cannot be an interface."); + return null; + } + + var writeFunc = GetWriteFunc(field.FieldType); + if (writeFunc != null) + { + fields++; + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Ldarg_1)); + worker.Append(worker.Create(OpCodes.Ldfld, field)); + worker.Append(worker.Create(OpCodes.Call, writeFunc)); + } + else + { + Log.Error("WriteReadFunc for " + field.Name + " type " + field.FieldType + " no supported"); + fail = true; + return null; + } + } + if (fields == 0) + { + Log.Warning("The class / struct " + variable.Name + " has no public or non-fields to serialize"); + } + worker.Append(worker.Create(OpCodes.Ret)); + return writerFunc; + } + + MethodDefinition GenerateReadFunction(TypeReference variable) + { + if (!IsValidTypeToGenerate(variable.Resolve())) + { + return null; + } + + var functionName = "_Read" + variable.Name + "_"; + if (variable.DeclaringType != null) + { + functionName += variable.DeclaringType.Name; + } + else + { + functionName += "None"; + } + + // create new reader for this type + MethodDefinition readerFunc = new MethodDefinition(functionName, + MethodAttributes.Public | + MethodAttributes.Static | + MethodAttributes.HideBySig, + variable); + + // create local for return value + readerFunc.Body.Variables.Add(new VariableDefinition(variable)); + readerFunc.Body.InitLocals = true; + + readerFunc.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, m_ScriptDef.MainModule.ImportReference(NetworkReaderType))); + + ILProcessor worker = readerFunc.Body.GetILProcessor(); + + if (variable.IsValueType) + { + // structs are created with Initobj + worker.Append(worker.Create(OpCodes.Ldloca, 0)); + worker.Append(worker.Create(OpCodes.Initobj, variable)); + } + else + { + // classes are created with their constructor + + var ctor = ResolveDefaultPublicCtor(variable); + if (ctor == null) + { + Log.Error("The class " + variable.Name + " has no default constructor or it's private, aborting."); + return null; + } + + worker.Append(worker.Create(OpCodes.Newobj, ctor)); + worker.Append(worker.Create(OpCodes.Stloc_0)); + } + + uint fields = 0; + foreach (var field in variable.Resolve().Fields) + { + if (field.IsStatic || field.IsPrivate) + continue; + + // mismatched ldloca/ldloc for struct/class combinations is invalid IL, which causes crash at runtime + if (variable.IsValueType) + { + worker.Append(worker.Create(OpCodes.Ldloca, 0)); + } + else + { + worker.Append(worker.Create(OpCodes.Ldloc, 0)); + } + + var readFunc = GetReadFunc(field.FieldType); + if (readFunc != null) + { + worker.Append(worker.Create(OpCodes.Ldarg_0)); + worker.Append(worker.Create(OpCodes.Call, readFunc)); + } + else + { + Log.Error("GetReadFunc for " + field.Name + " type " + field.FieldType + " no supported"); + fail = true; + return null; + } + + worker.Append(worker.Create(OpCodes.Stfld, field)); + fields++; + } + if (fields == 0) + { + Log.Warning("The class / struct " + variable.Name + " has no public or non-fields to serialize"); + } + + worker.Append(worker.Create(OpCodes.Ldloc_0)); + worker.Append(worker.Create(OpCodes.Ret)); + return readerFunc; + } + + Instruction GetEventLoadInstruction(ModuleDefinition moduleDef, TypeDefinition td, MethodDefinition md, int iCount, FieldReference foundEventField) + { + // go backwards until find a ldfld instruction for this event field + while (iCount > 0) + { + iCount -= 1; + Instruction inst = md.Body.Instructions[iCount]; + if (inst.OpCode == OpCodes.Ldfld) + { + if (inst.Operand == foundEventField) + { + DLog(td, " " + inst.Operand); + return inst; + } + } + } + return null; + } + + void ProcessInstructionMethod(ModuleDefinition moduleDef, TypeDefinition td, MethodDefinition md, Instruction instr, MethodReference opMethodRef, int iCount) + { + //DLog(td, "ProcessInstructionMethod " + opMethod.Name); + if (opMethodRef.Name == "Invoke") + { + // Events use an "Invoke" method to call the delegate. + // this code replaces the "Invoke" instruction with the generated "Call***" instruction which send the event to the server. + // but the "Invoke" instruction is called on the event field - where the "call" instruction is not. + // so the earlier instruction that loads the event field is replaced with a Noop. + + // go backwards until find a ldfld instruction that matches ANY event + bool found = false; + while (iCount > 0 && !found) + { + iCount -= 1; + Instruction inst = md.Body.Instructions[iCount]; + if (inst.OpCode == OpCodes.Ldfld) + { + var opField = inst.Operand as FieldReference; + + // find replaceEvent with matching name + for (int n = 0; n < lists.replacedEvents.Count; n++) + { + EventDefinition foundEvent = lists.replacedEvents[n]; + if (foundEvent.Name == opField.Name) + { + instr.Operand = lists.replacementEvents[n]; + inst.OpCode = OpCodes.Nop; + found = true; + break; + } + } + } + } + } + else + { + if (lists.replacementMethodNames.Contains(opMethodRef.FullName)) + { + for (int n = 0; n < lists.replacedMethods.Count; n++) + { + MethodDefinition foundMethod = lists.replacedMethods[n]; + if (opMethodRef.FullName == foundMethod.FullName) + { + //DLog(td, " replacing " + md.Name + ":" + i); + instr.Operand = lists.replacementMethods[n]; + //DLog(td, " replaced " + md.Name + ":" + i); + break; + } + } + } + } + } + + void ConfirmGeneratedCodeClass(ModuleDefinition moduleDef) + { + if (lists.generateContainerClass == null) + { + lists.generateContainerClass = new TypeDefinition("Unity", "GeneratedNetworkCode", + TypeAttributes.BeforeFieldInit | TypeAttributes.Class | TypeAttributes.AnsiClass | TypeAttributes.Public | TypeAttributes.AutoClass, + objectType); + + const MethodAttributes methodAttributes = MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName; + var method = new MethodDefinition(".ctor", methodAttributes, voidType); + method.Body.Instructions.Add(Instruction.Create(OpCodes.Ldarg_0)); + method.Body.Instructions.Add(Instruction.Create(OpCodes.Call, ResolveMethod(objectType, ".ctor"))); + method.Body.Instructions.Add(Instruction.Create(OpCodes.Ret)); + + lists.generateContainerClass.Methods.Add(method); + } + } + + void ProcessInstructionField(TypeDefinition td, MethodDefinition md, Instruction i, FieldDefinition opField) + { + // dont replace property call sites in constructors or deserialize + if (md.Name == ".ctor" || md.Name == "OnDeserialize") + return; + + // does it set a field that we replaced? + for (int n = 0; n < lists.replacedFields.Count; n++) + { + FieldDefinition fd = lists.replacedFields[n]; + if (opField == fd) + { + //replace with property + //DLog(td, " replacing " + md.Name + ":" + i); + i.OpCode = OpCodes.Call; + i.Operand = lists.replacementProperties[n]; + //DLog(td, " replaced " + md.Name + ":" + i); + break; + } + } + } + + void ProcessInstruction(ModuleDefinition moduleDef, TypeDefinition td, MethodDefinition md, Instruction i, int iCount) + { + if (i.OpCode == OpCodes.Call || i.OpCode == OpCodes.Callvirt) + { + MethodReference opMethod = i.Operand as MethodReference; + if (opMethod != null) + { + ProcessInstructionMethod(moduleDef, td, md, i, opMethod, iCount); + } + } + + if (i.OpCode == OpCodes.Stfld) + { + // this instruction sets the value of a field. cache the field reference. + FieldDefinition opField = i.Operand as FieldDefinition; + if (opField != null) + { + ProcessInstructionField(td, md, i, opField); + } + } + } + + // this is required to early-out from a function with "ref" or "out" parameters + void InjectGuardParameters(MethodDefinition md, ILProcessor worker, Instruction top) + { + int offset = md.Resolve().IsStatic ? 0 : 1; + for (int index = 0; index < md.Parameters.Count; index++) + { + var param = md.Parameters[index]; + if (param.IsOut) + { + var elementType = param.ParameterType.GetElementType(); + if (elementType.IsPrimitive) + { + worker.InsertBefore(top, worker.Create(OpCodes.Ldarg, index + offset)); + worker.InsertBefore(top, worker.Create(OpCodes.Ldc_I4_0)); + worker.InsertBefore(top, worker.Create(OpCodes.Stind_I4)); + } + else + { + md.Body.Variables.Add(new VariableDefinition(elementType)); + md.Body.InitLocals = true; + + worker.InsertBefore(top, worker.Create(OpCodes.Ldarg, index + offset)); + worker.InsertBefore(top, worker.Create(OpCodes.Ldloca_S, (byte)(md.Body.Variables.Count - 1))); + worker.InsertBefore(top, worker.Create(OpCodes.Initobj, elementType)); + worker.InsertBefore(top, worker.Create(OpCodes.Ldloc, md.Body.Variables.Count - 1)); + worker.InsertBefore(top, worker.Create(OpCodes.Stobj, elementType)); + } + } + } + } + + // this is required to early-out from a function with a return value. + void InjectGuardReturnValue(MethodDefinition md, ILProcessor worker, Instruction top) + { + if (md.ReturnType.FullName != voidType.FullName) + { + if (md.ReturnType.IsPrimitive) + { + worker.InsertBefore(top, worker.Create(OpCodes.Ldc_I4_0)); + } + else + { + md.Body.Variables.Add(new VariableDefinition(md.ReturnType)); + md.Body.InitLocals = true; + + worker.InsertBefore(top, worker.Create(OpCodes.Ldloca_S, (byte)(md.Body.Variables.Count - 1))); + worker.InsertBefore(top, worker.Create(OpCodes.Initobj, md.ReturnType)); + worker.InsertBefore(top, worker.Create(OpCodes.Ldloc, md.Body.Variables.Count - 1)); + } + } + } + + void InjectServerGuard(ModuleDefinition moduleDef, TypeDefinition td, MethodDefinition md, bool logWarning) + { + if (!IsNetworkBehaviour(td)) + { + Log.Error("[Server] guard on non-NetworkBehaviour script at [" + md.FullName + "]"); + return; + } + ILProcessor worker = md.Body.GetILProcessor(); + Instruction top = md.Body.Instructions[0]; + + worker.InsertBefore(top, worker.Create(OpCodes.Call, NetworkServerGetActive)); + worker.InsertBefore(top, worker.Create(OpCodes.Brtrue, top)); + if (logWarning) + { + worker.InsertBefore(top, worker.Create(OpCodes.Ldstr, "[Server] function '" + md.FullName + "' called on client")); + worker.InsertBefore(top, worker.Create(OpCodes.Call, logWarningReference)); + } + InjectGuardParameters(md, worker, top); + InjectGuardReturnValue(md, worker, top); + worker.InsertBefore(top, worker.Create(OpCodes.Ret)); + } + + void InjectClientGuard(ModuleDefinition moduleDef, TypeDefinition td, MethodDefinition md, bool logWarning) + { + if (!IsNetworkBehaviour(td)) + { + Log.Error("[Client] guard on non-NetworkBehaviour script at [" + md.FullName + "]"); + return; + } + ILProcessor worker = md.Body.GetILProcessor(); + Instruction top = md.Body.Instructions[0]; + + worker.InsertBefore(top, worker.Create(OpCodes.Call, NetworkClientGetActive)); + worker.InsertBefore(top, worker.Create(OpCodes.Brtrue, top)); + if (logWarning) + { + worker.InsertBefore(top, worker.Create(OpCodes.Ldstr, "[Client] function '" + md.FullName + "' called on server")); + worker.InsertBefore(top, worker.Create(OpCodes.Call, logWarningReference)); + } + + InjectGuardParameters(md, worker, top); + InjectGuardReturnValue(md, worker, top); + worker.InsertBefore(top, worker.Create(OpCodes.Ret)); + } + + void ProcessSiteMethod(ModuleDefinition moduleDef, TypeDefinition td, MethodDefinition md) + { + // process all references to replaced members with properties + //Weaver.DLog(td, " ProcessSiteMethod " + md); + + if (md.Name == ".cctor" || md.Name == "OnUnserializeVars") + return; + + string prefix = md.Name.Substring(0, Math.Min(md.Name.Length, 4)); + + if (prefix == "UNet") + return; + + prefix = md.Name.Substring(0, Math.Min(md.Name.Length, 7)); + if (prefix == "CallCmd") + return; + + prefix = md.Name.Substring(0, Math.Min(md.Name.Length, 9)); + if (prefix == "InvokeCmd" || prefix == "InvokeRpc" || prefix == "InvokeSyn") + return; + + if (md.Body != null && md.Body.Instructions != null) + { + foreach (CustomAttribute attr in md.CustomAttributes) + { + if (attr.Constructor.DeclaringType.ToString() == "UnityEngine.Networking.ServerAttribute") + { + InjectServerGuard(moduleDef, td, md, true); + } + else if (attr.Constructor.DeclaringType.ToString() == "UnityEngine.Networking.ServerCallbackAttribute") + { + InjectServerGuard(moduleDef, td, md, false); + } + else if (attr.Constructor.DeclaringType.ToString() == "UnityEngine.Networking.ClientAttribute") + { + InjectClientGuard(moduleDef, td, md, true); + } + else if (attr.Constructor.DeclaringType.ToString() == "UnityEngine.Networking.ClientCallbackAttribute") + { + InjectClientGuard(moduleDef, td, md, false); + } + } + + int iCount = 0; + foreach (Instruction i in md.Body.Instructions) + { + ProcessInstruction(moduleDef, td, md, i, iCount); + iCount += 1; + } + } + } + + void ProcessSiteClass(ModuleDefinition moduleDef, TypeDefinition td) + { + //Console.WriteLine(" ProcessSiteClass " + td); + foreach (MethodDefinition md in td.Methods) + { + ProcessSiteMethod(moduleDef, td, md); + } + + foreach (var nested in td.NestedTypes) + { + ProcessSiteClass(moduleDef, nested); + } + } + + void ProcessSitesModule(ModuleDefinition moduleDef) + { + var startTime = System.DateTime.Now; + + //Search through the types + foreach (TypeDefinition td in moduleDef.Types) + { + if (td.IsClass) + { + ProcessSiteClass(moduleDef, td); + } + } + if (lists.generateContainerClass != null) + { + moduleDef.Types.Add(lists.generateContainerClass); + m_ScriptDef.MainModule.ImportReference(lists.generateContainerClass); + + foreach (var f in lists.generatedReadFunctions) + { + m_ScriptDef.MainModule.ImportReference(f); + } + + foreach (var f in lists.generatedWriteFunctions) + { + m_ScriptDef.MainModule.ImportReference(f); + } + } + Console.WriteLine(" ProcessSitesModule " + moduleDef.Name + " elapsed time:" + (System.DateTime.Now - startTime)); + } + + void ProcessPropertySites() + { + ProcessSitesModule(m_ScriptDef.MainModule); + } + + bool ProcessMessageType(TypeDefinition td) + { + var proc = new MessageClassProcessor(td, this); + proc.Process(); + return true; + } + + bool ProcessSyncListStructType(TypeDefinition td) + { + var proc = new SyncListStructProcessor(td, this); + proc.Process(); + return true; + } + + void ProcessMonoBehaviourType(TypeDefinition td) + { + var proc = new MonoBehaviourProcessor(td, this); + proc.Process(); + } + + bool ProcessNetworkBehaviourType(TypeDefinition td) + { + foreach (var md in td.Resolve().Methods) + { + if (md.Name == "UNetVersion") + { + DLog(td, " Already processed"); + return false; // did no work + } + } + DLog(td, "Found NetworkBehaviour " + td.FullName); + + NetworkBehaviourProcessor proc = new NetworkBehaviourProcessor(td, this); + proc.Process(); + return true; + } + + public MethodReference ResolveMethod(TypeReference t, string name) + { + //Console.WriteLine("ResolveMethod " + t.ToString () + " " + name); + if (t == null) + { + Log.Error("Type missing for " + name); + fail = true; + return null; + } + foreach (var methodRef in t.Resolve().Methods) + { + if (methodRef.Name == name) + { + return m_ScriptDef.MainModule.ImportReference(methodRef); + } + } + Log.Error("ResolveMethod failed " + t.Name + "::" + name + " " + t.Resolve()); + + // why did it fail!? + foreach (var methodRef in t.Resolve().Methods) + { + Log.Error("Method " + methodRef.Name); + } + + fail = true; + return null; + } + + MethodReference ResolveMethodWithArg(TypeReference t, string name, TypeReference argType) + { + foreach (var methodRef in t.Resolve().Methods) + { + if (methodRef.Name == name) + { + if (methodRef.Parameters.Count == 1) + { + if (methodRef.Parameters[0].ParameterType.FullName == argType.FullName) + { + return m_ScriptDef.MainModule.ImportReference(methodRef); + } + } + } + } + Log.Error("ResolveMethodWithArg failed " + t.Name + "::" + name + " " + argType); + fail = true; + return null; + } + + MethodDefinition ResolveDefaultPublicCtor(TypeReference variable) + { + foreach (MethodDefinition methodRef in variable.Resolve().Methods) + { + if (methodRef.Name == ".ctor" && + methodRef.Resolve().IsPublic && + methodRef.Parameters.Count == 0) + { + return methodRef; + } + } + return null; + } + + GenericInstanceMethod ResolveMethodGeneric(TypeReference t, string name, TypeReference genericType) + { + foreach (var methodRef in t.Resolve().Methods) + { + if (methodRef.Name == name) + { + if (methodRef.Parameters.Count == 0) + { + if (methodRef.GenericParameters.Count == 1) + { + MethodReference tmp = m_ScriptDef.MainModule.ImportReference(methodRef); + GenericInstanceMethod gm = new GenericInstanceMethod(tmp); + gm.GenericArguments.Add(genericType); + if (gm.GenericArguments[0].FullName == genericType.FullName) + { + return gm; + } + } + } + } + } + + Log.Error("ResolveMethodGeneric failed " + t.Name + "::" + name + " " + genericType); + fail = true; + return null; + } + + public FieldReference ResolveField(TypeReference t, string name) + { + foreach (FieldDefinition fd in t.Resolve().Fields) + { + if (fd.Name == name) + { + return m_ScriptDef.MainModule.ImportReference(fd); + } + } + return null; + } + + public MethodReference ResolveProperty(TypeReference t, string name) + { + foreach (var fd in t.Resolve().Properties) + { + if (fd.Name == name) + { + return m_ScriptDef.MainModule.ImportReference(fd.GetMethod); + } + } + return null; + } + + void SetupUnityTypes() + { + vector2Type = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Vector2"); + vector3Type = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Vector3"); + vector4Type = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Vector4"); + colorType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Color"); + color32Type = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Color32"); + quaternionType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Quaternion"); + rectType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Rect"); + planeType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Plane"); + rayType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Ray"); + matrixType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Matrix4x4"); + gameObjectType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.GameObject"); + transformType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Transform"); + unityObjectType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Object"); + + hashType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkHash128"); + NetworkClientType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkClient"); + NetworkServerType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkServer"); + NetworkCRCType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkCRC"); + + SyncVarType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncVarAttribute"); + CommandType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.CommandAttribute"); + ClientRpcType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.ClientRpcAttribute"); + TargetRpcType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.TargetRpcAttribute"); + SyncEventType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncEventAttribute"); + SyncListType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncList`1"); + NetworkSettingsType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkSettingsAttribute"); + + SyncListFloatType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncListFloat"); + SyncListIntType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncListInt"); + SyncListUIntType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncListUInt"); + SyncListBoolType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncListBool"); + SyncListStringType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncListString"); + } + + void SetupCorLib() + { + var name = AssemblyNameReference.Parse("mscorlib"); + var parameters = new ReaderParameters + { + AssemblyResolver = m_ScriptDef.MainModule.AssemblyResolver, + }; + m_CorLib = m_ScriptDef.MainModule.AssemblyResolver.Resolve(name, parameters).MainModule; + } + + TypeReference ImportCorLibType(string fullName) + { + var type = m_CorLib.GetType(fullName) ?? m_CorLib.ExportedTypes.First(t => t.FullName == fullName).Resolve(); + return m_ScriptDef.MainModule.ImportReference(type); + } + + void SetupTargetTypes() + { + // system types + SetupCorLib(); + voidType = ImportCorLibType("System.Void"); + singleType = ImportCorLibType("System.Single"); + doubleType = ImportCorLibType("System.Double"); + decimalType = ImportCorLibType("System.Decimal"); + boolType = ImportCorLibType("System.Boolean"); + stringType = ImportCorLibType("System.String"); + int64Type = ImportCorLibType("System.Int64"); + uint64Type = ImportCorLibType("System.UInt64"); + int32Type = ImportCorLibType("System.Int32"); + uint32Type = ImportCorLibType("System.UInt32"); + int16Type = ImportCorLibType("System.Int16"); + uint16Type = ImportCorLibType("System.UInt16"); + byteType = ImportCorLibType("System.Byte"); + sbyteType = ImportCorLibType("System.SByte"); + charType = ImportCorLibType("System.Char"); + objectType = ImportCorLibType("System.Object"); + valueTypeType = ImportCorLibType("System.ValueType"); + typeType = ImportCorLibType("System.Type"); + IEnumeratorType = ImportCorLibType("System.Collections.IEnumerator"); + MemoryStreamType = ImportCorLibType("System.IO.MemoryStream"); + + NetworkReaderType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkReader"); + NetworkReaderDef = NetworkReaderType.Resolve(); + + NetworkReaderCtor = ResolveMethod(NetworkReaderDef, ".ctor"); + + NetworkWriterType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkWriter"); + NetworkWriterDef = NetworkWriterType.Resolve(); + + NetworkWriterCtor = ResolveMethod(NetworkWriterDef, ".ctor"); + + MemoryStreamCtor = ResolveMethod(MemoryStreamType, ".ctor"); + + NetworkInstanceIdType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkInstanceId"); + NetworkSceneIdType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkSceneId"); + + NetworkInstanceIdType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkInstanceId"); + NetworkSceneIdType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkSceneId"); + + NetworkServerGetActive = ResolveMethod(NetworkServerType, "get_active"); + NetworkServerGetLocalClientActive = ResolveMethod(NetworkServerType, "get_localClientActive"); + NetworkClientGetActive = ResolveMethod(NetworkClientType, "get_active"); + + NetworkReaderReadInt32 = ResolveMethod(NetworkReaderType, "ReadInt32"); + + NetworkWriterWriteInt32 = ResolveMethodWithArg(NetworkWriterType, "Write", int32Type); + NetworkWriterWriteInt16 = ResolveMethodWithArg(NetworkWriterType, "Write", int16Type); + + NetworkReaderReadPacked32 = ResolveMethod(NetworkReaderType, "ReadPackedUInt32"); + NetworkReaderReadPacked64 = ResolveMethod(NetworkReaderType, "ReadPackedUInt64"); + NetworkReaderReadByte = ResolveMethod(NetworkReaderType, "ReadByte"); + + NetworkWriterWritePacked32 = ResolveMethod(NetworkWriterType, "WritePackedUInt32"); + NetworkWriterWritePacked64 = ResolveMethod(NetworkWriterType, "WritePackedUInt64"); + + NetworkWriterWriteNetworkInstanceId = ResolveMethodWithArg(NetworkWriterType, "Write", NetworkInstanceIdType); + NetworkWriterWriteNetworkSceneId = ResolveMethodWithArg(NetworkWriterType, "Write", NetworkSceneIdType); + + NetworkReaderReadNetworkInstanceId = ResolveMethod(NetworkReaderType, "ReadNetworkId"); + NetworkReaderReadNetworkSceneId = ResolveMethod(NetworkReaderType, "ReadSceneId"); + NetworkInstanceIsEmpty = ResolveMethod(NetworkInstanceIdType, "IsEmpty"); + + NetworkReadUInt16 = ResolveMethod(NetworkReaderType, "ReadUInt16"); + NetworkWriteUInt16 = ResolveMethodWithArg(NetworkWriterType, "Write", uint16Type); + + CmdDelegateReference = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkBehaviour/CmdDelegate"); + CmdDelegateConstructor = ResolveMethod(CmdDelegateReference, ".ctor"); + m_ScriptDef.MainModule.ImportReference(gameObjectType); + m_ScriptDef.MainModule.ImportReference(transformType); + + TypeReference unetViewTmp = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkIdentity"); + NetworkIdentityType = m_ScriptDef.MainModule.ImportReference(unetViewTmp); + + NetworkInstanceIdType = m_ScriptDef.MainModule.ImportReference(NetworkInstanceIdType); + + SyncListFloatReadType = ResolveMethod(SyncListFloatType, "ReadReference"); + SyncListIntReadType = ResolveMethod(SyncListIntType, "ReadReference"); + SyncListUIntReadType = ResolveMethod(SyncListUIntType, "ReadReference"); + SyncListBoolReadType = ResolveMethod(SyncListBoolType, "ReadReference"); + SyncListStringReadType = ResolveMethod(SyncListStringType, "ReadReference"); + + SyncListFloatWriteType = ResolveMethod(SyncListFloatType, "WriteInstance"); + SyncListIntWriteType = ResolveMethod(SyncListIntType, "WriteInstance"); + SyncListUIntWriteType = ResolveMethod(SyncListUIntType, "WriteInstance"); + SyncListBoolWriteType = ResolveMethod(SyncListBoolType, "WriteInstance"); + SyncListStringWriteType = ResolveMethod(SyncListStringType, "WriteInstance"); + + + NetworkBehaviourType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkBehaviour"); + NetworkBehaviourType2 = m_ScriptDef.MainModule.ImportReference(NetworkBehaviourType); + NetworkConnectionType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkConnection"); + + MonoBehaviourType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.MonoBehaviour"); + ScriptableObjectType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.ScriptableObject"); + + NetworkConnectionType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.NetworkConnection"); + NetworkConnectionType = m_ScriptDef.MainModule.ImportReference(NetworkConnectionType); + + ULocalConnectionToServerType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.ULocalConnectionToServer"); + ULocalConnectionToServerType = m_ScriptDef.MainModule.ImportReference(ULocalConnectionToServerType); + + ULocalConnectionToClientType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.ULocalConnectionToClient"); + ULocalConnectionToClientType = m_ScriptDef.MainModule.ImportReference(ULocalConnectionToClientType); + + MessageBaseType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.MessageBase"); + SyncListStructType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.SyncListStruct`1"); + + NetworkBehaviourDirtyBitsReference = ResolveProperty(NetworkBehaviourType, "syncVarDirtyBits"); + + ComponentType = m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Component"); + ClientSceneType = m_UNetAssemblyDefinition.MainModule.GetType("UnityEngine.Networking.ClientScene"); + FindLocalObjectReference = ResolveMethod(ClientSceneType, "FindLocalObject"); + RegisterBehaviourReference = ResolveMethod(NetworkCRCType, "RegisterBehaviour"); + ReadyConnectionReference = ResolveMethod(ClientSceneType, "get_readyConnection"); + + // get specialized GetComponent() + getComponentReference = ResolveMethodGeneric(ComponentType, "GetComponent", NetworkIdentityType); + + getUNetIdReference = ResolveMethod(unetViewTmp, "get_netId"); + + gameObjectInequality = ResolveMethod(unityObjectType, "op_Inequality"); + + UBehaviourIsServer = ResolveMethod(NetworkBehaviourType, "get_isServer"); + getPlayerIdReference = ResolveMethod(NetworkBehaviourType, "get_playerControllerId"); + setSyncVarReference = ResolveMethod(NetworkBehaviourType, "SetSyncVar"); + setSyncVarHookGuard = ResolveMethod(NetworkBehaviourType, "set_syncVarHookGuard"); + getSyncVarHookGuard = ResolveMethod(NetworkBehaviourType, "get_syncVarHookGuard"); + + setSyncVarGameObjectReference = ResolveMethod(NetworkBehaviourType, "SetSyncVarGameObject"); + registerCommandDelegateReference = ResolveMethod(NetworkBehaviourType, "RegisterCommandDelegate"); + registerRpcDelegateReference = ResolveMethod(NetworkBehaviourType, "RegisterRpcDelegate"); + registerEventDelegateReference = ResolveMethod(NetworkBehaviourType, "RegisterEventDelegate"); + registerSyncListDelegateReference = ResolveMethod(NetworkBehaviourType, "RegisterSyncListDelegate"); + getTypeReference = ResolveMethod(objectType, "GetType"); + getTypeFromHandleReference = ResolveMethod(typeType, "GetTypeFromHandle"); + logErrorReference = ResolveMethod(m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Debug"), "LogError"); + logWarningReference = ResolveMethod(m_UnityAssemblyDefinition.MainModule.GetType("UnityEngine.Debug"), "LogWarning"); + sendCommandInternal = ResolveMethod(NetworkBehaviourType, "SendCommandInternal"); + sendRpcInternal = ResolveMethod(NetworkBehaviourType, "SendRPCInternal"); + sendTargetRpcInternal = ResolveMethod(NetworkBehaviourType, "SendTargetRPCInternal"); + sendEventInternal = ResolveMethod(NetworkBehaviourType, "SendEventInternal"); + + SyncListType = m_ScriptDef.MainModule.ImportReference(SyncListType); + SyncListInitBehaviourReference = ResolveMethod(SyncListType, "InitializeBehaviour"); + SyncListInitHandleMsg = ResolveMethod(SyncListType, "HandleMsg"); + SyncListClear = ResolveMethod(SyncListType, "Clear"); + } + + void SetupReadFunctions() + { + lists.readFuncs = new Dictionary + { + { singleType.FullName, ResolveMethod(NetworkReaderType, "ReadSingle") }, + { doubleType.FullName, ResolveMethod(NetworkReaderType, "ReadDouble") }, + { boolType.FullName, ResolveMethod(NetworkReaderType, "ReadBoolean") }, + { stringType.FullName, ResolveMethod(NetworkReaderType, "ReadString") }, + { int64Type.FullName, NetworkReaderReadPacked64 }, + { uint64Type.FullName, NetworkReaderReadPacked64 }, + { int32Type.FullName, NetworkReaderReadPacked32 }, + { uint32Type.FullName, NetworkReaderReadPacked32 }, + { int16Type.FullName, NetworkReaderReadPacked32 }, + { uint16Type.FullName, NetworkReaderReadPacked32 }, + { byteType.FullName, NetworkReaderReadPacked32 }, + { sbyteType.FullName, NetworkReaderReadPacked32 }, + { charType.FullName, NetworkReaderReadPacked32 }, + { decimalType.FullName, ResolveMethod(NetworkReaderType, "ReadDecimal") }, + { vector2Type.FullName, ResolveMethod(NetworkReaderType, "ReadVector2") }, + { vector3Type.FullName, ResolveMethod(NetworkReaderType, "ReadVector3") }, + { vector4Type.FullName, ResolveMethod(NetworkReaderType, "ReadVector4") }, + { colorType.FullName, ResolveMethod(NetworkReaderType, "ReadColor") }, + { color32Type.FullName, ResolveMethod(NetworkReaderType, "ReadColor32") }, + { quaternionType.FullName, ResolveMethod(NetworkReaderType, "ReadQuaternion") }, + { rectType.FullName, ResolveMethod(NetworkReaderType, "ReadRect") }, + { planeType.FullName, ResolveMethod(NetworkReaderType, "ReadPlane") }, + { rayType.FullName, ResolveMethod(NetworkReaderType, "ReadRay") }, + { matrixType.FullName, ResolveMethod(NetworkReaderType, "ReadMatrix4x4") }, + { hashType.FullName, ResolveMethod(NetworkReaderType, "ReadNetworkHash128") }, + { gameObjectType.FullName, ResolveMethod(NetworkReaderType, "ReadGameObject") }, + { NetworkIdentityType.FullName, ResolveMethod(NetworkReaderType, "ReadNetworkIdentity") }, + { NetworkInstanceIdType.FullName, NetworkReaderReadNetworkInstanceId }, + { NetworkSceneIdType.FullName, NetworkReaderReadNetworkSceneId }, + { transformType.FullName, ResolveMethod(NetworkReaderType, "ReadTransform") }, + { "System.Byte[]", ResolveMethod(NetworkReaderType, "ReadBytesAndSize") }, + }; + + lists.readByReferenceFuncs = new Dictionary + { + {SyncListFloatType.FullName, SyncListFloatReadType}, + {SyncListIntType.FullName, SyncListIntReadType}, + {SyncListUIntType.FullName, SyncListUIntReadType}, + {SyncListBoolType.FullName, SyncListBoolReadType}, + {SyncListStringType.FullName, SyncListStringReadType} + }; + } + + void SetupWriteFunctions() + { + lists.writeFuncs = new Dictionary + { + { singleType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", singleType) }, + { doubleType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", doubleType) }, + { boolType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", boolType) }, + { stringType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", stringType) }, + { int64Type.FullName, NetworkWriterWritePacked64 }, + { uint64Type.FullName, NetworkWriterWritePacked64 }, + { int32Type.FullName, NetworkWriterWritePacked32 }, + { uint32Type.FullName, NetworkWriterWritePacked32 }, + { int16Type.FullName, NetworkWriterWritePacked32 }, + { uint16Type.FullName, NetworkWriterWritePacked32 }, + { byteType.FullName, NetworkWriterWritePacked32 }, + { sbyteType.FullName, NetworkWriterWritePacked32 }, + { charType.FullName, NetworkWriterWritePacked32 }, + { decimalType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", decimalType) }, + { vector2Type.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", vector2Type) }, + { vector3Type.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", vector3Type) }, + { vector4Type.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", vector4Type) }, + { colorType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", colorType) }, + { color32Type.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", color32Type) }, + { quaternionType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", quaternionType) }, + { rectType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", rectType) }, + { planeType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", planeType) }, + { rayType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", rayType) }, + { matrixType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", matrixType) }, + { hashType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", hashType) }, + { gameObjectType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", gameObjectType) }, + { NetworkIdentityType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", NetworkIdentityType) }, + { NetworkInstanceIdType.FullName, NetworkWriterWriteNetworkInstanceId }, + { NetworkSceneIdType.FullName, NetworkWriterWriteNetworkSceneId }, + { transformType.FullName, ResolveMethodWithArg(NetworkWriterType, "Write", transformType) }, + { "System.Byte[]", ResolveMethod(NetworkWriterType, "WriteBytesFull") }, + { SyncListFloatType.FullName, SyncListFloatWriteType }, + { SyncListIntType.FullName, SyncListIntWriteType }, + { SyncListUIntType.FullName, SyncListUIntWriteType }, + { SyncListBoolType.FullName, SyncListBoolWriteType }, + { SyncListStringType.FullName, SyncListStringWriteType } + }; + } + + bool IsNetworkBehaviour(TypeDefinition td) + { + if (!td.IsClass) + return false; + + // are ANY parent clasess unetbehaviours + TypeReference parent = td.BaseType; + while (parent != null) + { + if (parent.FullName == NetworkBehaviourType.FullName) + { + return true; + } + try + { + parent = parent.Resolve().BaseType; + } + catch (AssemblyResolutionException) + { + // this can happen for pluins. + //Console.WriteLine("AssemblyResolutionException: "+ ex.ToString()); + break; + } + } + return false; + } + + public bool IsDerivedFrom(TypeDefinition td, TypeReference baseClass) + { + if (!td.IsClass) + return false; + + // are ANY parent clasess unetbehaviours + TypeReference parent = td.BaseType; + while (parent != null) + { + var parentName = parent.FullName; + + // strip generic parameters + int index = parentName.IndexOf('<'); + if (index != -1) + { + parentName = parentName.Substring(0, index); + } + + if (parentName == baseClass.FullName) + { + return true; + } + try + { + parent = parent.Resolve().BaseType; + } + catch (AssemblyResolutionException) + { + // this can happen for pluins. + //Console.WriteLine("AssemblyResolutionException: "+ ex.ToString()); + break; + } + } + return false; + } + + public bool IsValidTypeToGenerate(TypeDefinition variable) + { + // a valid type is a simple class or struct. so we generate only code for types we dont know, and if they are not inside + // this assembly it must mean that we are trying to serialize a variable outside our scope. and this will fail. + + string assembly = m_ScriptDef.MainModule.Name; + if (variable.Module.Name == assembly) + return true; + + Log.Error("parameter [" + variable.Name + + "] is of the type [" + + variable.FullName + + "] is not a valid type, please make sure to use a valid type."); + fail = true; + return false; + } + + void CheckMonoBehaviour(TypeDefinition td) + { + if (IsDerivedFrom(td, MonoBehaviourType)) + { + ProcessMonoBehaviourType(td); + } + } + + bool CheckNetworkBehaviour(TypeDefinition td) + { + if (!td.IsClass) + return false; + + if (!IsNetworkBehaviour(td)) + { + CheckMonoBehaviour(td); + return false; + } + + // process this and base classes from parent to child order + + List behClasses = new List(); + + TypeDefinition parent = td; + while (parent != null) + { + if (parent.FullName == NetworkBehaviourType.FullName) + { + break; + } + try + { + behClasses.Insert(0, parent); + parent = parent.BaseType.Resolve(); + } + catch (AssemblyResolutionException) + { + // this can happen for pluins. + //Console.WriteLine("AssemblyResolutionException: "+ ex.ToString()); + break; + } + } + + bool didWork = false; + foreach (var beh in behClasses) + { + didWork |= ProcessNetworkBehaviourType(beh); + } + return didWork; + } + + bool CheckMessageBase(TypeDefinition td) + { + if (!td.IsClass) + return false; + + bool didWork = false; + + // are ANY parent clasess MessageBase + TypeReference parent = td.BaseType; + while (parent != null) + { + if (parent.FullName == MessageBaseType.FullName) + { + didWork |= ProcessMessageType(td); + break; + } + try + { + parent = parent.Resolve().BaseType; + } + catch (AssemblyResolutionException) + { + // this can happen for pluins. + //Console.WriteLine("AssemblyResolutionException: "+ ex.ToString()); + break; + } + } + + // check for embedded types + foreach (var embedded in td.NestedTypes) + { + didWork |= CheckMessageBase(embedded); + } + + return didWork; + } + + bool CheckSyncListStruct(TypeDefinition td) + { + if (!td.IsClass) + return false; + + bool didWork = false; + + // are ANY parent clasess SyncListStruct + TypeReference parent = td.BaseType; + while (parent != null) + { + if (parent.FullName.Contains("SyncListStruct")) + { + didWork |= ProcessSyncListStructType(td); + break; + } + try + { + parent = parent.Resolve().BaseType; + } + catch (AssemblyResolutionException) + { + // this can happen for pluins. + //Console.WriteLine("AssemblyResolutionException: "+ ex.ToString()); + break; + } + } + + // check for embedded types + foreach (var embedded in td.NestedTypes) + { + didWork |= CheckSyncListStruct(embedded); + } + + return didWork; + } + + bool Weave(string assName, IEnumerable dependencies, IAssemblyResolver assemblyResolver, string unityEngineDLLPath, string unityUNetDLLPath, string outputDir) + { + var readParams = Helpers.ReaderParameters(assName, dependencies, assemblyResolver, unityEngineDLLPath, unityUNetDLLPath); + + string pdbToDelete = null; + using (m_UnityAssemblyDefinition = AssemblyDefinition.ReadAssembly(unityEngineDLLPath)) + using (m_ScriptDef = AssemblyDefinition.ReadAssembly(assName, readParams)) + using (m_UNetAssemblyDefinition = AssemblyDefinition.ReadAssembly(unityUNetDLLPath)) + { + SetupUnityTypes(); + SetupTargetTypes(); + SetupReadFunctions(); + SetupWriteFunctions(); + + ModuleDefinition moduleDefinition = m_ScriptDef.MainModule; + Console.WriteLine("Script Module: {0}", moduleDefinition.Name); + + // Process each NetworkBehaviour + bool didWork = false; + + // We need to do 2 passes, because SyncListStructs might be referenced from other modules, so we must make sure we generate them first. + for (int pass = 0; pass < 2; pass++) + { + var watch = System.Diagnostics.Stopwatch.StartNew(); + foreach (TypeDefinition td in moduleDefinition.Types) + { + if (td.IsClass && CanBeResolved(td.BaseType)) + { + try + { + if (pass == 0) + { + didWork |= CheckSyncListStruct(td); + } + else + { + didWork |= CheckNetworkBehaviour(td); + didWork |= CheckMessageBase(td); + } + } + catch (Exception ex) + { + if (m_ScriptDef.MainModule.SymbolReader != null) + m_ScriptDef.MainModule.SymbolReader.Dispose(); + fail = true; + throw ex; + } + } + + if (fail) + { + if (m_ScriptDef.MainModule.SymbolReader != null) + m_ScriptDef.MainModule.SymbolReader.Dispose(); + return false; + } + } + + watch.Stop(); + Console.WriteLine("Pass: " + pass + " took " + watch.ElapsedMilliseconds + " milliseconds"); + } + + if (didWork) + { + // build replacementMethods hash to speed up code site scan + foreach (var m in lists.replacedMethods) + { + lists.replacementMethodNames.Add(m.FullName); + } + + // this must be done for ALL code, not just NetworkBehaviours + try + { + ProcessPropertySites(); + } + catch (Exception e) + { + Log.Error("ProcessPropertySites exception: " + e); + if (m_ScriptDef.MainModule.SymbolReader != null) + m_ScriptDef.MainModule.SymbolReader.Dispose(); + return false; + } + + + if (fail) + { + //Log.Error("Failed phase II."); + if (m_ScriptDef.MainModule.SymbolReader != null) + m_ScriptDef.MainModule.SymbolReader.Dispose(); + return false; + } + + //Console.WriteLine ("Output:" + dest); + //Console.WriteLine ("Output:" + options.OutSymbolsFormat); + + var writeParams = Helpers.GetWriterParameters(readParams); + + // PdbWriterProvider uses ISymUnmanagedWriter2 COM interface but Mono can't invoke a method on it and crashes (actually it first throws the following exception and then crashes). + // One solution would be to convert UNetWeaver to exe file and run it on .NET on Windows (I have tested that and it works). + // However it's much more simple to just write mdb file. + // System.NullReferenceException: Object reference not set to an instance of an object + // at(wrapper cominterop - invoke) Mono.Cecil.Pdb.ISymUnmanagedWriter2:DefineDocument(string, System.Guid &, System.Guid &, System.Guid &, Mono.Cecil.Pdb.ISymUnmanagedDocumentWriter &) + // at Mono.Cecil.Pdb.SymWriter.DefineDocument(System.String url, Guid language, Guid languageVendor, Guid documentType)[0x00000] in < filename unknown >:0 + if (writeParams.SymbolWriterProvider is PdbWriterProvider) + { + writeParams.SymbolWriterProvider = new MdbWriterProvider(); + // old pdb file is out of date so delete it. symbols will be stored in mdb + pdbToDelete = Path.ChangeExtension(assName, ".pdb"); + } + + m_ScriptDef.Write(writeParams); + } + + if (m_ScriptDef.MainModule.SymbolReader != null) + m_ScriptDef.MainModule.SymbolReader.Dispose(); + } + + if (pdbToDelete != null) + File.Delete(pdbToDelete); + + return true; + } + + public bool WeaveAssemblies(IEnumerable assemblies, IEnumerable dependencies, IAssemblyResolver assemblyResolver, string outputDir, string unityEngineDLLPath, string unityUNetDLLPath) + { + fail = false; + lists = new WeaverLists(); + + try + { + foreach (string ass in assemblies) + { + if (!Weave(ass, dependencies, assemblyResolver, unityEngineDLLPath, unityUNetDLLPath, outputDir)) + { + return false; + } + } + } + catch (Exception e) + { + Log.Error("Exception :" + e); + return false; + } + //corLib = null; + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetWeaver.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetWeaver.cs.meta new file mode 100644 index 00000000..3b3d5c64 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/UNetWeaver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 21b77d06d51de4d49a4a822b4c0b7958 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/com.unity.multiplayer-weaver.Editor.asmdef b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/com.unity.multiplayer-weaver.Editor.asmdef new file mode 100644 index 00000000..1088cc3c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/com.unity.multiplayer-weaver.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "com.unity.multiplayer-weaver.Editor", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode" : true, + "overrideReferences": true, + "precompiledReferences": [ + "Mono.Cecil.dll", + "Mono.Cecil.Mdb.dll", + "Mono.Cecil.Pdb.dll", + "Mono.Cecil.Rocks.dll" + ] +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/com.unity.multiplayer-weaver.Editor.asmdef.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/com.unity.multiplayer-weaver.Editor.asmdef.meta new file mode 100644 index 00000000..8ab9fe67 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/com.unity.multiplayer-weaver.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5710c1f859f1945b6bc9b33cff6b43fc +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/WeaverRunner.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/WeaverRunner.cs new file mode 100644 index 00000000..6d1383a1 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/WeaverRunner.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEditor.Compilation; +using UnityEngine; +using Assembly = System.Reflection.Assembly; + +namespace UnityEditor.Networking +{ + internal class WeaverRunner + { + [InitializeOnLoadMethod] + static void OnInitializeOnLoad() + { + CompilationPipeline.assemblyCompilationFinished += OnCompilationFinished; + } + + static void OnCompilationFinished(string targetAssembly, CompilerMessage[] messages) + { + const string k_HlapiRuntimeAssemblyName = "com.unity.multiplayer-hlapi.Runtime"; + + // Do nothing if there were compile errors on the target + if (messages.Length > 0) + { + foreach (var msg in messages) + { + if (msg.type == CompilerMessageType.Error) + { + return; + } + } + } + + // Should not run on the editor only assemblies + if (targetAssembly.Contains("-Editor") || targetAssembly.Contains(".Editor")) + { + return; + } + + // Should not run on own assembly + if (targetAssembly.Contains(k_HlapiRuntimeAssemblyName)) + { + return; + } + + var scriptAssembliesPath = Application.dataPath + "/../" + Path.GetDirectoryName(targetAssembly); + + string unityEngine = ""; + string unetAssemblyPath = ""; + var outputDirectory = scriptAssembliesPath; + var assemblyPath = targetAssembly; + + var assemblies = AppDomain.CurrentDomain.GetAssemblies(); + bool usesUnet = false; + bool foundThisAssembly = false; + HashSet depenencyPaths = new HashSet(); + foreach (var assembly in assemblies) + { + // Find the assembly currently being compiled from domain assembly list and check if it's using unet + if (assembly.GetName().Name == Path.GetFileNameWithoutExtension(targetAssembly)) + { + foundThisAssembly = true; + foreach (var dependency in assembly.GetReferencedAssemblies()) + { + // Since this assembly is already loaded in the domain this is a no-op and retuns the + // already loaded assembly + var location = Assembly.Load(dependency).Location; + depenencyPaths.Add(Path.GetDirectoryName(location)); + if (dependency.Name.Contains(k_HlapiRuntimeAssemblyName)) + { + usesUnet = true; + } + } + } + try + { + if (assembly.Location.Contains("UnityEngine.CoreModule")) + { + unityEngine = assembly.Location; + } + if (assembly.Location.Contains(k_HlapiRuntimeAssemblyName)) + { + unetAssemblyPath = assembly.Location; + } + } + catch (NotSupportedException) + { + // in memory assembly, can't get location + } + } + + if (!foundThisAssembly) + { + // Target assembly not found in current domain, trying to load it to check references + // will lead to trouble in the build pipeline, so lets assume it should go to weaver. + // Add all assemblies in current domain to dependency list since there could be a + // dependency lurking there (there might be generated assemblies so ignore file not found exceptions). + // (can happen in runtime test framework on editor platform and when doing full library reimport) + foreach (var assembly in assemblies) + { + try + { + if (!(assembly.ManifestModule is System.Reflection.Emit.ModuleBuilder)) + depenencyPaths.Add(Path.GetDirectoryName(Assembly.Load(assembly.GetName().Name).Location)); + } + catch (FileNotFoundException) { } + } + usesUnet = true; + } + + if (!usesUnet) + { + return; + } + + if (string.IsNullOrEmpty(unityEngine)) + { + Debug.LogError("Failed to find UnityEngine assembly"); + return; + } + + if (string.IsNullOrEmpty(unetAssemblyPath)) + { + Debug.LogError("Failed to find hlapi runtime assembly"); + return; + } + + Unity.UNetWeaver.Program.Process(unityEngine, unetAssemblyPath, outputDirectory, new[] { assemblyPath }, depenencyPaths.ToArray(), (value) => { Debug.LogWarning(value); }, (value) => { Debug.LogError(value); }); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/WeaverRunner.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/WeaverRunner.cs.meta new file mode 100644 index 00000000..5eb75b81 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/WeaverRunner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 797340595bd17ed4189e10864f25e59d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/com.unity.multiplayer-hlapi.Editor.asmdef b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/com.unity.multiplayer-hlapi.Editor.asmdef new file mode 100644 index 00000000..6114bda9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/com.unity.multiplayer-hlapi.Editor.asmdef @@ -0,0 +1,11 @@ +{ + "name": "com.unity.multiplayer-hlapi.Editor", + "references": [ + "com.unity.multiplayer-hlapi.Runtime", + "com.unity.multiplayer-weaver.Editor" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/com.unity.multiplayer-hlapi.Editor.asmdef.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/com.unity.multiplayer-hlapi.Editor.asmdef.meta new file mode 100644 index 00000000..453e60d0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/com.unity.multiplayer-hlapi.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1c73e6e1e2b784953a9212924dc002d1 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/LICENSE.md b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/LICENSE.md new file mode 100644 index 00000000..b2c40499 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018, Unity Technologies + +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. diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/LICENSE.md.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/LICENSE.md.meta new file mode 100644 index 00000000..31b820e5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2dd1b56bf11f348de88b74fa6f24c1fb +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/README.md b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/README.md new file mode 100644 index 00000000..16713854 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/README.md @@ -0,0 +1,50 @@ +# README # + +The Unity Multiplayer High Level API is the open source component of the Unity Multiplayer system, this was formerly a Unity extension DLL with some parts in the engine itself, now it all exist in a package. In this package we have the whole networking system except the NetworkTransport related APIs and classes. This is all the high level classes and components which make up the user friendly system of creating multiplayer games. This document details how you can enable or embed the package and use it in your games and applications. + +### What license is the Unity Multiplayer HLAPI package shipped under? ### +Unity Multiplayer HLAPI package is released under an MIT/X11 license; see the LICENSE.md file. + +This means that you pretty much can customize and embed it in any software under any license without any other constraints than preserving the copyright and license information while adding your own copyright and license information. + +You can keep the source to yourself or share your customized version under the same MIT license or a compatible license. + +If you want to contribute patches back, please keep it under the unmodified MIT license so it can be integrated in future versions and shared under the same license. + +### How do I get started? ### +* Go to the Package Manager UI in the Unity editor (found under the Window menu). +* Make sure "Show preview packages" is enabled in the Advanced menu in the package manager UI. +* The HLAPI package should appear in the list of packages, select it and click the Install button + +or + +* Add the package to your project manifest.json file, located in the Packages folder. Under dependencies add the line _"com.unity.multiplayer-hlapi": "0.2.6-preview"_ to the list of packages. A specific version needs to be chosen. + +or + +* Clone this repository into the Packages folder. + +### Running tests ### + +When the package files are directly included in the Packages folder of the projects (or somewhere in the Assets folder), the tests will appear and can be executed. + +When including the package via the manifest.json file the `testable` field needs to be added: + +``` +{ + "dependencies": { + "com.unity.multiplayer-hlapi": "0.2.6-preview", + ... more stuff... + }, + "testables": [ + "com.unity.multiplayer-hlapi" + ] +} +``` + +where there referenced package number should be the latest or whatever version is being tested. + +When the package is included for the first time, it will be compiled, and some of the test will fail to run since the weaver has not had a chance to run yet. Triggering a recompile should fix that, for example by reimporting some script or triggering a build. + +### Will you be taking pull requests? ### +We'll consider all incoming pull requests that we get. It's likely we'll take bug fixes this way but anything else will be handled on a case by case basis. Changes will not be applied directly to this repository but to an internal package repository which will be periodically synchronized with this one. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/README.md.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/README.md.meta new file mode 100644 index 00000000..9dc0f8c2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bb7d418ab37394719a670e67b17bbc91 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime.meta new file mode 100644 index 00000000..02e6b02e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7defc7bf94b1446dabcab272922d1ca6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelBuffer.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelBuffer.cs new file mode 100644 index 00000000..5f5ebc34 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelBuffer.cs @@ -0,0 +1,403 @@ +#if ENABLE_UNET +using System; +using System.Collections.Generic; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + class ChannelBuffer : IDisposable + { + NetworkConnection m_Connection; + + ChannelPacket m_CurrentPacket; + + float m_LastFlushTime; + + byte m_ChannelId; + int m_MaxPacketSize; + bool m_IsReliable; + bool m_AllowFragmentation; + bool m_IsBroken; + int m_MaxPendingPacketCount; + + const int k_MaxFreePacketCount = 512; // this is for all connections. maybe make this configurable + public const int MaxPendingPacketCount = 16; // this is per connection. each is around 1400 bytes (MTU) + public const int MaxBufferedPackets = 512; + + Queue m_PendingPackets; + static List s_FreePackets; + static internal int pendingPacketCount; // this is across all connections. only used for profiler metrics. + + // config + public float maxDelay = 0.01f; + + // stats + float m_LastBufferedMessageCountTimer = Time.realtimeSinceStartup; + + public int numMsgsOut { get; private set; } + public int numBufferedMsgsOut { get; private set; } + public int numBytesOut { get; private set; } + + public int numMsgsIn { get; private set; } + public int numBytesIn { get; private set; } + + public int numBufferedPerSecond { get; private set; } + public int lastBufferedPerSecond { get; private set; } + + static NetworkWriter s_SendWriter = new NetworkWriter(); + static NetworkWriter s_FragmentWriter = new NetworkWriter(); + + // We need to reserve some space for header information, this will be taken off the total channel buffer size + const int k_PacketHeaderReserveSize = 100; + + public ChannelBuffer(NetworkConnection conn, int bufferSize, byte cid, bool isReliable, bool isSequenced) + { + m_Connection = conn; + m_MaxPacketSize = bufferSize - k_PacketHeaderReserveSize; + m_CurrentPacket = new ChannelPacket(m_MaxPacketSize, isReliable); + + m_ChannelId = cid; + m_MaxPendingPacketCount = MaxPendingPacketCount; + m_IsReliable = isReliable; + m_AllowFragmentation = (isReliable && isSequenced); + if (isReliable) + { + m_PendingPackets = new Queue(); + if (s_FreePackets == null) + { + s_FreePackets = new List(); + } + } + } + + // Track whether Dispose has been called. + bool m_Disposed; + + public void Dispose() + { + Dispose(true); + // Take yourself off the Finalization queue + // to prevent finalization code for this object + // from executing a second time. + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + // Check to see if Dispose has already been called. + if (!m_Disposed) + { + if (disposing) + { + if (m_PendingPackets != null) + { + while (m_PendingPackets.Count > 0) + { + pendingPacketCount -= 1; + + ChannelPacket packet = m_PendingPackets.Dequeue(); + if (s_FreePackets.Count < k_MaxFreePacketCount) + { + s_FreePackets.Add(packet); + } + } + m_PendingPackets.Clear(); + } + } + } + m_Disposed = true; + } + + public bool SetOption(ChannelOption option, int value) + { + switch (option) + { + case ChannelOption.MaxPendingBuffers: + { + if (!m_IsReliable) + { + // not an error + //if (LogFilter.logError) { Debug.LogError("Cannot set MaxPendingBuffers on unreliable channel " + m_ChannelId); } + return false; + } + if (value < 0 || value >= MaxBufferedPackets) + { + if (LogFilter.logError) { Debug.LogError("Invalid MaxPendingBuffers for channel " + m_ChannelId + ". Must be greater than zero and less than " + k_MaxFreePacketCount); } + return false; + } + m_MaxPendingPacketCount = value; + return true; + } + + case ChannelOption.AllowFragmentation: + { + m_AllowFragmentation = (value != 0); + return true; + } + + case ChannelOption.MaxPacketSize: + { + if (!m_CurrentPacket.IsEmpty() || m_PendingPackets.Count > 0) + { + if (LogFilter.logError) { Debug.LogError("Cannot set MaxPacketSize after sending data."); } + return false; + } + + if (value <= 0) + { + if (LogFilter.logError) { Debug.LogError("Cannot set MaxPacketSize less than one."); } + return false; + } + + if (value > m_MaxPacketSize) + { + if (LogFilter.logError) { Debug.LogError("Cannot set MaxPacketSize to greater than the existing maximum (" + m_MaxPacketSize + ")."); } + return false; + } + // rebuild the packet with the new size. the packets doesn't store a size variable, just has the size of the internal buffer + m_CurrentPacket = new ChannelPacket(value, m_IsReliable); + m_MaxPacketSize = value; + return true; + } + } + return false; + } + + public void CheckInternalBuffer() + { + if (Time.realtimeSinceStartup - m_LastFlushTime > maxDelay && !m_CurrentPacket.IsEmpty()) + { + SendInternalBuffer(); + m_LastFlushTime = Time.realtimeSinceStartup; + } + + if (Time.realtimeSinceStartup - m_LastBufferedMessageCountTimer > 1.0f) + { + lastBufferedPerSecond = numBufferedPerSecond; + numBufferedPerSecond = 0; + m_LastBufferedMessageCountTimer = Time.realtimeSinceStartup; + } + } + + public bool SendWriter(NetworkWriter writer) + { + return SendBytes(writer.AsArraySegment().Array, writer.AsArraySegment().Count); + } + + public bool Send(short msgType, MessageBase msg) + { + // build the stream + s_SendWriter.StartMessage(msgType); + msg.Serialize(s_SendWriter); + s_SendWriter.FinishMessage(); + + numMsgsOut += 1; + return SendWriter(s_SendWriter); + } + + internal NetBuffer fragmentBuffer = new NetBuffer(); + bool readingFragment = false; + + internal bool HandleFragment(NetworkReader reader) + { + int state = reader.ReadByte(); + if (state == 0) + { + if (readingFragment == false) + { + fragmentBuffer.SeekZero(); + readingFragment = true; + } + + byte[] data = reader.ReadBytesAndSize(); + fragmentBuffer.WriteBytes(data, (ushort)data.Length); + return false; + } + else + { + readingFragment = false; + return true; + } + } + + internal bool SendFragmentBytes(byte[] bytes, int bytesToSend) + { + const int fragmentHeaderSize = 32; + int pos = 0; + while (bytesToSend > 0) + { + int diff = Math.Min(bytesToSend, m_MaxPacketSize - fragmentHeaderSize); + byte[] buffer = new byte[diff]; + Array.Copy(bytes, pos, buffer, 0, diff); + + s_FragmentWriter.StartMessage(MsgType.Fragment); + s_FragmentWriter.Write((byte)0); + s_FragmentWriter.WriteBytesFull(buffer); + s_FragmentWriter.FinishMessage(); + SendWriter(s_FragmentWriter); + + pos += diff; + bytesToSend -= diff; + } + + // send finish + s_FragmentWriter.StartMessage(MsgType.Fragment); + s_FragmentWriter.Write((byte)1); + s_FragmentWriter.FinishMessage(); + SendWriter(s_FragmentWriter); + + return true; + } + + internal bool SendBytes(byte[] bytes, int bytesToSend) + { +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.HLAPIMsg); +#endif + if (bytesToSend >= UInt16.MaxValue) + { + if (LogFilter.logError) { Debug.LogError("ChannelBuffer:SendBytes cannot send packet larger than " + UInt16.MaxValue + " bytes"); } + return false; + } + + if (bytesToSend <= 0) + { + // zero length packets getting into the packet queues are bad. + if (LogFilter.logError) { Debug.LogError("ChannelBuffer:SendBytes cannot send zero bytes"); } + return false; + } + + if (bytesToSend > m_MaxPacketSize) + { + if (m_AllowFragmentation) + { + return SendFragmentBytes(bytes, bytesToSend); + } + else + { + // cannot do HLAPI fragmentation on this channel + if (LogFilter.logError) { Debug.LogError("Failed to send big message of " + bytesToSend + " bytes. The maximum is " + m_MaxPacketSize + " bytes on channel:" + m_ChannelId); } + return false; + } + } + + if (!m_CurrentPacket.HasSpace(bytesToSend)) + { + if (m_IsReliable) + { + if (m_PendingPackets.Count == 0) + { + // nothing in the pending queue yet, just flush and write + if (!m_CurrentPacket.SendToTransport(m_Connection, m_ChannelId)) + { + QueuePacket(); + } + m_CurrentPacket.Write(bytes, bytesToSend); + return true; + } + + if (m_PendingPackets.Count >= m_MaxPendingPacketCount) + { + if (!m_IsBroken) + { + // only log this once, or it will spam the log constantly + if (LogFilter.logError) { Debug.LogError("ChannelBuffer buffer limit of " + m_PendingPackets.Count + " packets reached."); } + } + m_IsBroken = true; + return false; + } + + // calling SendToTransport here would write out-of-order data to the stream. just queue + QueuePacket(); + m_CurrentPacket.Write(bytes, bytesToSend); + return true; + } + + if (!m_CurrentPacket.SendToTransport(m_Connection, m_ChannelId)) + { + if (LogFilter.logError) { Debug.Log("ChannelBuffer SendBytes no space on unreliable channel " + m_ChannelId); } + return false; + } + + m_CurrentPacket.Write(bytes, bytesToSend); + return true; + } + + m_CurrentPacket.Write(bytes, bytesToSend); + if (maxDelay == 0.0f) + { + return SendInternalBuffer(); + } + return true; + } + + void QueuePacket() + { + pendingPacketCount += 1; + m_PendingPackets.Enqueue(m_CurrentPacket); + m_CurrentPacket = AllocPacket(); + } + + ChannelPacket AllocPacket() + { +#if UNITY_EDITOR + Profiler.SetStatOutgoing(MsgType.HLAPIPending, pendingPacketCount); +#endif + if (s_FreePackets.Count == 0) + { + return new ChannelPacket(m_MaxPacketSize, m_IsReliable); + } + + var packet = s_FreePackets[s_FreePackets.Count - 1]; + s_FreePackets.RemoveAt(s_FreePackets.Count - 1); + + packet.Reset(); + return packet; + } + + static void FreePacket(ChannelPacket packet) + { +#if UNITY_EDITOR + Profiler.SetStatOutgoing(MsgType.HLAPIPending, pendingPacketCount); +#endif + if (s_FreePackets.Count >= k_MaxFreePacketCount) + { + // just discard this packet, already tracking too many free packets + return; + } + s_FreePackets.Add(packet); + } + + public bool SendInternalBuffer() + { +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.LLAPIMsg); +#endif + if (m_IsReliable && m_PendingPackets.Count > 0) + { + // send until transport can take no more + while (m_PendingPackets.Count > 0) + { + var packet = m_PendingPackets.Dequeue(); + if (!packet.SendToTransport(m_Connection, m_ChannelId)) + { + m_PendingPackets.Enqueue(packet); + break; + } + pendingPacketCount -= 1; + FreePacket(packet); + + if (m_IsBroken && m_PendingPackets.Count < (m_MaxPendingPacketCount / 2)) + { + if (LogFilter.logWarn) { Debug.LogWarning("ChannelBuffer recovered from overflow but data was lost."); } + m_IsBroken = false; + } + } + return true; + } + return m_CurrentPacket.SendToTransport(m_Connection, m_ChannelId); + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelBuffer.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelBuffer.cs.meta new file mode 100644 index 00000000..f20cc448 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelBuffer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b1d9f894ee8834d4681d54402568261c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelPacket.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelPacket.cs new file mode 100644 index 00000000..ffc1841e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelPacket.cs @@ -0,0 +1,81 @@ +#if ENABLE_UNET +using System; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + // This is used by the ChannelBuffer when buffering traffic. + // Unreliable channels have a single ChannelPacket, Reliable channels have single "current" packet and a list of buffered ChannelPackets + struct ChannelPacket + { + public ChannelPacket(int packetSize, bool isReliable) + { + m_Position = 0; + m_Buffer = new byte[packetSize]; + m_IsReliable = isReliable; + } + + public void Reset() + { + m_Position = 0; + } + + public bool IsEmpty() + { + return m_Position == 0; + } + + public void Write(byte[] bytes, int numBytes) + { + Array.Copy(bytes, 0, m_Buffer, m_Position, numBytes); + m_Position += numBytes; + } + + public bool HasSpace(int numBytes) + { + return m_Position + numBytes <= m_Buffer.Length; + } + + public bool SendToTransport(NetworkConnection conn, int channelId) + { + byte error; + + bool result = true; + if (!conn.TransportSend(m_Buffer, (ushort)m_Position, channelId, out error)) + { + if (m_IsReliable && error == (int)NetworkError.NoResources) + { + // handled below + } + else + { + if (LogFilter.logError) { Debug.LogError("Failed to send internal buffer channel:" + channelId + " bytesToSend:" + m_Position); } + result = false; + } + } + if (error != 0) + { + if (m_IsReliable && error == (int)NetworkError.NoResources) + { + // this packet will be buffered by the containing ChannelBuffer, so this is not an error + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.HLAPIResend); +#endif + return false; + } + + if (LogFilter.logError) { Debug.LogError("Send Error: " + (NetworkError)error + " channel:" + channelId + " bytesToSend:" + m_Position); } + result = false; + } + m_Position = 0; + return result; + } + + int m_Position; + byte[] m_Buffer; + bool m_IsReliable; + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelPacket.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelPacket.cs.meta new file mode 100644 index 00000000..c25ddf8c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ChannelPacket.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 54c9833f892c64fd294a81dd9ffc47ab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ClientScene.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ClientScene.cs new file mode 100644 index 00000000..7c109d02 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ClientScene.cs @@ -0,0 +1,1135 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Networking.NetworkSystem; + +namespace UnityEngine.Networking +{ + /// + /// A client manager which contains static client information and functions. + /// This manager contains references to tracked static local objects such as spawner registrations. It also has the default message handlers used by clients when they registered none themselves. The manager handles adding/removing player objects to the game after a client connection has been set as ready. + /// The ClientScene is a singleton, and it has static convenience methods such as ClientScene.Ready(). + /// The ClientScene is used by the NetworkManager, but it can be used by itself. + /// As the ClientScene manages player objects on the client, it is where clients request to add players. The NetworkManager does this via the ClientScene automatically when auto-add-players is set, but it can be done through code using the function ClientScene.AddPlayer(). This sends an AddPlayer message to the server and will cause a player object to be created for this client. + /// Like NetworkServer, the ClientScene understands the concept of the local client. The function ClientScene.ConnectLocalServer() is used to become a host by starting a local client (when a server is already running). + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ClientScene + { + static List s_LocalPlayers = new List(); + static NetworkConnection s_ReadyConnection; + static Dictionary s_SpawnableObjects; + + static bool s_IsReady; + static bool s_IsSpawnFinished; + static NetworkScene s_NetworkScene = new NetworkScene(); + + // static message objects to avoid runtime-allocations + static ObjectSpawnSceneMessage s_ObjectSpawnSceneMessage = new ObjectSpawnSceneMessage(); + static ObjectSpawnFinishedMessage s_ObjectSpawnFinishedMessage = new ObjectSpawnFinishedMessage(); + static ObjectDestroyMessage s_ObjectDestroyMessage = new ObjectDestroyMessage(); + static ObjectSpawnMessage s_ObjectSpawnMessage = new ObjectSpawnMessage(); + static OwnerMessage s_OwnerMessage = new OwnerMessage(); + static ClientAuthorityMessage s_ClientAuthorityMessage = new ClientAuthorityMessage(); + + /// + /// An invalid reconnect Id. + /// + public const int ReconnectIdInvalid = -1; + /// + /// A constant ID used by the old host when it reconnects to the new host. + /// + public const int ReconnectIdHost = 0; + static int s_ReconnectId = ReconnectIdInvalid; + static PeerInfoMessage[] s_Peers; + static bool hasMigrationPending() { return s_ReconnectId != ReconnectIdInvalid; } + + /// + /// Sets the Id that the ClientScene will use when reconnecting to a new host after host migration. + /// + /// The Id to use when reconnecting to a game. + /// The set of known peers in the game. This may be null. + static public void SetReconnectId(int newReconnectId, PeerInfoMessage[] peers) + { + s_ReconnectId = newReconnectId; + s_Peers = peers; + + if (LogFilter.logDebug) { Debug.Log("ClientScene::SetReconnectId: " + newReconnectId); } + } + + static internal void SetNotReady() + { + s_IsReady = false; + } + + struct PendingOwner + { + public NetworkInstanceId netId; + public short playerControllerId; + } + static List s_PendingOwnerIds = new List(); + + /// + /// A list of all players added to the game. + /// These are the players on this client, not all of the players in the game on the server. The client has no explicit knowledge of the player objects of other clients. + /// + public static List localPlayers { get { return s_LocalPlayers; } } + /// + /// Returns true when a client's connection has been set to ready. + /// A client that is ready recieves state updates from the server, while a client that is not ready does not. This useful when the state of the game is not normal, such as a scene change or end-of-game. + /// This is read-only. To change the ready state of a client, use ClientScene.Ready(). The server is able to set the ready state of clients using NetworkServer.SetClientReady(), NetworkServer.SetClientNotReady() and NetworkServer.SetAllClientsNotReady(). + /// This is done when changing scenes so that clients don't receive state update messages during scene loading. + /// + public static bool ready { get { return s_IsReady; } } + /// + /// The NetworkConnection object that is currently "ready". This is the connection to the server where objects are spawned from. + /// This connection can be used to send messages to the server. There can only be one ready connection at a time. There can be multiple NetworkClient instances in existence, each with their own NetworkConnections, but there is only one ClientScene instance and corresponding ready connection. + /// + public static NetworkConnection readyConnection { get { return s_ReadyConnection; }} + + /// + /// The reconnectId to use when a client reconnects to the new host of a game after the old host was lost. + /// This will be ClientScene.ReconnectIdInvalid by default (-1), and will be ClientScene.ReconnectIdHost when the old host is reconnecting to the host of the new game. + /// + public static int reconnectId { get { return s_ReconnectId; }} + + /// + /// This is a dictionary of networked objects that have been spawned on the client. + /// The key of the dictionary is the NetworkIdentity netId of the objects. + /// + //NOTE: spawn handlers, prefabs and local objects now live in NetworkScene + public static Dictionary objects { get { return s_NetworkScene.localObjects; } } + /// + /// This is a dictionary of the prefabs that are registered on the client with ClientScene.RegisterPrefab(). + /// The key to the dictionary is the prefab asset Id. + /// + public static Dictionary prefabs { get { return NetworkScene.guidToPrefab; } } + /// + /// This is dictionary of the disabled NetworkIdentity objects in the scene that could be spawned by messages from the server. + /// The key to the dictionary is the NetworkIdentity sceneId. + /// + public static Dictionary spawnableObjects { get { return s_SpawnableObjects; } } + + internal static void Shutdown() + { + s_NetworkScene.Shutdown(); + s_LocalPlayers = new List(); + s_PendingOwnerIds = new List(); + s_SpawnableObjects = null; + s_ReadyConnection = null; + s_IsReady = false; + s_IsSpawnFinished = false; + s_ReconnectId = ReconnectIdInvalid; + NetworkManager.activeTransport.Shutdown(); + NetworkManager.activeTransport.Init(); + } + + internal static bool GetPlayerController(short playerControllerId, out PlayerController player) + { + player = null; + if (playerControllerId >= localPlayers.Count) + { + if (LogFilter.logWarn) { Debug.Log("ClientScene::GetPlayer: no local player found for: " + playerControllerId); } + return false; + } + + if (localPlayers[playerControllerId] == null) + { + if (LogFilter.logWarn) { Debug.LogWarning("ClientScene::GetPlayer: local player is null for: " + playerControllerId); } + return false; + } + player = localPlayers[playerControllerId]; + return player.gameObject != null; + } + + // this is called from message handler for Owner message + internal static void InternalAddPlayer(NetworkIdentity view, short playerControllerId) + { + if (LogFilter.logDebug) { Debug.LogWarning("ClientScene::InternalAddPlayer: playerControllerId : " + playerControllerId); } + + if (playerControllerId >= s_LocalPlayers.Count) + { + if (LogFilter.logWarn) { Debug.LogWarning("ClientScene::InternalAddPlayer: playerControllerId higher than expected: " + playerControllerId); } + while (playerControllerId >= s_LocalPlayers.Count) + { + s_LocalPlayers.Add(new PlayerController()); + } + } + + // NOTE: It can be "normal" when changing scenes for the player to be destroyed and recreated. + // But, the player structures are not cleaned up, we'll just replace the old player + var newPlayer = new PlayerController {gameObject = view.gameObject, playerControllerId = playerControllerId, unetView = view}; + s_LocalPlayers[playerControllerId] = newPlayer; + if (s_ReadyConnection == null) + { + if (LogFilter.logWarn) { Debug.LogWarning("No ready connection found for setting player controller during InternalAddPlayer"); } + } + else + { + s_ReadyConnection.SetPlayerController(newPlayer); + } + } + + /// + /// This adds a player GameObject for this client. This causes an AddPlayer message to be sent to the server, and NetworkManager.OnServerAddPlayer is called. If an extra message was passed to AddPlayer, then OnServerAddPlayer will be called with a NetworkReader that contains the contents of the message. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. This is not the global player number. + /// + /// The local player ID number. + /// True if player was added. + // use this if already ready + public static bool AddPlayer(short playerControllerId) + { + return AddPlayer(null, playerControllerId); + } + + /// + /// This adds a player GameObject for this client. This causes an AddPlayer message to be sent to the server, and NetworkManager.OnServerAddPlayer is called. If an extra message was passed to AddPlayer, then OnServerAddPlayer will be called with a NetworkReader that contains the contents of the message. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. This is not the global player number. + /// + /// The connection to become ready for this client. + /// The local player ID number. + /// True if player was added. + // use this to implicitly become ready + public static bool AddPlayer(NetworkConnection readyConn, short playerControllerId) + { + return AddPlayer(readyConn, playerControllerId, null); + } + + /// + /// This adds a player GameObject for this client. This causes an AddPlayer message to be sent to the server, and NetworkManager.OnServerAddPlayer is called. If an extra message was passed to AddPlayer, then OnServerAddPlayer will be called with a NetworkReader that contains the contents of the message. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. This is not the global player number. + /// + /// The connection to become ready for this client. + /// The local player ID number. + /// An extra message object that can be passed to the server for this player. + /// True if player was added. + // use this to implicitly become ready + public static bool AddPlayer(NetworkConnection readyConn, short playerControllerId, MessageBase extraMessage) + { + if (playerControllerId < 0) + { + if (LogFilter.logError) { Debug.LogError("ClientScene::AddPlayer: playerControllerId of " + playerControllerId + " is negative"); } + return false; + } + if (playerControllerId > PlayerController.MaxPlayersPerClient) + { + if (LogFilter.logError) { Debug.LogError("ClientScene::AddPlayer: playerControllerId of " + playerControllerId + " is too high, max is " + PlayerController.MaxPlayersPerClient); } + return false; + } + if (playerControllerId > PlayerController.MaxPlayersPerClient / 2) + { + if (LogFilter.logWarn) { Debug.LogWarning("ClientScene::AddPlayer: playerControllerId of " + playerControllerId + " is unusually high"); } + } + + // fill out local players array + while (playerControllerId >= s_LocalPlayers.Count) + { + s_LocalPlayers.Add(new PlayerController()); + } + + // ensure valid ready connection + if (readyConn == null) + { + if (!s_IsReady) + { + if (LogFilter.logError) { Debug.LogError("Must call AddPlayer() with a connection the first time to become ready."); } + return false; + } + } + else + { + s_IsReady = true; + s_ReadyConnection = readyConn; + } + + PlayerController existingPlayerController; + if (s_ReadyConnection.GetPlayerController(playerControllerId, out existingPlayerController)) + { + if (existingPlayerController.IsValid && existingPlayerController.gameObject != null) + { + if (LogFilter.logError) { Debug.LogError("ClientScene::AddPlayer: playerControllerId of " + playerControllerId + " already in use."); } + return false; + } + } + + if (LogFilter.logDebug) { Debug.Log("ClientScene::AddPlayer() for ID " + playerControllerId + " called with connection [" + s_ReadyConnection + "]"); } + + if (!hasMigrationPending()) + { + var msg = new AddPlayerMessage(); + msg.playerControllerId = playerControllerId; + if (extraMessage != null) + { + var writer = new NetworkWriter(); + extraMessage.Serialize(writer); + msg.msgData = writer.ToArray(); + msg.msgSize = writer.Position; + } + s_ReadyConnection.Send(MsgType.AddPlayer, msg); + } + else + { + return SendReconnectMessage(extraMessage); + } + return true; + } + + /// + /// Send a reconnect message to the new host, used during host migration. + /// An example usage might be that if you decide to spawn your own player and not use the built in "Auto Create Player" property in the NetworkManager together with HostMigration, you would need to send a reconnect message when your client reconnects. The code below illustrates such an example were we OnClientConnect check if we where disconnected from the host and in that case we send the reconnect message. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class NetworkManagerEx : NetworkManager + /// { + /// public override void OnClientConnect(NetworkConnection conn) + /// { + /// base.OnClientConnect(conn); + /// if (migrationManager.disconnectedFromHost) + /// { + /// ClientScene.SendReconnectMessage(null); + /// } + /// } + /// } + /// + /// + /// Any extra data to send. + /// Returns true if the send succeeded. + public static bool SendReconnectMessage(MessageBase extraMessage) + { + if (!hasMigrationPending()) + return false; + + if (LogFilter.logDebug) { Debug.Log("ClientScene::AddPlayer reconnect " + s_ReconnectId); } + + if (s_Peers == null) + { + SetReconnectId(ReconnectIdInvalid, null); + if (LogFilter.logError) + { + Debug.LogError("ClientScene::AddPlayer: reconnecting, but no peers."); + } + return false; + } + + // reconnect all the players + for (int i = 0; i < s_Peers.Length; i++) + { + var peer = s_Peers[i]; + if (peer.playerIds == null) + { + // this could be empty if this peer had no players + continue; + } + if (peer.connectionId == s_ReconnectId) + { + for (int pid = 0; pid < peer.playerIds.Length; pid++) + { + var msg = new ReconnectMessage(); + msg.oldConnectionId = s_ReconnectId; + msg.netId = peer.playerIds[pid].netId; + msg.playerControllerId = peer.playerIds[pid].playerControllerId; + if (extraMessage != null) + { + var writer = new NetworkWriter(); + extraMessage.Serialize(writer); + msg.msgData = writer.ToArray(); + msg.msgSize = writer.Position; + } + + s_ReadyConnection.Send(MsgType.ReconnectPlayer, msg); + } + } + } + // this should only be done once. + SetReconnectId(ReconnectIdInvalid, null); + return true; + } + + /// + /// Removes the specified player ID from the game. + /// Both the client and the server destroy the player GameObject and remove it from the player list. The playerControllerId is scoped to this client, not global to all players or clients. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + /// The local playerControllerId number to be removed. + /// Returns true if the player was successfully destoyed and removed. + public static bool RemovePlayer(short playerControllerId) + { + if (LogFilter.logDebug) { Debug.Log("ClientScene::RemovePlayer() for ID " + playerControllerId + " called with connection [" + s_ReadyConnection + "]"); } + + PlayerController playerController; + if (s_ReadyConnection.GetPlayerController(playerControllerId, out playerController)) + { + var msg = new RemovePlayerMessage(); + msg.playerControllerId = playerControllerId; + s_ReadyConnection.Send(MsgType.RemovePlayer, msg); + + s_ReadyConnection.RemovePlayerController(playerControllerId); + s_LocalPlayers[playerControllerId] = new PlayerController(); + + Object.Destroy(playerController.gameObject); + return true; + } + if (LogFilter.logError) { Debug.LogError("Failed to find player ID " + playerControllerId); } + return false; + } + + /// + /// Signal that the client connection is ready to enter the game. + /// This could be for example when a client enters an ongoing game and has finished loading the current scene. The server should respond to the SYSTEM_READY event with an appropriate handler which instantiates the players object for example. + /// + /// using UnityEngine; + /// using UnityEngine.UI; + /// using UnityEngine.Networking; + /// + /// //This makes the GameObject a NetworkManager GameObject + /// public class Example : NetworkManager + /// { + /// public bool m_ServerStarted, m_ClientStarted; + /// public Button m_ClientButton; + /// + /// + /// //Detect when a client connects to the Server + /// public override void OnClientConnect(NetworkConnection connection) + /// { + /// ClientScene.Ready(connection); + /// ClientScene.AddPlayer(0); + /// m_ClientStarted = true; + /// //Output text to show the connection on the client side + /// Debug.Log("Client Side : Client " + connection.connectionId + " Connected!"); + /// //Register and receive the message on the Client's side (NetworkConnection.Send Example) + /// client.RegisterHandler(MsgType.Ready, ReadyMessage); + /// } + /// + /// //Use this to receive the message from the Server on the Client's side + /// public void ReadyMessage(NetworkMessage networkMessage) + /// { + /// Debug.Log("Client Ready! "); + /// } + /// + /// //Detect when a client disconnects from the Server + /// public override void OnClientDisconnect(NetworkConnection connection) + /// { + /// //Change the text to show the connection loss on the client side + /// Debug.Log("Client Side : Client " + connection.connectionId + " Lost!"); + /// m_ClientStarted = false; + /// } + /// public void ClientButton() + /// { + /// if (!m_ClientStarted) + /// { + /// NetworkServer.Reset(); + /// singleton.StartClient(); + /// m_ClientButton.GetComponentInChildren<Text>().text = "Disconnect"; + /// } + /// else + /// { + /// singleton.StopClient(); + /// } + /// } + /// } + /// + /// + /// The client connection which is ready. + /// + public static bool Ready(NetworkConnection conn) + { + if (s_IsReady) + { + if (LogFilter.logError) { Debug.LogError("A connection has already been set as ready. There can only be one."); } + return false; + } + + if (LogFilter.logDebug) { Debug.Log("ClientScene::Ready() called with connection [" + conn + "]"); } + + if (conn != null) + { + var msg = new ReadyMessage(); + conn.Send(MsgType.Ready, msg); + s_IsReady = true; + s_ReadyConnection = conn; + s_ReadyConnection.isReady = true; + return true; + } + if (LogFilter.logError) { Debug.LogError("Ready() called with invalid connection object: conn=null"); } + return false; + } + + /// + /// Create and connect a local client instance to the local server. This makes the client into a "host" - a client and server in the same process. + /// The returned local client acts like normal remote client but internally all messages are routed directly to the server process. Commands from a local client are executed synchronously on the server. + /// + /// A client object for communicating with the local server. + static public NetworkClient ConnectLocalServer() + { + var newClient = new LocalClient(); + NetworkServer.instance.ActivateLocalClientScene(); + newClient.InternalConnectLocalServer(true); + return newClient; + } + + static internal NetworkClient ReconnectLocalServer() + { + LocalClient newClient = new LocalClient(); + NetworkServer.instance.ActivateLocalClientScene(); + newClient.InternalConnectLocalServer(false); + return newClient; + } + + static internal void ClearLocalPlayers() + { + s_LocalPlayers.Clear(); + } + + static internal void HandleClientDisconnect(NetworkConnection conn) + { + if (s_ReadyConnection == conn && s_IsReady) + { + s_IsReady = false; + s_ReadyConnection = null; + } + } + + internal static void PrepareToSpawnSceneObjects() + { + //NOTE: what is there are already objects in this dict?! should we merge with them? + s_SpawnableObjects = new Dictionary(); + var uvs = Resources.FindObjectsOfTypeAll(); + for (int i = 0; i < uvs.Length; i++) + { + var uv = uvs[i]; + if (uv.gameObject.activeSelf) + { + // already active, cannot spawn it + continue; + } + + if (uv.gameObject.hideFlags == HideFlags.NotEditable || uv.gameObject.hideFlags == HideFlags.HideAndDontSave) + continue; + + if (uv.sceneId.IsEmpty()) + continue; + + s_SpawnableObjects[uv.sceneId] = uv; + + if (LogFilter.logDebug) { Debug.Log("ClientScene::PrepareSpawnObjects sceneId:" + uv.sceneId); } + } + } + + internal static NetworkIdentity SpawnSceneObject(NetworkSceneId sceneId) + { + if (s_SpawnableObjects.ContainsKey(sceneId)) + { + NetworkIdentity foundId = s_SpawnableObjects[sceneId]; + s_SpawnableObjects.Remove(sceneId); + return foundId; + } + return null; + } + + static internal void RegisterSystemHandlers(NetworkClient client, bool localClient) + { + if (localClient) + { + client.RegisterHandlerSafe(MsgType.ObjectDestroy, OnLocalClientObjectDestroy); + client.RegisterHandlerSafe(MsgType.ObjectHide, OnLocalClientObjectHide); + client.RegisterHandlerSafe(MsgType.ObjectSpawn, OnLocalClientObjectSpawn); + client.RegisterHandlerSafe(MsgType.ObjectSpawnScene, OnLocalClientObjectSpawnScene); + client.RegisterHandlerSafe(MsgType.LocalClientAuthority, OnClientAuthority); + } + else + { + // LocalClient shares the sim/scene with the server, no need for these events + client.RegisterHandlerSafe(MsgType.ObjectSpawn, OnObjectSpawn); + client.RegisterHandlerSafe(MsgType.ObjectSpawnScene, OnObjectSpawnScene); + client.RegisterHandlerSafe(MsgType.SpawnFinished, OnObjectSpawnFinished); + client.RegisterHandlerSafe(MsgType.ObjectDestroy, OnObjectDestroy); + client.RegisterHandlerSafe(MsgType.ObjectHide, OnObjectDestroy); + client.RegisterHandlerSafe(MsgType.UpdateVars, OnUpdateVarsMessage); + client.RegisterHandlerSafe(MsgType.Owner, OnOwnerMessage); + client.RegisterHandlerSafe(MsgType.SyncList, OnSyncListMessage); + client.RegisterHandlerSafe(MsgType.Animation, NetworkAnimator.OnAnimationClientMessage); + client.RegisterHandlerSafe(MsgType.AnimationParameters, NetworkAnimator.OnAnimationParametersClientMessage); + client.RegisterHandlerSafe(MsgType.LocalClientAuthority, OnClientAuthority); + } + + client.RegisterHandlerSafe(MsgType.Rpc, OnRPCMessage); + client.RegisterHandlerSafe(MsgType.SyncEvent, OnSyncEventMessage); + client.RegisterHandlerSafe(MsgType.AnimationTrigger, NetworkAnimator.OnAnimationTriggerClientMessage); + } + + // ------------------------ NetworkScene pass-throughs --------------------- + + static internal string GetStringForAssetId(NetworkHash128 assetId) + { + GameObject prefab; + if (NetworkScene.GetPrefab(assetId, out prefab)) + { + return prefab.name; + } + + SpawnDelegate handler; + if (NetworkScene.GetSpawnHandler(assetId, out handler)) + { + return handler.GetMethodName(); + } + + return "unknown"; + } + + /// + /// Registers a prefab with the UNET spawning system. + /// When a NetworkIdentity object is spawned on a server with NetworkServer.SpawnObject(), and the prefab that the object was created from was registered with RegisterPrefab(), the client will use that prefab to instantiate a corresponding client object with the same netId. + /// The NetworkManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene. + /// The set of current spawnable object is available in the ClientScene static member variable ClientScene.prefabs, which is a dictionary of NetworkAssetIds and prefab references. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class PlantSpawner : NetworkBehaviour + /// { + /// public GameObject plantPrefab; + /// + /// public override void OnStartClient() + /// { + /// ClientScene.RegisterPrefab(plantPrefab); + /// } + /// + /// [Server] + /// public void ServerSpawnPlant(Vector3 pos, Quaternion rot) + /// { + /// var plant = (GameObject)Instantiate(plantPrefab, pos, rot); + /// NetworkServer.Spawn(plant); + /// } + /// } + /// + /// The optional custom spawn and un-spawn handler functions can be used to implement more advanced spawning strategies such as object pools. + /// + /// A Prefab that will be spawned. + /// An assetId to be assigned to this prefab. This allows a dynamically created game object to be registered for an already known asset Id. + // this assigns the newAssetId to the prefab. This is for registering dynamically created game objects for already know assetIds. + static public void RegisterPrefab(GameObject prefab, NetworkHash128 newAssetId) + { + NetworkScene.RegisterPrefab(prefab, newAssetId); + } + + /// + /// Registers a prefab with the UNET spawning system. + /// When a NetworkIdentity object is spawned on a server with NetworkServer.SpawnObject(), and the prefab that the object was created from was registered with RegisterPrefab(), the client will use that prefab to instantiate a corresponding client object with the same netId. + /// The NetworkManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene. + /// The set of current spawnable object is available in the ClientScene static member variable ClientScene.prefabs, which is a dictionary of NetworkAssetIds and prefab references. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class PlantSpawner : NetworkBehaviour + /// { + /// public GameObject plantPrefab; + /// + /// public override void OnStartClient() + /// { + /// ClientScene.RegisterPrefab(plantPrefab); + /// } + /// + /// [Server] + /// public void ServerSpawnPlant(Vector3 pos, Quaternion rot) + /// { + /// var plant = (GameObject)Instantiate(plantPrefab, pos, rot); + /// NetworkServer.Spawn(plant); + /// } + /// } + /// + /// The optional custom spawn and un-spawn handler functions can be used to implement more advanced spawning strategies such as object pools. + /// + /// A Prefab that will be spawned. + static public void RegisterPrefab(GameObject prefab) + { + NetworkScene.RegisterPrefab(prefab); + } + + /// + /// Registers a prefab with the UNET spawning system. + /// When a NetworkIdentity object is spawned on a server with NetworkServer.SpawnObject(), and the prefab that the object was created from was registered with RegisterPrefab(), the client will use that prefab to instantiate a corresponding client object with the same netId. + /// The NetworkManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene. + /// The set of current spawnable object is available in the ClientScene static member variable ClientScene.prefabs, which is a dictionary of NetworkAssetIds and prefab references. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class PlantSpawner : NetworkBehaviour + /// { + /// public GameObject plantPrefab; + /// + /// public override void OnStartClient() + /// { + /// ClientScene.RegisterPrefab(plantPrefab); + /// } + /// + /// [Server] + /// public void ServerSpawnPlant(Vector3 pos, Quaternion rot) + /// { + /// var plant = (GameObject)Instantiate(plantPrefab, pos, rot); + /// NetworkServer.Spawn(plant); + /// } + /// } + /// + /// The optional custom spawn and un-spawn handler functions can be used to implement more advanced spawning strategies such as object pools. + /// + /// A Prefab that will be spawned. + /// A method to use as a custom spawnhandler on clients. + /// A method to use as a custom un-spawnhandler on clients. + static public void RegisterPrefab(GameObject prefab, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler) + { + NetworkScene.RegisterPrefab(prefab, spawnHandler, unspawnHandler); + } + + /// + /// Removes a registered spawn prefab that was setup with ClientScene.RegisterPrefab. + /// + /// The prefab to be removed from registration. + static public void UnregisterPrefab(GameObject prefab) + { + NetworkScene.UnregisterPrefab(prefab); + } + + /// + /// This is an advanced spawning function that registers a custom assetId with the UNET spawning system. + /// This can be used to register custom spawning methods for an assetId - instead of the usual method of registering spawning methods for a prefab. This should be used when no prefab exists for the spawned objects - such as when they are constructed dynamically at runtime from configuration data. + /// + /// Custom assetId string. + /// A method to use as a custom spawnhandler on clients. + /// A method to use as a custom un-spawnhandler on clients. + static public void RegisterSpawnHandler(NetworkHash128 assetId, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler) + { + NetworkScene.RegisterSpawnHandler(assetId, spawnHandler, unspawnHandler); + } + + /// + /// Removes a registered spawn handler function that was registered with ClientScene.RegisterHandler(). + /// + /// The assetId for the handler to be removed for. + static public void UnregisterSpawnHandler(NetworkHash128 assetId) + { + NetworkScene.UnregisterSpawnHandler(assetId); + } + + /// + /// This clears the registered spawn prefabs and spawn handler functions for this client. + /// + static public void ClearSpawners() + { + NetworkScene.ClearSpawners(); + } + + /// + /// Destroys all networked objects on the client. + /// This can be used to clean up when a network connection is closed. + /// + static public void DestroyAllClientObjects() + { + s_NetworkScene.DestroyAllClientObjects(); + } + + /// + /// NetId is a unique number assigned to all objects with NetworkIdentity components in a game. + /// This number is the same on the server and all connected clients for a particular object, so it can be used to identify objects across the network. The FindLocalObject() function is called on a client to transform a netId received from a server to a local game object. + /// + /// NetId of object. + /// Networked object. + static public void SetLocalObject(NetworkInstanceId netId, GameObject obj) + { + // if still receiving initial state, dont set isClient + s_NetworkScene.SetLocalObject(netId, obj, s_IsSpawnFinished, false); + } + + /// + /// This finds the local NetworkIdentity object with the specified network Id. + /// NetId is a unique number assigned to all objects with NetworkIdentity components in a game. This number is the same on the server and all connected clients for a particular object, so it can be used to identify objects across the network. The FindLocalObject() function is called on a client to transform a netId received from a server to a local game object. + /// + /// The id of the networked object. + /// The game object that matches the netId. + static public GameObject FindLocalObject(NetworkInstanceId netId) + { + return s_NetworkScene.FindLocalObject(netId); + } + + static void ApplySpawnPayload(NetworkIdentity uv, Vector3 position, byte[] payload, NetworkInstanceId netId, GameObject newGameObject, NetworkMessage netMsg) + { + if (!uv.gameObject.activeSelf) + { + uv.gameObject.SetActive(true); + } + uv.transform.position = position; + if (payload != null && payload.Length > 0) + { + var payloadReader = new NetworkReader(payload); + uv.OnUpdateVars(payloadReader, true, netMsg); + } + if (newGameObject == null) + { + return; + } + + newGameObject.SetActive(true); + uv.SetNetworkInstanceId(netId); + SetLocalObject(netId, newGameObject); + + // objects spawned as part of initial state are started on a second pass + if (s_IsSpawnFinished) + { + uv.OnStartClient(); + CheckForOwner(uv); + } + } + + static void OnObjectSpawn(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ObjectSpawnMessage); + + if (!s_ObjectSpawnMessage.assetId.IsValid()) + { + if (LogFilter.logError) { Debug.LogError("OnObjSpawn netId: " + s_ObjectSpawnMessage.netId + " has invalid asset Id"); } + return; + } + if (LogFilter.logDebug) { Debug.Log("Client spawn handler instantiating [netId:" + s_ObjectSpawnMessage.netId + " asset ID:" + s_ObjectSpawnMessage.assetId + " pos:" + s_ObjectSpawnMessage.position + "]"); } + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.ObjectSpawn, GetStringForAssetId(s_ObjectSpawnMessage.assetId)); +#endif + + NetworkIdentity localNetworkIdentity; + if (s_NetworkScene.GetNetworkIdentity(s_ObjectSpawnMessage.netId, out localNetworkIdentity)) + { + // this object already exists (was in the scene), just apply the update to existing object + ApplySpawnPayload(localNetworkIdentity, s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.payload, s_ObjectSpawnMessage.netId, null, netMsg); + return; + } + + GameObject prefab; + SpawnDelegate handler; + if (NetworkScene.GetPrefab(s_ObjectSpawnMessage.assetId, out prefab)) + { + var obj = (GameObject)Object.Instantiate(prefab, s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.rotation); + if (LogFilter.logDebug) + { + Debug.Log("Client spawn handler instantiating [netId:" + s_ObjectSpawnMessage.netId + " asset ID:" + s_ObjectSpawnMessage.assetId + " pos:" + s_ObjectSpawnMessage.position + " rotation: " + s_ObjectSpawnMessage.rotation + "]"); + } + + localNetworkIdentity = obj.GetComponent(); + if (localNetworkIdentity == null) + { + if (LogFilter.logError) { Debug.LogError("Client object spawned for " + s_ObjectSpawnMessage.assetId + " does not have a NetworkIdentity"); } + return; + } + localNetworkIdentity.Reset(); + ApplySpawnPayload(localNetworkIdentity, s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.payload, s_ObjectSpawnMessage.netId, obj, netMsg); + } + // lookup registered factory for type: + else if (NetworkScene.GetSpawnHandler(s_ObjectSpawnMessage.assetId, out handler)) + { + GameObject obj = handler(s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.assetId); + if (obj == null) + { + if (LogFilter.logWarn) { Debug.LogWarning("Client spawn handler for " + s_ObjectSpawnMessage.assetId + " returned null"); } + return; + } + localNetworkIdentity = obj.GetComponent(); + if (localNetworkIdentity == null) + { + if (LogFilter.logError) { Debug.LogError("Client object spawned for " + s_ObjectSpawnMessage.assetId + " does not have a network identity"); } + return; + } + localNetworkIdentity.Reset(); + localNetworkIdentity.SetDynamicAssetId(s_ObjectSpawnMessage.assetId); + ApplySpawnPayload(localNetworkIdentity, s_ObjectSpawnMessage.position, s_ObjectSpawnMessage.payload, s_ObjectSpawnMessage.netId, obj, netMsg); + } + else + { + if (LogFilter.logError) { Debug.LogError("Failed to spawn server object, did you forget to add it to the NetworkManager? assetId=" + s_ObjectSpawnMessage.assetId + " netId=" + s_ObjectSpawnMessage.netId); } + } + } + + static void OnObjectSpawnScene(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ObjectSpawnSceneMessage); + + if (LogFilter.logDebug) { Debug.Log("Client spawn scene handler instantiating [netId:" + s_ObjectSpawnSceneMessage.netId + " sceneId:" + s_ObjectSpawnSceneMessage.sceneId + " pos:" + s_ObjectSpawnSceneMessage.position); } + + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.ObjectSpawnScene, "sceneId"); +#endif + + NetworkIdentity localNetworkIdentity; + if (s_NetworkScene.GetNetworkIdentity(s_ObjectSpawnSceneMessage.netId, out localNetworkIdentity)) + { + // this object already exists (was in the scene) + ApplySpawnPayload(localNetworkIdentity, s_ObjectSpawnSceneMessage.position, s_ObjectSpawnSceneMessage.payload, s_ObjectSpawnSceneMessage.netId, localNetworkIdentity.gameObject, netMsg); + return; + } + + NetworkIdentity spawnedId = SpawnSceneObject(s_ObjectSpawnSceneMessage.sceneId); + if (spawnedId == null) + { + if (LogFilter.logError) { Debug.LogError("Spawn scene object not found for " + s_ObjectSpawnSceneMessage.sceneId); } + return; + } + + if (LogFilter.logDebug) { Debug.Log("Client spawn for [netId:" + s_ObjectSpawnSceneMessage.netId + "] [sceneId:" + s_ObjectSpawnSceneMessage.sceneId + "] obj:" + spawnedId.gameObject.name); } + ApplySpawnPayload(spawnedId, s_ObjectSpawnSceneMessage.position, s_ObjectSpawnSceneMessage.payload, s_ObjectSpawnSceneMessage.netId, spawnedId.gameObject, netMsg); + } + + static void OnObjectSpawnFinished(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ObjectSpawnFinishedMessage); + if (LogFilter.logDebug) { Debug.Log("SpawnFinished:" + s_ObjectSpawnFinishedMessage.state); } + + if (s_ObjectSpawnFinishedMessage.state == 0) + { + PrepareToSpawnSceneObjects(); + s_IsSpawnFinished = false; + return; + } + + foreach (var uv in objects.Values) + { + if (!uv.isClient) + { + uv.OnStartClient(); + CheckForOwner(uv); + } + } + s_IsSpawnFinished = true; + } + + static void OnObjectDestroy(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ObjectDestroyMessage); + if (LogFilter.logDebug) { Debug.Log("ClientScene::OnObjDestroy netId:" + s_ObjectDestroyMessage.netId); } + + NetworkIdentity localObject; + if (s_NetworkScene.GetNetworkIdentity(s_ObjectDestroyMessage.netId, out localObject)) + { +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.ObjectDestroy, GetStringForAssetId(localObject.assetId)); +#endif + localObject.OnNetworkDestroy(); + + if (!NetworkScene.InvokeUnSpawnHandler(localObject.assetId, localObject.gameObject)) + { + // default handling + if (localObject.sceneId.IsEmpty()) + { + Object.Destroy(localObject.gameObject); + } + else + { + // scene object.. disable it in scene instead of destroying + localObject.gameObject.SetActive(false); + s_SpawnableObjects[localObject.sceneId] = localObject; + } + } + s_NetworkScene.RemoveLocalObject(s_ObjectDestroyMessage.netId); + localObject.MarkForReset(); + } + else + { + if (LogFilter.logDebug) { Debug.LogWarning("Did not find target for destroy message for " + s_ObjectDestroyMessage.netId); } + } + } + + static void OnLocalClientObjectDestroy(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ObjectDestroyMessage); + if (LogFilter.logDebug) { Debug.Log("ClientScene::OnLocalObjectObjDestroy netId:" + s_ObjectDestroyMessage.netId); } + + s_NetworkScene.RemoveLocalObject(s_ObjectDestroyMessage.netId); + } + + static void OnLocalClientObjectHide(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ObjectDestroyMessage); + if (LogFilter.logDebug) { Debug.Log("ClientScene::OnLocalObjectObjHide netId:" + s_ObjectDestroyMessage.netId); } + + NetworkIdentity localObject; + if (s_NetworkScene.GetNetworkIdentity(s_ObjectDestroyMessage.netId, out localObject)) + { + localObject.OnSetLocalVisibility(false); + } + } + + static void OnLocalClientObjectSpawn(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ObjectSpawnMessage); + NetworkIdentity localObject; + if (s_NetworkScene.GetNetworkIdentity(s_ObjectSpawnMessage.netId, out localObject)) + { + localObject.OnSetLocalVisibility(true); + } + } + + static void OnLocalClientObjectSpawnScene(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ObjectSpawnSceneMessage); + NetworkIdentity localObject; + if (s_NetworkScene.GetNetworkIdentity(s_ObjectSpawnSceneMessage.netId, out localObject)) + { + localObject.OnSetLocalVisibility(true); + } + } + + static void OnUpdateVarsMessage(NetworkMessage netMsg) + { + NetworkInstanceId netId = netMsg.reader.ReadNetworkId(); + if (LogFilter.logDev) { Debug.Log("ClientScene::OnUpdateVarsMessage " + netId + " channel:" + netMsg.channelId); } + + + NetworkIdentity localObject; + if (s_NetworkScene.GetNetworkIdentity(netId, out localObject)) + { + localObject.OnUpdateVars(netMsg.reader, false, netMsg); + } + else + { + if (LogFilter.logWarn) { Debug.LogWarning("Did not find target for sync message for " + netId); } + } + } + + static void OnRPCMessage(NetworkMessage netMsg) + { + var cmdHash = (int)netMsg.reader.ReadPackedUInt32(); + var netId = netMsg.reader.ReadNetworkId(); + + if (LogFilter.logDebug) { Debug.Log("ClientScene::OnRPCMessage hash:" + cmdHash + " netId:" + netId); } + + NetworkIdentity uv; + if (s_NetworkScene.GetNetworkIdentity(netId, out uv)) + { + uv.HandleRPC(cmdHash, netMsg.reader); + } + else + { + if (LogFilter.logWarn) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + Debug.LogWarningFormat("Could not find target object with netId:{0} for RPC call {1}", netId, errorCmdName); + } + } + } + + static void OnSyncEventMessage(NetworkMessage netMsg) + { + var cmdHash = (int)netMsg.reader.ReadPackedUInt32(); + var netId = netMsg.reader.ReadNetworkId(); + + if (LogFilter.logDebug) { Debug.Log("ClientScene::OnSyncEventMessage " + netId); } + + NetworkIdentity uv; + if (s_NetworkScene.GetNetworkIdentity(netId, out uv)) + { + uv.HandleSyncEvent(cmdHash, netMsg.reader); + } + else + { + if (LogFilter.logWarn) { Debug.LogWarning("Did not find target for SyncEvent message for " + netId); } + } + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.SyncEvent, NetworkBehaviour.GetCmdHashHandlerName(cmdHash)); +#endif + } + + static void OnSyncListMessage(NetworkMessage netMsg) + { + var netId = netMsg.reader.ReadNetworkId(); + var cmdHash = (int)netMsg.reader.ReadPackedUInt32(); + + if (LogFilter.logDebug) { Debug.Log("ClientScene::OnSyncListMessage " + netId); } + + NetworkIdentity uv; + if (s_NetworkScene.GetNetworkIdentity(netId, out uv)) + { + uv.HandleSyncList(cmdHash, netMsg.reader); + } + else + { + if (LogFilter.logWarn) { Debug.LogWarning("Did not find target for SyncList message for " + netId); } + } + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.SyncList, NetworkBehaviour.GetCmdHashHandlerName(cmdHash)); +#endif + } + + static void OnClientAuthority(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_ClientAuthorityMessage); + + if (LogFilter.logDebug) { Debug.Log("ClientScene::OnClientAuthority for connectionId=" + netMsg.conn.connectionId + " netId: " + s_ClientAuthorityMessage.netId); } + + NetworkIdentity uv; + if (s_NetworkScene.GetNetworkIdentity(s_ClientAuthorityMessage.netId, out uv)) + { + uv.HandleClientAuthority(s_ClientAuthorityMessage.authority); + } + } + + // OnClientAddedPlayer? + static void OnOwnerMessage(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_OwnerMessage); + + if (LogFilter.logDebug) { Debug.Log("ClientScene::OnOwnerMessage - connectionId=" + netMsg.conn.connectionId + " netId: " + s_OwnerMessage.netId); } + + + // is there already an owner that is a different object?? + PlayerController oldOwner; + if (netMsg.conn.GetPlayerController(s_OwnerMessage.playerControllerId, out oldOwner)) + { + oldOwner.unetView.SetNotLocalPlayer(); + } + + NetworkIdentity localNetworkIdentity; + if (s_NetworkScene.GetNetworkIdentity(s_OwnerMessage.netId, out localNetworkIdentity)) + { + // this object already exists + localNetworkIdentity.SetConnectionToServer(netMsg.conn); + localNetworkIdentity.SetLocalPlayer(s_OwnerMessage.playerControllerId); + InternalAddPlayer(localNetworkIdentity, s_OwnerMessage.playerControllerId); + } + else + { + var pendingOwner = new PendingOwner { netId = s_OwnerMessage.netId, playerControllerId = s_OwnerMessage.playerControllerId }; + s_PendingOwnerIds.Add(pendingOwner); + } + } + + static void CheckForOwner(NetworkIdentity uv) + { + for (int i = 0; i < s_PendingOwnerIds.Count; i++) + { + var pendingOwner = s_PendingOwnerIds[i]; + + if (pendingOwner.netId == uv.netId) + { + // found owner, turn into a local player + + // Set isLocalPlayer to true on this NetworkIdentity and trigger OnStartLocalPlayer in all scripts on the same GO + uv.SetConnectionToServer(s_ReadyConnection); + uv.SetLocalPlayer(pendingOwner.playerControllerId); + + if (LogFilter.logDev) { Debug.Log("ClientScene::OnOwnerMessage - player=" + uv.gameObject.name); } + if (s_ReadyConnection.connectionId < 0) + { + if (LogFilter.logError) { Debug.LogError("Owner message received on a local client."); } + return; + } + InternalAddPlayer(uv, pendingOwner.playerControllerId); + + s_PendingOwnerIds.RemoveAt(i); + break; + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ClientScene.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ClientScene.cs.meta new file mode 100644 index 00000000..47b8219a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ClientScene.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: abdd2d10a33754ea3a14364ca854c01a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ConnectionArray.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ConnectionArray.cs new file mode 100644 index 00000000..c540dc4d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ConnectionArray.cs @@ -0,0 +1,128 @@ +#if ENABLE_UNET +using System; +using System.Collections.Generic; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + // This has a list of real connections + // The local or "fake" connections are kept separate because sometimes you + // only want to iterate through those, and not all connections. + class ConnectionArray + { + List m_LocalConnections; + List m_Connections; + + internal List localConnections { get { return m_LocalConnections; }} + internal List connections { get { return m_Connections; }} + + public int Count { get { return m_Connections.Count; } } + + public int LocalIndex { get { return -m_LocalConnections.Count; } } + + public ConnectionArray() + { + m_Connections = new List(); + m_LocalConnections = new List(); + } + + public int Add(int connId, NetworkConnection conn) + { + if (connId < 0) + { + if (LogFilter.logWarn) {Debug.LogWarning("ConnectionArray Add bad id " + connId); } + return -1; + } + + if (connId < m_Connections.Count && m_Connections[connId] != null) + { + if (LogFilter.logWarn) { Debug.LogWarning("ConnectionArray Add dupe at " + connId); } + return -1; + } + + while (connId > (m_Connections.Count - 1)) + { + m_Connections.Add(null); + } + + m_Connections[connId] = conn; + return connId; + } + + // call this if you know the connnection exists + public NetworkConnection Get(int connId) + { + if (connId < 0) + { + return m_LocalConnections[Mathf.Abs(connId) - 1]; + } + + if (connId > m_Connections.Count) + { + if (LogFilter.logWarn) { Debug.LogWarning("ConnectionArray Get invalid index " + connId); } + return null; + } + + return m_Connections[connId]; + } + + // call this if the connection may not exist (in disconnect handler) + public NetworkConnection GetUnsafe(int connId) + { + if (connId < 0 || connId > m_Connections.Count) + { + return null; + } + return m_Connections[connId]; + } + + public void Remove(int connId) + { + if (connId < 0) + { + m_LocalConnections[Mathf.Abs(connId) - 1] = null; + return; + } + + if (connId > m_Connections.Count) + { + if (LogFilter.logWarn) { Debug.LogWarning("ConnectionArray Remove invalid index " + connId); } + return; + } + m_Connections[connId] = null; + } + + public int AddLocal(NetworkConnection conn) + { + m_LocalConnections.Add(conn); + int index = -m_LocalConnections.Count; + conn.connectionId = index; + return index; + } + + public bool ContainsPlayer(GameObject player, out NetworkConnection conn) + { + conn = null; + if (player == null) + return false; + + for (int i = LocalIndex; i < m_Connections.Count; i++) + { + conn = Get(i); + if (conn != null) + { + for (int j = 0; j < conn.playerControllers.Count; j++) + { + if (conn.playerControllers[j].IsValid && conn.playerControllers[j].gameObject == player) + { + return true; + } + } + } + } + return false; + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ConnectionArray.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ConnectionArray.cs.meta new file mode 100644 index 00000000..2b00efe5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/ConnectionArray.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8416542a0deda4be393567c8dd671dd1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/CustomAttributes.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/CustomAttributes.cs new file mode 100644 index 00000000..e00775a9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/CustomAttributes.cs @@ -0,0 +1,514 @@ +using System; + + +namespace UnityEngine.Networking +{ + /// + /// This attribute is used to configure the network settings of scripts that are derived from the NetworkBehaviour base class. + /// + /// using UnityEngine.Networking; + /// + /// [NetworkSettings(channel = 1, sendInterval = 0.2f)] + /// class MyScript : NetworkBehaviour + /// { + /// [SyncVar] + /// int value; + /// } + /// + /// + [AttributeUsage(AttributeTargets.Class)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkSettingsAttribute : Attribute + { + /// + /// The QoS channel to use for updates for this script. + /// Updates for SyncVar variables will be sent on the specified QoS channel. The default channel for scripts is zero. + /// + public int channel = Channels.DefaultReliable; + /// + /// The sendInterval control how frequently updates are sent for this script. + /// If sendInterval is zero, updates will be sent at the end of the frame when dirty bits are set for that script. Note that setting the value of a SyncVar will automatically set dirty bits. + /// If sendInterval is non-zero, updates are deferred until sendInterval seconds have passed since the last update for that script. So it can be used as a throttle in cases where the Sync value is changing constantly on the server, but you don't want it to be updated every frame. + /// The default sendInterval for scripts is 0.1f seconds. + /// The send interval can also be customized by implementing the virtual function GetNetworkSendInterval() on NetworkBehaviour. + /// + public float sendInterval = 0.1f; + } + + /// + /// [SyncVar] is an attribute that can be put on member variables of NetworkBehaviour classes. These variables will have their values sychronized from the server to clients in the game that are in the ready state. + /// Setting the value of a [SyncVar] marks it as dirty, so it will be sent to clients at the end of the current frame. Only simple values can be marked as [SyncVars]. The type of the SyncVar variable cannot be from an external DLL or assembly. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Ship : NetworkBehaviour + /// { + /// [SyncVar] + /// public int health = 100; + /// + /// [SyncVar] + /// public float energy = 100; + /// } + /// + /// The allowed SyncVar types are: + /// + /// + /// Basic type (byte, int, float, string, UInt64, etc) + /// + /// + /// Built-in Unity math type (Vector3, Quaternion, etc), + /// + /// + /// Structs containing allowable types. + /// + /// + /// + [AttributeUsage(AttributeTargets.Field)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class SyncVarAttribute : Attribute + { + /// + /// The hook attribute can be used to specify a function to be called when the sync var changes value on the client. + /// This ensures that all clients receive the proper variables from other clients. + /// + /// //Attach this to the GameObject you would like to spawn (the player). + /// //Make sure to create a NetworkManager with an HUD component in your Scene. To do this, create a GameObject, click on it, and click on the Add Component button in the Inspector window. From there, Go to Network>NetworkManager and Network>NetworkManagerHUD respectively. + /// //Assign the GameObject you would like to spawn in the NetworkManager. + /// //Start the server and client for this to work. + /// + /// //Use this script to send and update variables between Networked GameObjects + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Health : NetworkBehaviour + /// { + /// public const int m_MaxHealth = 100; + /// + /// //Detects when a health change happens and calls the appropriate function + /// [SyncVar(hook = "OnChangeHealth")] + /// public int m_CurrentHealth = m_MaxHealth; + /// public RectTransform healthBar; + /// + /// public void TakeDamage(int amount) + /// { + /// if (!isServer) + /// return; + /// //Decrease the "health" of the GameObject + /// m_CurrentHealth -= amount; + /// //Make sure the health doesn't go below 0 + /// if (m_CurrentHealth <= 0) + /// { + /// m_CurrentHealth = 0; + /// } + /// } + /// + /// void Update() + /// { + /// //If the space key is pressed, decrease the GameObject's own "health" + /// if (Input.GetKey(KeyCode.Space)) + /// { + /// if (isLocalPlayer) + /// CmdTakeHealth(); + /// } + /// } + /// + /// void OnChangeHealth(int health) + /// { + /// healthBar.sizeDelta = new Vector2(health, healthBar.sizeDelta.y); + /// } + /// + /// //This is a Network command, so the damage is done to the relevant GameObject + /// [Command] + /// void CmdTakeHealth() + /// { + /// //Apply damage to the GameObject + /// TakeDamage(2); + /// } + /// } + /// + /// + public string hook; + } + + /// + /// This is an attribute that can be put on methods of NetworkBehaviour classes to allow them to be invoked on the server by sending a command from a client. + /// [Command] functions are invoked on the player GameObject associated with a connection. This is set up in response to the "ready" message, by passing the player GameObject to the NetworkServer.PlayerIsReady() function. The arguments to the command call are serialized across the network, so that the server function is invoked with the same values as the function on the client. These functions must begin with the prefix "Cmd" and cannot be static. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Player : NetworkBehaviour + /// { + /// int moveX = 0; + /// int moveY = 0; + /// float moveSpeed = 0.2f; + /// bool isDirty = false; + /// + /// void Update() + /// { + /// if (!isLocalPlayer) + /// { + /// return; + /// } + /// // input handling for local player only + /// int oldMoveX = moveX; + /// int oldMoveY = moveY; + /// moveX = 0; + /// moveY = 0; + /// if (Input.GetKey(KeyCode.LeftArrow)) + /// { + /// moveX -= 1; + /// } + /// if (Input.GetKey(KeyCode.RightArrow)) + /// { + /// moveX += 1; + /// } + /// if (Input.GetKey(KeyCode.UpArrow)) + /// { + /// moveY += 1; + /// } + /// if (Input.GetKey(KeyCode.DownArrow)) + /// { + /// moveY -= 1; + /// } + /// if (moveX != oldMoveX || moveY != oldMoveY) + /// { + /// CmdMove(moveX, moveY); + /// } + /// } + /// + /// [Command] + /// public void CmdMove(int x, int y) + /// { + /// moveX = x; + /// moveY = y; + /// isDirty = true; + /// } + /// + /// public void FixedUpdate() + /// { + /// if (NetworkServer.active) + /// { + /// transform.Translate(moveX * moveSpeed, moveY * moveSpeed, 0); + /// } + /// } + /// } + /// + /// The allowed argument types are; + /// + /// + /// Basic type (byte, int, float, string, UInt64, etc) + /// + /// + /// Built-in Unity math type (Vector3, Quaternion, etc), + /// + /// + /// Arrays of basic types + /// + /// + /// Structs containing allowable types + /// + /// + /// NetworkIdentity + /// + /// + /// NetworkInstanceId + /// + /// + /// NetworkHash128 + /// + /// + /// GameObject with a NetworkIdentity component attached. + /// + /// + /// + [AttributeUsage(AttributeTargets.Method)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class CommandAttribute : Attribute + { + /// + /// The QoS channel to use to send this command on, see QosType. + /// + public int channel = Channels.DefaultReliable; // this is zero + } + + /// + /// This is an attribute that can be put on methods of NetworkBehaviour classes to allow them to be invoked on clients from a server. + /// [ClientRPC] functions are called by code on Unity Multiplayer servers, and then invoked on corresponding GameObjects on clients connected to the server. The arguments to the RPC call are serialized across the network, so that the client function is invoked with the same values as the function on the server. These functions must begin with the prefix "Rpc" and cannot be static. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : NetworkBehaviour + /// { + /// int counter; + /// [ClientRpc] + /// public void RpcDoMagic(int extra) + /// { + /// Debug.Log("Magic = " + (123 + extra)); + /// } + /// + /// void Update() + /// { + /// counter += 1; + /// if (counter % 100 == 0 && NetworkServer.active) + /// { + /// RpcDoMagic(counter); + /// } + /// } + /// } + /// + /// The allowed argument types are; + /// + /// + /// Basic type (byte, int, float, string, UInt64, etc) + /// + /// + /// Built-in Unity math type (Vector3, Quaternion, etc), + /// + /// + /// Arrays of basic types + /// + /// + /// Structs containing allowable types + /// + /// + /// NetworkIdentity + /// + /// + /// NetworkInstanceId + /// + /// + /// NetworkHash128 + /// + /// + /// GameObject with a NetworkIdentity component attached. + /// + /// + /// + [AttributeUsage(AttributeTargets.Method)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ClientRpcAttribute : Attribute + { + /// + /// The channel ID which this RPC transmission will use. + /// + public int channel = Channels.DefaultReliable; // this is zero + } + + /// + /// This is an attribute that can be put on methods of NetworkBehaviour classes to allow them to be invoked on clients from a server. Unlike the ClientRpc attribute, these functions are invoked on one individual target client, not all of the ready clients. + /// [TargetRpc] functions are called by user code on the server, and then invoked on the corresponding client object on the client of the specified NetworkConnection. The arguments to the RPC call are serialized across the network, so that the client function is invoked with the same values as the function on the server. These functions must begin with the prefix "Target" and cannot be static. + /// The first argument to an TargetRpc function must be a NetworkConnection object. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : NetworkBehaviour + /// { + /// [TargetRpc] + /// public void TargetDoMagic(NetworkConnection target, int extra) + /// { + /// Debug.Log("Magic = " + (123 + extra)); + /// } + /// + /// [Command] + /// void CmdTest() + /// { + /// TargetDoMagic(connectionToClient, 55); + /// } + /// } + /// + /// The allowed argument types are; + /// + /// + /// Basic type (byte, int, float, string, UInt64, etc) + /// + /// + /// Built-in Unity math type (Vector3, Quaternion, etc), + /// + /// + /// Arrays of basic types + /// + /// + /// Structs containing allowable types + /// + /// + /// NetworkIdentity + /// + /// + /// NetworkInstanceId + /// + /// + /// NetworkHash128 + /// + /// + /// GameObject with a NetworkIdentity component attached. + /// + /// + /// + [AttributeUsage(AttributeTargets.Method)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class TargetRpcAttribute : Attribute + { + /// + /// The channel ID which this RPC transmission will use. + /// + public int channel = Channels.DefaultReliable; // this is zero + } + + /// + /// This is an attribute that can be put on events in NetworkBehaviour classes to allow them to be invoked on client when the event is called on the server. + /// [SyncEvent] events are called by user code on UNET servers, and then invoked on corresponding client objects on clients connected to the server. The arguments to the Event call are serialized across the network, so that the client event is invoked with the same values as the function on the server. These events must begin with the prefix "Event". + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class DamageClass : NetworkBehaviour + /// { + /// public delegate void TakeDamageDelegate(int amount, float dir); + /// + /// [SyncEvent] + /// public event TakeDamageDelegate EventTakeDamage; + /// + /// [Command] + /// public void CmdDoMe(int val) + /// { + /// EventTakeDamage(val, 1.0f); + /// } + /// } + /// + /// public class Other : NetworkBehaviour + /// { + /// public DamageClass damager; + /// int health = 100; + /// + /// void Start() + /// { + /// if (NetworkClient.active) + /// damager.EventTakeDamage += TakeDamage; + /// } + /// + /// public void TakeDamage(int amount, float dir) + /// { + /// health -= amount; + /// } + /// } + /// + /// SyncEvents allow networked actions to be propagated to other scripts attached to the object. In the example above, the Other class registers for the TakeDamage event on the DamageClass. When the event happens on the DamageClass on the server, the TakeDamage() method will be invoked on the Other class on the client object. This allows modular network aware systems to be created, that can be extended by new scripts that respond to the events generated by them. + /// + [AttributeUsage(AttributeTargets.Event)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class SyncEventAttribute : Attribute + { + /// + /// The UNET QoS channel that this event should be sent on. + /// This defaults to zero - the default reliable channel. This can be used to make events that are not essential for game play (such as effects) unreliable. + /// + public int channel = Channels.DefaultReliable; // this is zero + } + + /// + /// A Custom Attribute that can be added to member functions of NetworkBehaviour scripts, to make them only run on servers. + /// A [Server] method returns immediately if NetworkServer.active is not true, and generates a warning on the console. This attribute can be put on member functions that are meant to be only called on server. This would be redundant for Command] functions, as being server-only is already enforced for them. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : NetworkBehaviour + /// { + /// [Server] + /// public void Explode() + /// { + /// NetworkServer.Destroy(gameObject); + /// } + /// } + /// + /// + [AttributeUsage(AttributeTargets.Method)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ServerAttribute : Attribute + { + } + + /// + /// A Custom Attribute that can be added to member functions of NetworkBehaviour scripts, to make them only run on servers, but not generate warnings. + /// This custom attribute is the same as the [Server] custom attribute, except that it does not generate a warning in the console if called on a client. This is useful to avoid spamming the console for functions that will be invoked by the engine, such as Update() or physics callbacks. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : MonoBehaviour + /// { + /// float regenTimer = 0; + /// int heat = 100; + /// + /// [ServerCallback] + /// void Update() + /// { + /// // heat dissipates over time + /// if (Time.time > regenTimer) + /// { + /// if (heat > 1) + /// heat -= 2; + /// regenTimer = Time.time + 1.0f; + /// } + /// } + /// } + /// + /// + [AttributeUsage(AttributeTargets.Method)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ServerCallbackAttribute : Attribute + { + } + + /// + /// A Custom Attribute that can be added to member functions of NetworkBehaviour scripts, to make them only run on clients. + /// A [Client] method returns immediately if NetworkClient.active is not true, and generates a warning on the console. This attribute can be put on member functions that are meant to be only called on clients. This would redundant for [ClientRPC] functions, as being client-only is already enforced for them. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : MonoBehaviour + /// { + /// [Client] + /// public void OnClientDisconnected(NetworkConnection conn, NetworkReader reader) + /// { + /// Debug.Log("Client Disconnected"); + /// //ShutdownGame(); + /// Application.LoadLevel("title"); + /// } + /// } + /// + /// + [AttributeUsage(AttributeTargets.Method)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ClientAttribute : Attribute + { + } + + /// + /// A Custom Attribute that can be added to member functions of NetworkBehaviour scripts, to make them only run on clients, but not generate warnings. + /// This custom attribute is the same as the Client custom attribute, except that it does not generate a warning in the console if called on a server. This is useful to avoid spamming the console for functions that will be invoked by the engine, such as Update() or physics callbacks. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : MonoBehaviour + /// { + /// [ClientCallback] + /// void OnTriggerEnter2D(Collider2D collider) + /// { + /// // make explosion + /// } + /// } + /// + /// + [AttributeUsage(AttributeTargets.Method)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ClientCallbackAttribute : Attribute + { + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/CustomAttributes.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/CustomAttributes.cs.meta new file mode 100644 index 00000000..35fa4d2b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/CustomAttributes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e4c7e5edce8f64f18af79a7989a1b3e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DefaultNetworkTransport.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DefaultNetworkTransport.cs new file mode 100644 index 00000000..0fb04e80 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DefaultNetworkTransport.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; + +using UnityEngine.Networking.Types; + +namespace UnityEngine.Networking +{ + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + class DefaultNetworkTransport : INetworkTransport + { + public DefaultNetworkTransport() + { + } + + public bool IsStarted + { + get + { + return NetworkTransport.IsStarted; + } + } + + public int AddHost(HostTopology topology, int port, string ip) + { + return NetworkTransport.AddHost(topology, port, ip); + } + + public int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port) + { + return NetworkTransport.AddHostWithSimulator(topology, minTimeout, maxTimeout, port); + } + + public int AddWebsocketHost(HostTopology topology, int port, string ip) + { + return NetworkTransport.AddWebsocketHost(topology, port, ip); + } + + public int Connect(int hostId, string address, int port, int specialConnectionId, out byte error) + { + return NetworkTransport.Connect(hostId, address, port, specialConnectionId, out error); + } + + public void ConnectAsNetworkHost(int hostId, string address, int port, NetworkID network, SourceID source, NodeID node, out byte error) + { + NetworkTransport.ConnectAsNetworkHost(hostId, address, port, network, source, node, out error); + } + + public int ConnectEndPoint(int hostId, EndPoint endPoint, int specialConnectionId, out byte error) + { + return NetworkTransport.ConnectEndPoint(hostId, endPoint, specialConnectionId, out error); + } + + public int ConnectToNetworkPeer(int hostId, string address, int port, int specialConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, out byte error) + { + return NetworkTransport.ConnectToNetworkPeer(hostId, address, port, specialConnectionId, relaySlotId, network, source, node, out error); + } + + public int ConnectWithSimulator(int hostId, string address, int port, int specialConnectionId, out byte error, ConnectionSimulatorConfig conf) + { + return NetworkTransport.ConnectWithSimulator(hostId, address, port, specialConnectionId, out error, conf); + } + + public bool Disconnect(int hostId, int connectionId, out byte error) + { + return NetworkTransport.Disconnect(hostId, connectionId, out error); + } + + public bool DoesEndPointUsePlatformProtocols(EndPoint endPoint) + { + return NetworkTransport.DoesEndPointUsePlatformProtocols(endPoint); + } + + public void GetBroadcastConnectionInfo(int hostId, out string address, out int port, out byte error) + { + NetworkTransport.GetBroadcastConnectionInfo(hostId, out address, out port, out error); + } + + public void GetBroadcastConnectionMessage(int hostId, byte[] buffer, int bufferSize, out int receivedSize, out byte error) + { + NetworkTransport.GetBroadcastConnectionMessage(hostId, buffer, bufferSize, out receivedSize, out error); + } + + public void GetConnectionInfo(int hostId, int connectionId, out string address, out int port, out NetworkID network, out NodeID dstNode, out byte error) + { + NetworkTransport.GetConnectionInfo(hostId, connectionId, out address, out port, out network, out dstNode, out error); + } + + public int GetCurrentRTT(int hostId, int connectionId, out byte error) + { + return NetworkTransport.GetCurrentRTT(hostId, connectionId, out error); + } + + public void Init() + { + NetworkTransport.Init(); + } + + public void Init(GlobalConfig config) + { + NetworkTransport.Init(config); + } + + public NetworkEventType Receive(out int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error) + { + return NetworkTransport.Receive(out hostId, out connectionId, out channelId, buffer, bufferSize, out receivedSize, out error); + } + + public NetworkEventType ReceiveFromHost(int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error) + { + return NetworkTransport.ReceiveFromHost(hostId, out connectionId, out channelId, buffer, bufferSize, out receivedSize, out error); + } + + public NetworkEventType ReceiveRelayEventFromHost(int hostId, out byte error) + { + return NetworkTransport.ReceiveRelayEventFromHost(hostId, out error); + } + + public bool RemoveHost(int hostId) + { + return NetworkTransport.RemoveHost(hostId); + } + + public bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error) + { + return NetworkTransport.Send(hostId, connectionId, channelId, buffer, size, out error); + } + + public void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error) + { + NetworkTransport.SetBroadcastCredentials(hostId, key, version, subversion, out error); + } + + public void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes) + { + NetworkTransport.SetPacketStat(direction, packetStatId, numMsgs, numBytes); + } + + public void Shutdown() + { + NetworkTransport.Shutdown(); + } + + public bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error) + { + return NetworkTransport.StartBroadcastDiscovery(hostId, broadcastPort, key, version, subversion, buffer, size, timeout, out error); + } + + public void StopBroadcastDiscovery() + { + NetworkTransport.StopBroadcastDiscovery(); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DefaultNetworkTransport.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DefaultNetworkTransport.cs.meta new file mode 100644 index 00000000..4e905f80 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DefaultNetworkTransport.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01b6e8a08d813d444ac774e8c22deb08 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DotNetCompatibility.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DotNetCompatibility.cs new file mode 100644 index 00000000..afe50820 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DotNetCompatibility.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Net.Sockets; + +namespace UnityEngine.Networking +{ + internal static class DotNetCompatibility + { + internal static string GetMethodName(this Delegate func) + { + return func.Method.Name; + } + + internal static Type GetBaseType(this Type type) + { + return type.BaseType; + } + + internal static string GetErrorCode(this SocketException e) + { + return e.ErrorCode.ToString(); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DotNetCompatibility.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DotNetCompatibility.cs.meta new file mode 100644 index 00000000..84d88f2f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/DotNetCompatibility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8562476ce7e6e4fec936c7bc5607551c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/INetworkTransport.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/INetworkTransport.cs new file mode 100644 index 00000000..46704de2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/INetworkTransport.cs @@ -0,0 +1,65 @@ +using System; +using System.Net; + +using UnityEngine.Networking.Types; + +namespace UnityEngine.Networking +{ + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public interface INetworkTransport + { + void Init(); + + void Init(GlobalConfig config); + + bool IsStarted { get; } + + void Shutdown(); + + int AddHost(HostTopology topology, int port, string ip); + + int AddWebsocketHost(HostTopology topology, int port, string ip); + + int ConnectWithSimulator(int hostId, string address, int port, int specialConnectionId, out byte error, ConnectionSimulatorConfig conf); + + int Connect(int hostId, string address, int port, int specialConnectionId, out byte error); + + void ConnectAsNetworkHost(int hostId, string address, int port, NetworkID network, SourceID source, NodeID node, out byte error); + + int ConnectToNetworkPeer(int hostId, string address, int port, int specialConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, out byte error); + + int ConnectEndPoint(int hostId, EndPoint endPoint, int specialConnectionId, out byte error); + + bool DoesEndPointUsePlatformProtocols(EndPoint endPoint); + + int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port); + + bool RemoveHost(int hostId); + + bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error); + + NetworkEventType Receive(out int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error); + + NetworkEventType ReceiveFromHost(int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error); + + NetworkEventType ReceiveRelayEventFromHost(int hostId, out byte error); + + int GetCurrentRTT(int hostId, int connectionId, out byte error); + + void GetConnectionInfo(int hostId, int connectionId, out string address, out int port, out NetworkID network, out NodeID dstNode, out byte error); + + bool Disconnect(int hostId, int connectionId, out byte error); + + void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error); + + bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error); + + void GetBroadcastConnectionInfo(int hostId, out string address, out int port, out byte error); + + void GetBroadcastConnectionMessage(int hostId, byte[] buffer, int bufferSize, out int receivedSize, out byte error); + + void StopBroadcastDiscovery(); + + void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes); + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/INetworkTransport.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/INetworkTransport.cs.meta new file mode 100644 index 00000000..740c4e8c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/INetworkTransport.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a9d87485433b1f5449482acbe00b74f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalClient.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalClient.cs new file mode 100644 index 00000000..37b2fb02 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalClient.cs @@ -0,0 +1,176 @@ +#if ENABLE_UNET +using System.Collections.Generic; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + sealed class LocalClient : NetworkClient + { + const int k_InitialFreeMessagePoolSize = 64; + + struct InternalMsg + { + internal byte[] buffer; + internal int channelId; + } + + List m_InternalMsgs = new List(); + List m_InternalMsgs2 = new List(); + Stack m_FreeMessages; + + NetworkServer m_LocalServer; + bool m_Connected; + NetworkMessage s_InternalMessage = new NetworkMessage(); + + public override void Disconnect() + { + ClientScene.HandleClientDisconnect(m_Connection); + if (m_Connected) + { + PostInternalMessage(MsgType.Disconnect); + m_Connected = false; + } + m_AsyncConnect = ConnectState.Disconnected; + m_LocalServer.RemoveLocalClient(m_Connection); + } + + internal void InternalConnectLocalServer(bool generateConnectMsg) + { + if (m_FreeMessages == null) + { + m_FreeMessages = new Stack(); + for (int i = 0; i < k_InitialFreeMessagePoolSize; i++) + { + InternalMsg msg = new InternalMsg(); + m_FreeMessages.Push(msg); + } + } + + m_LocalServer = NetworkServer.instance; + m_Connection = new ULocalConnectionToServer(m_LocalServer); + SetHandlers(m_Connection); + m_Connection.connectionId = m_LocalServer.AddLocalClient(this); + m_AsyncConnect = ConnectState.Connected; + + SetActive(true); + RegisterSystemHandlers(true); + + if (generateConnectMsg) + { + PostInternalMessage(MsgType.Connect); + } + m_Connected = true; + } + + internal override void Update() + { + ProcessInternalMessages(); + } + + // Called by the server to set the LocalClient's LocalPlayer object during NetworkServer.AddPlayer() + internal void AddLocalPlayer(PlayerController localPlayer) + { + if (LogFilter.logDev) Debug.Log("Local client AddLocalPlayer " + localPlayer.gameObject.name + " conn=" + m_Connection.connectionId); + m_Connection.isReady = true; + m_Connection.SetPlayerController(localPlayer); + var uv = localPlayer.unetView; + if (uv != null) + { + ClientScene.SetLocalObject(uv.netId, localPlayer.gameObject); + uv.SetConnectionToServer(m_Connection); + } + // there is no SystemOwnerMessage for local client. add to ClientScene here instead + ClientScene.InternalAddPlayer(uv, localPlayer.playerControllerId); + } + + private void PostInternalMessage(byte[] buffer, int channelId) + { + InternalMsg msg; + if (m_FreeMessages.Count == 0) + { + msg = new InternalMsg(); // grow forever? + } + else + { + msg = m_FreeMessages.Pop(); + } + msg.buffer = buffer; + msg.channelId = channelId; + m_InternalMsgs.Add(msg); + } + + private void PostInternalMessage(short msgType) + { + NetworkWriter writer = new NetworkWriter(); + writer.StartMessage(msgType); + writer.FinishMessage(); + + PostInternalMessage(writer.AsArray(), 0); + } + + private void ProcessInternalMessages() + { + if (m_InternalMsgs.Count == 0) + { + return; + } + + // new msgs will get put in m_InternalMsgs2 + List tmp = m_InternalMsgs; + m_InternalMsgs = m_InternalMsgs2; + + // iterate through existing set + for (int i = 0; i < tmp.Count; i++) + { + var msg = tmp[i]; + if (s_InternalMessage.reader == null) + { + s_InternalMessage.reader = new NetworkReader(msg.buffer); + } + else + { + s_InternalMessage.reader.Replace(msg.buffer); + } + s_InternalMessage.reader.ReadInt16(); //size + s_InternalMessage.channelId = msg.channelId; + s_InternalMessage.conn = connection; + s_InternalMessage.msgType = s_InternalMessage.reader.ReadInt16(); + + m_Connection.InvokeHandler(s_InternalMessage); + m_FreeMessages.Push(msg); + connection.lastMessageTime = Time.time; + } + + // put m_InternalMsgs back and clear it + m_InternalMsgs = tmp; + m_InternalMsgs.Clear(); + + // add any newly generated msgs in m_InternalMsgs2 and clear it + for (int ii = 0; ii < m_InternalMsgs2.Count; ii++) + { + m_InternalMsgs.Add(m_InternalMsgs2[ii]); + } + m_InternalMsgs2.Clear(); + } + + // called by the server, to bypass network + internal void InvokeHandlerOnClient(short msgType, MessageBase msg, int channelId) + { + // write the message to a local buffer + NetworkWriter writer = new NetworkWriter(); + writer.StartMessage(msgType); + msg.Serialize(writer); + writer.FinishMessage(); + + InvokeBytesOnClient(writer.AsArray(), channelId); + } + + // called by the server, to bypass network + internal void InvokeBytesOnClient(byte[] buffer, int channelId) + { + PostInternalMessage(buffer, channelId); + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalClient.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalClient.cs.meta new file mode 100644 index 00000000..d7763ff7 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalClient.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ef7bef5df7ed4a5f8ce5001e7872f09 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalConnections.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalConnections.cs new file mode 100644 index 00000000..bedecbcf --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalConnections.cs @@ -0,0 +1,128 @@ +using System; + +#if ENABLE_UNET + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + // a server's connection TO a LocalClient. + // sending messages on this connection causes the client's + // handler function to be invoked directly + class ULocalConnectionToClient : NetworkConnection + { + LocalClient m_LocalClient; + + public LocalClient localClient { get { return m_LocalClient; } } + + public ULocalConnectionToClient(LocalClient localClient) + { + address = "localClient"; + m_LocalClient = localClient; + } + + public override bool Send(short msgType, MessageBase msg) + { + m_LocalClient.InvokeHandlerOnClient(msgType, msg, Channels.DefaultReliable); + return true; + } + + public override bool SendUnreliable(short msgType, MessageBase msg) + { + m_LocalClient.InvokeHandlerOnClient(msgType, msg, Channels.DefaultUnreliable); + return true; + } + + public override bool SendByChannel(short msgType, MessageBase msg, int channelId) + { + m_LocalClient.InvokeHandlerOnClient(msgType, msg, channelId); + return true; + } + + public override bool SendBytes(byte[] bytes, int numBytes, int channelId) + { + m_LocalClient.InvokeBytesOnClient(bytes, channelId); + return true; + } + + public override bool SendWriter(NetworkWriter writer, int channelId) + { + m_LocalClient.InvokeBytesOnClient(writer.AsArray(), channelId); + return true; + } + + public override void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) + { + numMsgs = 0; + numBufferedMsgs = 0; + numBytes = 0; + lastBufferedPerSecond = 0; + } + + public override void GetStatsIn(out int numMsgs, out int numBytes) + { + numMsgs = 0; + numBytes = 0; + } + } + + // a localClient's connection TO a server. + // send messages on this connection causes the server's + // handler function to be invoked directly. + + internal class ULocalConnectionToServer : NetworkConnection + { + NetworkServer m_LocalServer; + + public ULocalConnectionToServer(NetworkServer localServer) + { + address = "localServer"; + m_LocalServer = localServer; + } + + public override bool Send(short msgType, MessageBase msg) + { + return m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, Channels.DefaultReliable); + } + + public override bool SendUnreliable(short msgType, MessageBase msg) + { + return m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, Channels.DefaultUnreliable); + } + + public override bool SendByChannel(short msgType, MessageBase msg, int channelId) + { + return m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, channelId); + } + + public override bool SendBytes(byte[] bytes, int numBytes, int channelId) + { + if (numBytes <= 0) + { + if (LogFilter.logError) { Debug.LogError("LocalConnection:SendBytes cannot send zero bytes"); } + return false; + } + return m_LocalServer.InvokeBytes(this, bytes, numBytes, channelId); + } + + public override bool SendWriter(NetworkWriter writer, int channelId) + { + return m_LocalServer.InvokeBytes(this, writer.AsArray(), (short)writer.AsArray().Length, channelId); + } + + public override void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) + { + numMsgs = 0; + numBufferedMsgs = 0; + numBytes = 0; + lastBufferedPerSecond = 0; + } + + public override void GetStatsIn(out int numMsgs, out int numBytes) + { + numMsgs = 0; + numBytes = 0; + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalConnections.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalConnections.cs.meta new file mode 100644 index 00000000..c49fd5c8 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LocalConnections.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 634594be6caba4bbd82624434fa24599 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LogFilter.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LogFilter.cs new file mode 100644 index 00000000..dad91daa --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LogFilter.cs @@ -0,0 +1,72 @@ +using System; + +namespace UnityEngine.Networking +{ + /// + /// FilterLog is a utility class that controls the level of logging generated by UNET clients and servers. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class LogFilter + { + // this only exists for inspector UI?! + public enum FilterLevel + { + Developer = 0, + Debug = 1, + Info = 2, + Warn = 3, + Error = 4, + Fatal = 5, + SetInScripting = -1 + }; + + internal const int Developer = 0; + internal const int SetInScripting = -1; + + /// + /// Setting LogFilter.currentLogLevel to this will enable verbose debug logging. + /// + public const int Debug = 1; + /// + /// Setting LogFilter.currentLogLevel to this will log only info and above messages. This is the default level. + /// + public const int Info = 2; + /// + /// Setting LogFilter.currentLogLevel to this will log wanring and above messages. + /// + public const int Warn = 3; + /// + /// Setting LogFilter.currentLogLevel to this will error and above messages. + /// + public const int Error = 4; + public const int Fatal = 5; + + [Obsolete("Use LogFilter.currentLogLevel instead")] + static public FilterLevel current = FilterLevel.Info; + + static int s_CurrentLogLevel = Info; + /// + /// The current logging level that UNET is running with. + /// + static public int currentLogLevel { get { return s_CurrentLogLevel; } set { s_CurrentLogLevel = value; } } + + static internal bool logDev { get { return s_CurrentLogLevel <= Developer; } } + /// + /// Checks if debug logging is enabled. + /// + static public bool logDebug { get { return s_CurrentLogLevel <= Debug; } } + /// + /// Checks if info level logging is enabled. + /// + static public bool logInfo { get { return s_CurrentLogLevel <= Info; } } + /// + /// Checks if wanring level logging is enabled. + /// + static public bool logWarn { get { return s_CurrentLogLevel <= Warn; } } + /// + /// Checks if error logging is enabled. + /// + static public bool logError { get { return s_CurrentLogLevel <= Error; } } + static public bool logFatal { get { return s_CurrentLogLevel <= Fatal; } } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LogFilter.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LogFilter.cs.meta new file mode 100644 index 00000000..bff1aaaa --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/LogFilter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ea22271e1cd14abc8e4dc1ba3ab2f6d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Messages.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Messages.cs new file mode 100644 index 00000000..7029ac71 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Messages.cs @@ -0,0 +1,816 @@ +using System; +using System.Collections.Generic; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + /// + /// Network message classes should be derived from this class. These message classes can then be sent using the various Send functions of NetworkConnection, NetworkClient and NetworkServer. + /// Public data fields of classes derived from MessageBase will be automatically serialized with the class. The virtual methods Serialize and Deserialize may be implemented by developers for precise control, but if they are not implemented, then implementations will be generated for them. + /// Note : Unity uses its own network serialization system. It doesn't support the NonSerialized attribute. Instead, use private variables. + /// In the example below, the methods have implementations, but if those methods were not implemented, the message would still be usable. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// class SpawnMessage : MessageBase + /// { + /// public uint netId; + /// public NetworkHash128 assetId; + /// public Vector3 position; + /// public byte[] payload; + /// + /// // This method would be generated + /// public override void Deserialize(NetworkReader reader) + /// { + /// netId = reader.ReadPackedUInt32(); + /// assetId = reader.ReadNetworkHash128(); + /// position = reader.ReadVector3(); + /// payload = reader.ReadBytesAndSize(); + /// } + /// + /// // This method would be generated + /// public override void Serialize(NetworkWriter writer) + /// { + /// writer.WritePackedUInt32(netId); + /// writer.Write(assetId); + /// writer.Write(position); + /// writer.WriteBytesFull(payload); + /// } + /// } + /// + /// + // This can't be an interface because users don't need to implement the + // serialization functions, we'll code generate it for them when they omit it. + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public abstract class MessageBase + { + /// + /// This method is used to populate a message object from a NetworkReader stream. + /// Developers may implement this method for precise control of serialization, but they do no have to. An implemenation of this method will be generated for derived classes. + /// + /// Stream to read from. + // De-serialize the contents of the reader into this message + public virtual void Deserialize(NetworkReader reader) {} + + /// + /// The method is used to populate a NetworkWriter stream from a message object. + /// Developers may implement this method for precise control of serialization, but they do no have to. An implemenation of this method will be generated for derived classes. + /// + /// Stream to write to. + // Serialize the contents of this message into the writer + public virtual void Serialize(NetworkWriter writer) {} + } +} + +namespace UnityEngine.Networking.NetworkSystem +{ + // ---------- General Typed Messages ------------------- + /// + /// This is a utility class for simple network messages that contain only a string. + /// This example sends a message with the name of the scene. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.Networking.NetworkSystem; + /// + /// public class Test + /// { + /// void SendSceneName(string sceneName) + /// { + /// var msg = new StringMessage(sceneName); + /// NetworkServer.SendToAll(MsgType.Scene, msg); + /// } + /// } + /// + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class StringMessage : MessageBase + { + /// + /// The string that will be serialized. + /// + public string value; + + public StringMessage() + { + } + + public StringMessage(string v) + { + value = v; + } + + public override void Deserialize(NetworkReader reader) + { + value = reader.ReadString(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(value); + } + } + + /// + /// A utility class to send simple network messages that only contain an integer. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.Networking.NetworkSystem; + /// + /// public class Test + /// { + /// void SendValue(int value) + /// { + /// var msg = new IntegerMessage(value); + /// NetworkServer.SendToAll(MsgType.Scene, msg); + /// } + /// } + /// + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class IntegerMessage : MessageBase + { + /// + /// The integer value to serialize. + /// + public int value; + + public IntegerMessage() + { + } + + public IntegerMessage(int v) + { + value = v; + } + + public override void Deserialize(NetworkReader reader) + { + value = (int)reader.ReadPackedUInt32(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.WritePackedUInt32((uint)value); + } + } + + /// + /// A utility class to send a network message with no contents. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.Networking.NetworkSystem; + /// + /// public class Test + /// { + /// void SendNotification() + /// { + /// var msg = new EmptyMessage(); + /// NetworkServer.SendToAll(667, msg); + /// } + /// } + /// + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class EmptyMessage : MessageBase + { + public override void Deserialize(NetworkReader reader) + { + } + + public override void Serialize(NetworkWriter writer) + { + } + } + + // ---------- Public System Messages ------------------- + /// + /// This is passed to handler functions registered for the SYSTEM_ERROR built-in message. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ErrorMessage : MessageBase + { + /// + /// The error code. + /// This is a value from the UNETError enumeration. + /// + public int errorCode; + + public override void Deserialize(NetworkReader reader) + { + errorCode = reader.ReadUInt16(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write((ushort)errorCode); + } + } + + /// + /// This is passed to handler funtions registered for the SYSTEM_READY built-in message. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ReadyMessage : EmptyMessage + { + } + + /// + /// This is passed to handler funtions registered for the SYSTEM_NOT_READY built-in message. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NotReadyMessage : EmptyMessage + { + } + + /// + /// This is passed to handler funtions registered for the AddPlayer built-in message. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class AddPlayerMessage : MessageBase + { + /// + /// The playerId of the new player. + /// This is specified by the client when they call NetworkClient.AddPlayer(someId). + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public short playerControllerId; + /// + /// The size of the extra message data included in the AddPlayerMessage. + /// + public int msgSize; + /// + /// The extra message data included in the AddPlayerMessage. + /// + public byte[] msgData; + + public override void Deserialize(NetworkReader reader) + { + playerControllerId = (short)reader.ReadUInt16(); + msgData = reader.ReadBytesAndSize(); + if (msgData == null) + { + msgSize = 0; + } + else + { + msgSize = msgData.Length; + } + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write((ushort)playerControllerId); + writer.WriteBytesAndSize(msgData, msgSize); + } + } + + /// + /// This is passed to handler funtions registered for the SYSTEM_REMOVE_PLAYER built-in message. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class RemovePlayerMessage : MessageBase + { + /// + /// The player ID of the player GameObject which should be removed. + /// This is specified by the client when they call NetworkClient.RemovePlayer(someId). + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public short playerControllerId; + + public override void Deserialize(NetworkReader reader) + { + playerControllerId = (short)reader.ReadUInt16(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write((ushort)playerControllerId); + } + } + + /// + /// Information about a change in authority of a non-player in the same network game. + /// This information is cached by clients and used during host-migration. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class PeerAuthorityMessage : MessageBase + { + /// + /// The connection Id (on the server) of the peer whose authority is changing for the object. + /// + public int connectionId; + /// + /// The network id of the object whose authority state changed. + /// + public NetworkInstanceId netId; + /// + /// The new state of authority for the object referenced by this message. + /// + public bool authorityState; + + public override void Deserialize(NetworkReader reader) + { + connectionId = (int)reader.ReadPackedUInt32(); + netId = reader.ReadNetworkId(); + authorityState = reader.ReadBoolean(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.WritePackedUInt32((uint)connectionId); + writer.Write(netId); + writer.Write(authorityState); + } + } + + /// + /// A structure used to identify player object on other peers for host migration. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public struct PeerInfoPlayer + { + /// + /// The networkId of the player object. + /// + public NetworkInstanceId netId; + /// + /// The playerControllerId of the player GameObject. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public short playerControllerId; + } + + /// + /// Information about another participant in the same network game. + /// This information is cached by clients and used during host-migration. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class PeerInfoMessage : MessageBase + { + /// + /// The id of the NetworkConnection associated with the peer. + /// + public int connectionId; + /// + /// The IP address of the peer. + /// + public string address; + /// + /// The network port being used by the peer. + /// + public int port; + /// + /// True if this peer is the host of the network game. + /// + public bool isHost; + /// + /// True if the peer if the same as the current client. + /// + public bool isYou; + /// + /// The players for this peer. + /// + public PeerInfoPlayer[] playerIds; + + public override void Deserialize(NetworkReader reader) + { + connectionId = (int)reader.ReadPackedUInt32(); + address = reader.ReadString(); + port = (int)reader.ReadPackedUInt32(); + isHost = reader.ReadBoolean(); + isYou = reader.ReadBoolean(); + + uint numPlayers = reader.ReadPackedUInt32(); + if (numPlayers > 0) + { + List ids = new List(); + for (uint i = 0; i < numPlayers; i++) + { + PeerInfoPlayer info; + info.netId = reader.ReadNetworkId(); + info.playerControllerId = (short)reader.ReadPackedUInt32(); + ids.Add(info); + } + playerIds = ids.ToArray(); + } + } + + public override void Serialize(NetworkWriter writer) + { + writer.WritePackedUInt32((uint)connectionId); + writer.Write(address); + writer.WritePackedUInt32((uint)port); + writer.Write(isHost); + writer.Write(isYou); + if (playerIds == null) + { + writer.WritePackedUInt32(0); + } + else + { + writer.WritePackedUInt32((uint)playerIds.Length); + for (int i = 0; i < playerIds.Length; i++) + { + writer.Write(playerIds[i].netId); + writer.WritePackedUInt32((uint)playerIds[i].playerControllerId); + } + } + } + + public override string ToString() + { + return "PeerInfo conn:" + connectionId + " addr:" + address + ":" + port + " host:" + isHost + " isYou:" + isYou; + } + } + + /// + /// Internal UNET message for sending information about network peers to clients. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class PeerListMessage : MessageBase + { + /// + /// The list of participants in a networked game. + /// + public PeerInfoMessage[] peers; + /// + /// The connectionId of this client on the old host. + /// + public int oldServerConnectionId; + + public override void Deserialize(NetworkReader reader) + { + oldServerConnectionId = (int)reader.ReadPackedUInt32(); + int numPeers = reader.ReadUInt16(); + peers = new PeerInfoMessage[numPeers]; + for (int i = 0; i < peers.Length; ++i) + { + var peerInfo = new PeerInfoMessage(); + peerInfo.Deserialize(reader); + peers[i] = peerInfo; + } + } + + public override void Serialize(NetworkWriter writer) + { + writer.WritePackedUInt32((uint)oldServerConnectionId); + writer.Write((ushort)peers.Length); + for (int i = 0; i < peers.Length; i++) + { + peers[i].Serialize(writer); + } + } + } + + /// + /// This network message is used when a client reconnect to the new host of a game. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class ReconnectMessage : MessageBase + { + /// + /// This client's connectionId on the old host. + /// + public int oldConnectionId; + /// + /// The playerControllerId of the player that is rejoining. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public short playerControllerId; + /// + /// The networkId of this player on the old host. + /// + public NetworkInstanceId netId; + /// + /// Size of additional data. + /// + public int msgSize; + /// + /// Additional data. + /// + public byte[] msgData; + + public override void Deserialize(NetworkReader reader) + { + oldConnectionId = (int)reader.ReadPackedUInt32(); + playerControllerId = (short)reader.ReadPackedUInt32(); + netId = reader.ReadNetworkId(); + msgData = reader.ReadBytesAndSize(); + msgSize = msgData.Length; + } + + public override void Serialize(NetworkWriter writer) + { + writer.WritePackedUInt32((uint)oldConnectionId); + writer.WritePackedUInt32((uint)playerControllerId); + writer.Write(netId); + writer.WriteBytesAndSize(msgData, msgSize); + } + } + + // ---------- System Messages requried for code gen path ------------------- + /* These are not used directly but manually serialized, these are here for reference. + + public struct CommandMessage + { + public int cmdHash; + public string cmdName; + public byte[] payload; + } + public struct RPCMessage + { + public NetworkId netId; + public int cmdHash; + public byte[] payload; + } + public struct SyncEventMessage + { + public NetworkId netId; + public int cmdHash; + public byte[] payload; + } + + internal class SyncListMessage where T: struct + { + public NetworkId netId; + public int cmdHash; + public byte operation; + public int itemIndex; + public T item; + } + +*/ + + // ---------- Internal System Messages ------------------- + class ObjectSpawnMessage : MessageBase + { + public NetworkInstanceId netId; + public NetworkHash128 assetId; + public Vector3 position; + public byte[] payload; + public Quaternion rotation; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + assetId = reader.ReadNetworkHash128(); + position = reader.ReadVector3(); + payload = reader.ReadBytesAndSize(); + + uint extraPayloadSize = sizeof(uint) * 4; + if ((reader.Length - reader.Position) >= extraPayloadSize) + { + rotation = reader.ReadQuaternion(); + } + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + writer.Write(assetId); + writer.Write(position); + writer.WriteBytesFull(payload); + + writer.Write(rotation); + } + } + + class ObjectSpawnSceneMessage : MessageBase + { + public NetworkInstanceId netId; + public NetworkSceneId sceneId; + public Vector3 position; + public byte[] payload; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + sceneId = reader.ReadSceneId(); + position = reader.ReadVector3(); + payload = reader.ReadBytesAndSize(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + writer.Write(sceneId); + writer.Write(position); + writer.WriteBytesFull(payload); + } + } + + class ObjectSpawnFinishedMessage : MessageBase + { + public uint state; + + public override void Deserialize(NetworkReader reader) + { + state = reader.ReadPackedUInt32(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.WritePackedUInt32(state); + } + } + + class ObjectDestroyMessage : MessageBase + { + public NetworkInstanceId netId; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + } + } + + class OwnerMessage : MessageBase + { + public NetworkInstanceId netId; + public short playerControllerId; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + playerControllerId = (short)reader.ReadPackedUInt32(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + writer.WritePackedUInt32((uint)playerControllerId); + } + } + + class ClientAuthorityMessage : MessageBase + { + public NetworkInstanceId netId; + public bool authority; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + authority = reader.ReadBoolean(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + writer.Write(authority); + } + } + + class OverrideTransformMessage : MessageBase + { + public NetworkInstanceId netId; + public byte[] payload; + public bool teleport; + public int time; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + payload = reader.ReadBytesAndSize(); + teleport = reader.ReadBoolean(); + time = (int)reader.ReadPackedUInt32(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + writer.WriteBytesFull(payload); + writer.Write(teleport); + writer.WritePackedUInt32((uint)time); + } + } + + class AnimationMessage : MessageBase + { + public NetworkInstanceId netId; + public int stateHash; // if non-zero, then Play() this animation, skipping transitions + public float normalizedTime; + public byte[] parameters; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + stateHash = (int)reader.ReadPackedUInt32(); + normalizedTime = reader.ReadSingle(); + parameters = reader.ReadBytesAndSize(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + writer.WritePackedUInt32((uint)stateHash); + writer.Write(normalizedTime); + + if (parameters == null) + writer.WriteBytesAndSize(parameters, 0); + else + writer.WriteBytesAndSize(parameters, parameters.Length); + } + } + + class AnimationParametersMessage : MessageBase + { + public NetworkInstanceId netId; + public byte[] parameters; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + parameters = reader.ReadBytesAndSize(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + + if (parameters == null) + writer.WriteBytesAndSize(parameters, 0); + else + writer.WriteBytesAndSize(parameters, parameters.Length); + } + } + + class AnimationTriggerMessage : MessageBase + { + public NetworkInstanceId netId; + public int hash; + + public override void Deserialize(NetworkReader reader) + { + netId = reader.ReadNetworkId(); + hash = (int)reader.ReadPackedUInt32(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(netId); + writer.WritePackedUInt32((uint)hash); + } + } + + class LobbyReadyToBeginMessage : MessageBase + { + public byte slotId; + public bool readyState; + + public override void Deserialize(NetworkReader reader) + { + slotId = reader.ReadByte(); + readyState = reader.ReadBoolean(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write(slotId); + writer.Write(readyState); + } + } + + struct CRCMessageEntry + { + public string name; + public byte channel; + } + + class CRCMessage : MessageBase + { + public CRCMessageEntry[] scripts; + + public override void Deserialize(NetworkReader reader) + { + int numScripts = reader.ReadUInt16(); + scripts = new CRCMessageEntry[numScripts]; + for (int i = 0; i < scripts.Length; ++i) + { + var entry = new CRCMessageEntry(); + entry.name = reader.ReadString(); + entry.channel = reader.ReadByte(); + scripts[i] = entry; + } + } + + public override void Serialize(NetworkWriter writer) + { + writer.Write((ushort)scripts.Length); + for (int i = 0; i < scripts.Length; i++) + { + writer.Write(scripts[i].name); + writer.Write(scripts[i].channel); + } + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Messages.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Messages.cs.meta new file mode 100644 index 00000000..ef8057a3 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Messages.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a7c5b7a7828914f58be6df39a8c308f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkAnimator.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkAnimator.cs new file mode 100644 index 00000000..68dacd3f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkAnimator.cs @@ -0,0 +1,512 @@ +using System; +using UnityEngine; +using UnityEngine.Networking.NetworkSystem; + +namespace UnityEngine.Networking +{ + /// + /// A component to synchronize Mecanim animation states for networked objects. + /// The animation of game objects can be networked by this component. There are two models of authority for networked movement: + /// If the object has authority on the client, then it should animated locally on the owning client. The animation state information will be sent from the owning client to the server, then broadcast to all of the other clients. This is common for player objects. + /// If the object has authority on the server, then it should be animated on the server and state information will be sent to all clients. This is common for objects not related to a specific client, such as an enemy unit. + /// The NetworkAnimator synchronizes the animation parameters that are checked in the inspector view. It does not automatically sychronize triggers. The function SetTrigger can by used by an object with authority to fire an animation trigger on other clients. + /// + [DisallowMultipleComponent] + [AddComponentMenu("Network/NetworkAnimator")] + [RequireComponent(typeof(NetworkIdentity))] + [RequireComponent(typeof(Animator))] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkAnimator : NetworkBehaviour + { + // configuration + [SerializeField] Animator m_Animator; + [SerializeField] uint m_ParameterSendBits; + + // static message objects to avoid runtime-allocations + static AnimationMessage s_AnimationMessage = new AnimationMessage(); + static AnimationParametersMessage s_AnimationParametersMessage = new AnimationParametersMessage(); + static AnimationTriggerMessage s_AnimationTriggerMessage = new AnimationTriggerMessage(); + + /// + /// The animator component to synchronize. + /// + // properties + public Animator animator + { + get { return m_Animator; } + set + { + m_Animator = value; + ResetParameterOptions(); + } + } + + /// + /// Sets whether an animation parameter should be auto sent. + /// + /// Index of the parameter in the Animator. + /// The new value. + public void SetParameterAutoSend(int index, bool value) + { + if (value) + { + m_ParameterSendBits |= (uint)(1 << index); + } + else + { + m_ParameterSendBits &= (uint)(~(1 << index)); + } + } + + /// + /// Gets whether an animation parameter should be auto sent. + /// + /// Index of the parameter in the Animator. + /// True if the parameter should be sent. + public bool GetParameterAutoSend(int index) + { + return (m_ParameterSendBits & (uint)(1 << index)) != 0; + } + + int m_AnimationHash; + int m_TransitionHash; + NetworkWriter m_ParameterWriter; + float m_SendTimer; + + // tracking - these should probably move to a Preview component. + public string param0; + public string param1; + public string param2; + public string param3; + public string param4; + public string param5; + + bool sendMessagesAllowed + { + get + { + if (isServer) + { + if (!localPlayerAuthority) + return true; + + // This is a special case where we have localPlayerAuthority set + // on a NetworkIdentity but we have not assigned the client who has + // authority over it, no animator data will be sent over the network by the server. + // + // So we check here for a clientAuthorityOwner and if it is null we will + // let the server send animation data until we receive an owner. + if (netIdentity != null && netIdentity.clientAuthorityOwner == null) + return true; + } + + if (hasAuthority) + return true; + + return false; + } + } + + internal void ResetParameterOptions() + { + Debug.Log("ResetParameterOptions"); + m_ParameterSendBits = 0; + } + + void FixedUpdate() + { + if (!sendMessagesAllowed) + return; + + if (m_ParameterWriter == null) + m_ParameterWriter = new NetworkWriter(); + + CheckSendRate(); + + int stateHash; + float normalizedTime; + if (!CheckAnimStateChanged(out stateHash, out normalizedTime)) + { + return; + } + + var animMsg = new AnimationMessage(); + animMsg.netId = netId; + animMsg.stateHash = stateHash; + animMsg.normalizedTime = normalizedTime; + + m_ParameterWriter.SeekZero(); + WriteParameters(m_ParameterWriter, false); + animMsg.parameters = m_ParameterWriter.ToArray(); + + SendMessage(MsgType.Animation, animMsg); + } + + bool CheckAnimStateChanged(out int stateHash, out float normalizedTime) + { + stateHash = 0; + normalizedTime = 0; + + if (m_Animator.IsInTransition(0)) + { + AnimatorTransitionInfo tt = m_Animator.GetAnimatorTransitionInfo(0); + if (tt.fullPathHash != m_TransitionHash) + { + // first time in this transition + m_TransitionHash = tt.fullPathHash; + m_AnimationHash = 0; + return true; + } + return false; + } + + AnimatorStateInfo st = m_Animator.GetCurrentAnimatorStateInfo(0); + if (st.fullPathHash != m_AnimationHash) + { + // first time in this animation state + if (m_AnimationHash != 0) + { + // came from another animation directly - from Play() + stateHash = st.fullPathHash; + normalizedTime = st.normalizedTime; + } + m_TransitionHash = 0; + m_AnimationHash = st.fullPathHash; + return true; + } + return false; + } + + void CheckSendRate() + { + if (sendMessagesAllowed && GetNetworkSendInterval() != 0 && m_SendTimer < Time.time) + { + m_SendTimer = Time.time + GetNetworkSendInterval(); + + var animMsg = new AnimationParametersMessage(); + animMsg.netId = netId; + + m_ParameterWriter.SeekZero(); + WriteParameters(m_ParameterWriter, true); + animMsg.parameters = m_ParameterWriter.ToArray(); + + SendMessage(MsgType.AnimationParameters, animMsg); + } + } + + void SendMessage(short type, MessageBase msg) + { + if (isServer) + { + NetworkServer.SendToReady(gameObject, type, msg); + } + else + { + if (ClientScene.readyConnection != null) + { + ClientScene.readyConnection.Send(type, msg); + } + } + } + + void SetSendTrackingParam(string p, int i) + { + p = "Sent Param: " + p; + if (i == 0) param0 = p; + if (i == 1) param1 = p; + if (i == 2) param2 = p; + if (i == 3) param3 = p; + if (i == 4) param4 = p; + if (i == 5) param5 = p; + } + + void SetRecvTrackingParam(string p, int i) + { + p = "Recv Param: " + p; + if (i == 0) param0 = p; + if (i == 1) param1 = p; + if (i == 2) param2 = p; + if (i == 3) param3 = p; + if (i == 4) param4 = p; + if (i == 5) param5 = p; + } + + internal void HandleAnimMsg(AnimationMessage msg, NetworkReader reader) + { + if (hasAuthority) + return; + + // usually transitions will be triggered by parameters, if not, play anims directly. + // NOTE: this plays "animations", not transitions, so any transitions will be skipped. + // NOTE: there is no API to play a transition(?) + if (msg.stateHash != 0) + { + m_Animator.Play(msg.stateHash, 0, msg.normalizedTime); + } + + ReadParameters(reader, false); + } + + internal void HandleAnimParamsMsg(AnimationParametersMessage msg, NetworkReader reader) + { + if (hasAuthority) + return; + + ReadParameters(reader, true); + } + + internal void HandleAnimTriggerMsg(int hash) + { + m_Animator.SetTrigger(hash); + } + + void WriteParameters(NetworkWriter writer, bool autoSend) + { + for (int i = 0; i < m_Animator.parameters.Length; i++) + { + if (autoSend && !GetParameterAutoSend(i)) + continue; + + AnimatorControllerParameter par = m_Animator.parameters[i]; + if (par.type == AnimatorControllerParameterType.Int) + { + writer.WritePackedUInt32((uint)m_Animator.GetInteger(par.nameHash)); + + SetSendTrackingParam(par.name + ":" + m_Animator.GetInteger(par.nameHash), i); + } + + if (par.type == AnimatorControllerParameterType.Float) + { + writer.Write(m_Animator.GetFloat(par.nameHash)); + + SetSendTrackingParam(par.name + ":" + m_Animator.GetFloat(par.nameHash), i); + } + + if (par.type == AnimatorControllerParameterType.Bool) + { + writer.Write(m_Animator.GetBool(par.nameHash)); + + SetSendTrackingParam(par.name + ":" + m_Animator.GetBool(par.nameHash), i); + } + } + } + + void ReadParameters(NetworkReader reader, bool autoSend) + { + for (int i = 0; i < m_Animator.parameters.Length; i++) + { + if (autoSend && !GetParameterAutoSend(i)) + continue; + + AnimatorControllerParameter par = m_Animator.parameters[i]; + if (par.type == AnimatorControllerParameterType.Int) + { + int newValue = (int)reader.ReadPackedUInt32(); + m_Animator.SetInteger(par.nameHash, newValue); + + SetRecvTrackingParam(par.name + ":" + newValue, i); + } + + if (par.type == AnimatorControllerParameterType.Float) + { + float newFloatValue = reader.ReadSingle(); + m_Animator.SetFloat(par.nameHash, newFloatValue); + + SetRecvTrackingParam(par.name + ":" + newFloatValue, i); + } + + if (par.type == AnimatorControllerParameterType.Bool) + { + bool newBoolValue = reader.ReadBoolean(); + m_Animator.SetBool(par.nameHash, newBoolValue); + + SetRecvTrackingParam(par.name + ":" + newBoolValue, i); + } + } + } + + public override bool OnSerialize(NetworkWriter writer, bool forceAll) + { + if (forceAll) + { + if (m_Animator.IsInTransition(0)) + { + AnimatorStateInfo st = m_Animator.GetNextAnimatorStateInfo(0); + writer.Write(st.fullPathHash); + writer.Write(st.normalizedTime); + } + else + { + AnimatorStateInfo st = m_Animator.GetCurrentAnimatorStateInfo(0); + writer.Write(st.fullPathHash); + writer.Write(st.normalizedTime); + } + WriteParameters(writer, false); + return true; + } + return false; + } + + public override void OnDeserialize(NetworkReader reader, bool initialState) + { + if (initialState) + { + int stateHash = reader.ReadInt32(); + float normalizedTime = reader.ReadSingle(); + ReadParameters(reader, false); + m_Animator.Play(stateHash, 0, normalizedTime); + } + } + + /// + /// Causes an animation trigger to be invoked for a networked object. + /// If local authority is set, and this is called from the client, then the trigger will be invoked on the server and all clients. If not, then this is called on the server, and the trigger will be called on all clients. + /// + /// Name of trigger. + public void SetTrigger(string triggerName) + { + SetTrigger(Animator.StringToHash(triggerName)); + } + + /// + /// + /// + /// Hash id of trigger (from the Animator). + public void SetTrigger(int hash) + { + var animMsg = new AnimationTriggerMessage(); + animMsg.netId = netId; + animMsg.hash = hash; + + if (hasAuthority && localPlayerAuthority) + { + if (NetworkClient.allClients.Count > 0) + { + var client = ClientScene.readyConnection; + if (client != null) + { + client.Send(MsgType.AnimationTrigger, animMsg); + } + } + return; + } + + if (isServer && !localPlayerAuthority) + { + NetworkServer.SendToReady(gameObject, MsgType.AnimationTrigger, animMsg); + } + } + + // ------------------ server message handlers ------------------- + + static internal void OnAnimationServerMessage(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_AnimationMessage); + + if (LogFilter.logDev) { Debug.Log("OnAnimationMessage for netId=" + s_AnimationMessage.netId + " conn=" + netMsg.conn); } + + GameObject go = NetworkServer.FindLocalObject(s_AnimationMessage.netId); + if (go == null) + { + return; + } + NetworkAnimator animSync = go.GetComponent(); + if (animSync != null) + { + NetworkReader reader = new NetworkReader(s_AnimationMessage.parameters); + animSync.HandleAnimMsg(s_AnimationMessage, reader); + + NetworkServer.SendToReady(go, MsgType.Animation, s_AnimationMessage); + } + } + + static internal void OnAnimationParametersServerMessage(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_AnimationParametersMessage); + + if (LogFilter.logDev) { Debug.Log("OnAnimationParametersMessage for netId=" + s_AnimationParametersMessage.netId + " conn=" + netMsg.conn); } + + GameObject go = NetworkServer.FindLocalObject(s_AnimationParametersMessage.netId); + if (go == null) + { + return; + } + NetworkAnimator animSync = go.GetComponent(); + if (animSync != null) + { + NetworkReader reader = new NetworkReader(s_AnimationParametersMessage.parameters); + animSync.HandleAnimParamsMsg(s_AnimationParametersMessage, reader); + NetworkServer.SendToReady(go, MsgType.AnimationParameters, s_AnimationParametersMessage); + } + } + + static internal void OnAnimationTriggerServerMessage(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_AnimationTriggerMessage); + + if (LogFilter.logDev) { Debug.Log("OnAnimationTriggerMessage for netId=" + s_AnimationTriggerMessage.netId + " conn=" + netMsg.conn); } + + GameObject go = NetworkServer.FindLocalObject(s_AnimationTriggerMessage.netId); + if (go == null) + { + return; + } + NetworkAnimator animSync = go.GetComponent(); + if (animSync != null) + { + animSync.HandleAnimTriggerMsg(s_AnimationTriggerMessage.hash); + + NetworkServer.SendToReady(go, MsgType.AnimationTrigger, s_AnimationTriggerMessage); + } + } + + // ------------------ client message handlers ------------------- + + static internal void OnAnimationClientMessage(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_AnimationMessage); + GameObject go = ClientScene.FindLocalObject(s_AnimationMessage.netId); + if (go == null) + { + return; + } + var animSync = go.GetComponent(); + if (animSync != null) + { + var reader = new NetworkReader(s_AnimationMessage.parameters); + animSync.HandleAnimMsg(s_AnimationMessage, reader); + } + } + + static internal void OnAnimationParametersClientMessage(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_AnimationParametersMessage); + GameObject go = ClientScene.FindLocalObject(s_AnimationParametersMessage.netId); + if (go == null) + { + return; + } + var animSync = go.GetComponent(); + if (animSync != null) + { + var reader = new NetworkReader(s_AnimationParametersMessage.parameters); + animSync.HandleAnimParamsMsg(s_AnimationParametersMessage, reader); + } + } + + static internal void OnAnimationTriggerClientMessage(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_AnimationTriggerMessage); + GameObject go = ClientScene.FindLocalObject(s_AnimationTriggerMessage.netId); + if (go == null) + { + return; + } + var animSync = go.GetComponent(); + if (animSync != null) + { + animSync.HandleAnimTriggerMsg(s_AnimationTriggerMessage.hash); + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkAnimator.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkAnimator.cs.meta new file mode 100644 index 00000000..a51b1179 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkAnimator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e18e15ed5495c434d969378156376a52 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBehaviour.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBehaviour.cs new file mode 100644 index 00000000..25997366 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBehaviour.cs @@ -0,0 +1,884 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace UnityEngine.Networking +{ + /// + /// Base class which should be inherited by scripts which contain networking functionality. + /// This is a MonoBehaviour class so scripts which need to use the networking feature should inherit this class instead of MonoBehaviour. It allows you to invoke networked actions, receive various callbacks, and automatically synchronize state from server-to-client. + /// The NetworkBehaviour component requires a NetworkIdentity on the game object. There can be multiple NetworkBehaviours on a single game object. For an object with sub-components in a hierarchy, the NetworkIdentity must be on the root object, and NetworkBehaviour scripts must also be on the root object. + /// Some of the built-in components of the networking system are derived from NetworkBehaviour, including NetworkTransport, NetworkAnimator and NetworkProximityChecker. + /// + [RequireComponent(typeof(NetworkIdentity))] + [AddComponentMenu("")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkBehaviour : MonoBehaviour + { + uint m_SyncVarDirtyBits; + float m_LastSendTime; + + // this prevents recursion when SyncVar hook functions are called. + bool m_SyncVarGuard; + + /// + /// This value is set on the NetworkIdentity and is accessible here for convenient access for scripts. + /// + public bool localPlayerAuthority { get { return myView.localPlayerAuthority; } } + /// + /// Returns true if this object is active on an active server. + /// This is only true if the object has been spawned. This is different from NetworkServer.active, which is true if the server itself is active rather than this object being active. + /// + public bool isServer { get { return myView.isServer; } } + /// + /// Returns true if running as a client and this object was spawned by a server. + /// + public bool isClient { get { return myView.isClient; } } + /// + /// This returns true if this object is the one that represents the player on the local machine. + /// In multiplayer games, there are multiple instances of the Player object. The client needs to know which one is for "themselves" so that only that player processes input and potentially has a camera attached. The IsLocalPlayer function will return true only for the player instance that belongs to the player on the local machine, so it can be used to filter out input for non-local players. + /// This example shows processing input for only the local player. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Player : NetworkBehaviour + /// { + /// int moveX = 0; + /// int moveY = 0; + /// + /// void Update() + /// { + /// if (!isLocalPlayer) + /// { + /// return; + /// } + /// // input handling for local player only + /// int oldMoveX = moveX; + /// int oldMoveY = moveY; + /// moveX = 0; + /// moveY = 0; + /// if (Input.GetKey(KeyCode.LeftArrow)) + /// { + /// moveX -= 1; + /// } + /// if (Input.GetKey(KeyCode.RightArrow)) + /// { + /// moveX += 1; + /// } + /// if (Input.GetKey(KeyCode.UpArrow)) + /// { + /// moveY += 1; + /// } + /// if (Input.GetKey(KeyCode.DownArrow)) + /// { + /// moveY -= 1; + /// } + /// if (moveX != oldMoveX || moveY != oldMoveY) + /// { + /// CmdMove(moveX, moveY); + /// } + /// } + /// + /// [Command] + /// void CmdMove(int dx, int dy) + /// { + /// // move here + /// } + /// } + /// + /// + public bool isLocalPlayer { get { return myView.isLocalPlayer; } } + /// + /// This returns true if this object is the authoritative version of the object in the distributed network application. + /// The localPlayerAuthority value on the NetworkIdentity determines how authority is determined. For most objects, authority is held by the server / host. For objects with localPlayerAuthority set, authority is held by the client of that player. + /// + public bool hasAuthority { get { return myView.hasAuthority; } } + /// + /// The unique network Id of this object. + /// This is assigned at runtime by the network server and will be unique for all objects for that network session. + /// + public NetworkInstanceId netId { get { return myView.netId; } } + /// + /// The NetworkConnection associated with this NetworkIdentity. This is only valid for player objects on the server. + /// + public NetworkConnection connectionToServer { get { return myView.connectionToServer; } } + /// + /// The NetworkConnection associated with this NetworkIdentity. This is only valid for player objects on the server. + /// + /// //Attach this script to a GameObject + /// //Attach a TextMesh to the GameObject. To do this click the GameObject, click the Add Component button in the Inspector window, and go to Mesh>Text Mesh. + /// //Attach a NetworkIdentity to the GameObject by clicking Add Component, then go to Network>NetworkIdentity. In the component that was added, check the Local Player Authority checkbox. + /// //Next, create an empty GameObject. Attach a NetworkManager to it by clicking the GameObject, clicking Add Component going to Network>NetworkManager. Also add a NetworkManagerHUD the same way. + /// + /// //This script outputs the Connection ID and address to the console when the Client is started + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ConnectionToClientExample : NetworkBehaviour + /// { + /// //This is a TextMesh component that you attach to the child of the NetworkIdentity GameObject + /// TextMesh m_TextMesh; + /// + /// void Start() + /// { + /// //Output the connection ID and IP address of the connection by using connectionToClient + /// Debug.Log("Connection ID : " + connectionToClient.connectionId); + /// Debug.Log("Connection Address : " + connectionToClient.address); + /// //Check that the connection is marked as ready + /// if (connectionToClient.isReady) + /// { + /// Debug.Log("Ready!"); + /// } + /// //Enter the child of your GameObject (the GameObject with the TextMesh you attach) + /// //Fetch the TextMesh component of it + /// m_TextMesh = GetComponentInChildren(typeof(TextMesh)) as TextMesh; + /// //Change the Text of the TextMesh to show the netId + /// m_TextMesh.text = "ID : " + netId; + /// //Output the connection to Client + /// } + /// } + /// + /// + public NetworkConnection connectionToClient { get { return myView.connectionToClient; } } + /// + /// The id of the player associated with the behaviour. + /// This is only valid if the GameObject is a local player. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public short playerControllerId { get { return myView.playerControllerId; } } + protected uint syncVarDirtyBits { get { return m_SyncVarDirtyBits; } } + protected bool syncVarHookGuard { get { return m_SyncVarGuard; } set { m_SyncVarGuard = value; }} + + internal NetworkIdentity netIdentity { get { return myView; } } + + const float k_DefaultSendInterval = 0.1f; + + NetworkIdentity m_MyView; + NetworkIdentity myView + { + get + { + if (m_MyView == null) + { + m_MyView = GetComponent(); + if (m_MyView == null) + { + if (LogFilter.logError) { Debug.LogError("There is no NetworkIdentity on this object. Please add one."); } + } + return m_MyView; + } + return m_MyView; + } + } + + // ----------------------------- Commands -------------------------------- + + [EditorBrowsable(EditorBrowsableState.Never)] + protected void SendCommandInternal(NetworkWriter writer, int channelId, string cmdName) + { + // local players can always send commands, regardless of authority, other objects must have authority. + if (!(isLocalPlayer || hasAuthority)) + { + if (LogFilter.logWarn) { Debug.LogWarning("Trying to send command for object without authority."); } + return; + } + + if (ClientScene.readyConnection == null) + { + if (LogFilter.logError) { Debug.LogError("Send command attempted with no client running [client=" + connectionToServer + "]."); } + return; + } + + writer.FinishMessage(); + ClientScene.readyConnection.SendWriter(writer, channelId); + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.Command, cmdName); +#endif + } + + /// + /// Manually invoke a Command. + /// + /// Hash of the Command name. + /// Parameters to pass to the command. + /// Returns true if successful. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual bool InvokeCommand(int cmdHash, NetworkReader reader) + { + if (InvokeCommandDelegate(cmdHash, reader)) + { + return true; + } + return false; + } + + // ----------------------------- Client RPCs -------------------------------- + + [EditorBrowsable(EditorBrowsableState.Never)] + protected void SendRPCInternal(NetworkWriter writer, int channelId, string rpcName) + { + // This cannot use NetworkServer.active, as that is not specific to this object. + if (!isServer) + { + if (LogFilter.logWarn) { Debug.LogWarning("ClientRpc call on un-spawned object"); } + return; + } + + writer.FinishMessage(); + NetworkServer.SendWriterToReady(gameObject, writer, channelId); + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.Rpc, rpcName); +#endif + } + + [EditorBrowsable(EditorBrowsableState.Never)] + protected void SendTargetRPCInternal(NetworkConnection conn, NetworkWriter writer, int channelId, string rpcName) + { + // This cannot use NetworkServer.active, as that is not specific to this object. + if (!isServer) + { + if (LogFilter.logWarn) { Debug.LogWarning("TargetRpc call on un-spawned object"); } + return; + } + + writer.FinishMessage(); + + conn.SendWriter(writer, channelId); + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.Rpc, rpcName); +#endif + } + + /// + /// Manually invoke an RPC function. + /// + /// Hash of the RPC name. + /// Parameters to pass to the RPC function. + /// Returns true if successful. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual bool InvokeRPC(int cmdHash, NetworkReader reader) + { + if (InvokeRpcDelegate(cmdHash, reader)) + { + return true; + } + return false; + } + + // ----------------------------- Sync Events -------------------------------- + + [EditorBrowsable(EditorBrowsableState.Never)] + protected void SendEventInternal(NetworkWriter writer, int channelId, string eventName) + { + if (!NetworkServer.active) + { + if (LogFilter.logWarn) { Debug.LogWarning("SendEvent no server?"); } + return; + } + + writer.FinishMessage(); + NetworkServer.SendWriterToReady(gameObject, writer, channelId); + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.SyncEvent, eventName); +#endif + } + + /// + /// Manually invoke a SyncEvent. + /// + /// Hash of the SyncEvent name. + /// Parameters to pass to the SyncEvent. + /// Returns true if successful. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual bool InvokeSyncEvent(int cmdHash, NetworkReader reader) + { + if (InvokeSyncEventDelegate(cmdHash, reader)) + { + return true; + } + return false; + } + + // ----------------------------- Sync Lists -------------------------------- + + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual bool InvokeSyncList(int cmdHash, NetworkReader reader) + { + if (InvokeSyncListDelegate(cmdHash, reader)) + { + return true; + } + return false; + } + + // ----------------------------- Code Gen Path Helpers -------------------------------- + /// + /// Delegate for Command functions. + /// + /// + /// + public delegate void CmdDelegate(NetworkBehaviour obj, NetworkReader reader); + /// + /// Delegate for Event functions. + /// + /// + /// + protected delegate void EventDelegate(List targets, NetworkReader reader); + + protected enum UNetInvokeType + { + Command, + ClientRpc, + SyncEvent, + SyncList + }; + + protected class Invoker + { + public UNetInvokeType invokeType; + public Type invokeClass; + public CmdDelegate invokeFunction; + + public string DebugString() + { + return invokeType + ":" + + invokeClass + ":" + + invokeFunction.GetMethodName(); + } + }; + + static Dictionary s_CmdHandlerDelegates = new Dictionary(); + + [EditorBrowsable(EditorBrowsableState.Never)] + static protected void RegisterCommandDelegate(Type invokeClass, int cmdHash, CmdDelegate func) + { + if (s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return; + } + Invoker inv = new Invoker(); + inv.invokeType = UNetInvokeType.Command; + inv.invokeClass = invokeClass; + inv.invokeFunction = func; + s_CmdHandlerDelegates[cmdHash] = inv; + if (LogFilter.logDev) { Debug.Log("RegisterCommandDelegate hash:" + cmdHash + " " + func.GetMethodName()); } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + static protected void RegisterRpcDelegate(Type invokeClass, int cmdHash, CmdDelegate func) + { + if (s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return; + } + Invoker inv = new Invoker(); + inv.invokeType = UNetInvokeType.ClientRpc; + inv.invokeClass = invokeClass; + inv.invokeFunction = func; + s_CmdHandlerDelegates[cmdHash] = inv; + if (LogFilter.logDev) { Debug.Log("RegisterRpcDelegate hash:" + cmdHash + " " + func.GetMethodName()); } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + static protected void RegisterEventDelegate(Type invokeClass, int cmdHash, CmdDelegate func) + { + if (s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return; + } + Invoker inv = new Invoker(); + inv.invokeType = UNetInvokeType.SyncEvent; + inv.invokeClass = invokeClass; + inv.invokeFunction = func; + s_CmdHandlerDelegates[cmdHash] = inv; + if (LogFilter.logDev) { Debug.Log("RegisterEventDelegate hash:" + cmdHash + " " + func.GetMethodName()); } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + static protected void RegisterSyncListDelegate(Type invokeClass, int cmdHash, CmdDelegate func) + { + if (s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return; + } + Invoker inv = new Invoker(); + inv.invokeType = UNetInvokeType.SyncList; + inv.invokeClass = invokeClass; + inv.invokeFunction = func; + s_CmdHandlerDelegates[cmdHash] = inv; + if (LogFilter.logDev) { Debug.Log("RegisterSyncListDelegate hash:" + cmdHash + " " + func.GetMethodName()); } + } + + internal static string GetInvoker(int cmdHash) + { + if (!s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return null; + } + + Invoker inv = s_CmdHandlerDelegates[cmdHash]; + return inv.DebugString(); + } + + // wrapper fucntions for each type of network operation + internal static bool GetInvokerForHashCommand(int cmdHash, out Type invokeClass, out CmdDelegate invokeFunction) + { + return GetInvokerForHash(cmdHash, UNetInvokeType.Command, out invokeClass, out invokeFunction); + } + + internal static bool GetInvokerForHashClientRpc(int cmdHash, out Type invokeClass, out CmdDelegate invokeFunction) + { + return GetInvokerForHash(cmdHash, UNetInvokeType.ClientRpc, out invokeClass, out invokeFunction); + } + + internal static bool GetInvokerForHashSyncList(int cmdHash, out Type invokeClass, out CmdDelegate invokeFunction) + { + return GetInvokerForHash(cmdHash, UNetInvokeType.SyncList, out invokeClass, out invokeFunction); + } + + internal static bool GetInvokerForHashSyncEvent(int cmdHash, out Type invokeClass, out CmdDelegate invokeFunction) + { + return GetInvokerForHash(cmdHash, UNetInvokeType.SyncEvent, out invokeClass, out invokeFunction); + } + + static bool GetInvokerForHash(int cmdHash, NetworkBehaviour.UNetInvokeType invokeType, out Type invokeClass, out CmdDelegate invokeFunction) + { + Invoker invoker = null; + if (!s_CmdHandlerDelegates.TryGetValue(cmdHash, out invoker)) + { + if (LogFilter.logDev) { Debug.Log("GetInvokerForHash hash:" + cmdHash + " not found"); } + invokeClass = null; + invokeFunction = null; + return false; + } + + if (invoker == null) + { + if (LogFilter.logDev) { Debug.Log("GetInvokerForHash hash:" + cmdHash + " invoker null"); } + invokeClass = null; + invokeFunction = null; + return false; + } + + if (invoker.invokeType != invokeType) + { + if (LogFilter.logError) { Debug.LogError("GetInvokerForHash hash:" + cmdHash + " mismatched invokeType"); } + invokeClass = null; + invokeFunction = null; + return false; + } + + invokeClass = invoker.invokeClass; + invokeFunction = invoker.invokeFunction; + return true; + } + + internal static void DumpInvokers() + { + Debug.Log("DumpInvokers size:" + s_CmdHandlerDelegates.Count); + foreach (var inv in s_CmdHandlerDelegates) + { + Debug.Log(" Invoker:" + inv.Value.invokeClass + ":" + inv.Value.invokeFunction.GetMethodName() + " " + inv.Value.invokeType + " " + inv.Key); + } + } + + internal bool ContainsCommandDelegate(int cmdHash) + { + return s_CmdHandlerDelegates.ContainsKey(cmdHash); + } + + internal bool InvokeCommandDelegate(int cmdHash, NetworkReader reader) + { + if (!s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return false; + } + + Invoker inv = s_CmdHandlerDelegates[cmdHash]; + if (inv.invokeType != UNetInvokeType.Command) + { + return false; + } + + if (GetType() != inv.invokeClass) + { + if (GetType().IsSubclassOf(inv.invokeClass)) + { + // allowed, commands function is on a base class. + } + else + { + return false; + } + } + + inv.invokeFunction(this, reader); + return true; + } + + internal bool InvokeRpcDelegate(int cmdHash, NetworkReader reader) + { + if (!s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return false; + } + + Invoker inv = s_CmdHandlerDelegates[cmdHash]; + if (inv.invokeType != UNetInvokeType.ClientRpc) + { + return false; + } + + if (GetType() != inv.invokeClass) + { + if (GetType().IsSubclassOf(inv.invokeClass)) + { + // allowed, rpc function is on a base class. + } + else + { + return false; + } + } + + inv.invokeFunction(this, reader); + return true; + } + + internal bool InvokeSyncEventDelegate(int cmdHash, NetworkReader reader) + { + if (!s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return false; + } + + Invoker inv = s_CmdHandlerDelegates[cmdHash]; + if (inv.invokeType != UNetInvokeType.SyncEvent) + { + return false; + } + + inv.invokeFunction(this, reader); + return true; + } + + internal bool InvokeSyncListDelegate(int cmdHash, NetworkReader reader) + { + if (!s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return false; + } + + Invoker inv = s_CmdHandlerDelegates[cmdHash]; + if (inv.invokeType != UNetInvokeType.SyncList) + { + return false; + } + + if (GetType() != inv.invokeClass) + { + return false; + } + + inv.invokeFunction(this, reader); + return true; + } + + static internal string GetCmdHashHandlerName(int cmdHash) + { + if (!s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return cmdHash.ToString(); + } + Invoker inv = s_CmdHandlerDelegates[cmdHash]; + return inv.invokeType + ":" + inv.invokeFunction.GetMethodName(); + } + + static string GetCmdHashPrefixName(int cmdHash, string prefix) + { + if (!s_CmdHandlerDelegates.ContainsKey(cmdHash)) + { + return cmdHash.ToString(); + } + Invoker inv = s_CmdHandlerDelegates[cmdHash]; + var name = inv.invokeFunction.GetMethodName(); + + int index = name.IndexOf(prefix); + if (index > -1) + { + name = name.Substring(prefix.Length); + } + return name; + } + + internal static string GetCmdHashCmdName(int cmdHash) + { + return GetCmdHashPrefixName(cmdHash, "InvokeCmd"); + } + + internal static string GetCmdHashRpcName(int cmdHash) + { + return GetCmdHashPrefixName(cmdHash, "InvokeRpc"); + } + + internal static string GetCmdHashEventName(int cmdHash) + { + return GetCmdHashPrefixName(cmdHash, "InvokeSyncEvent"); + } + + internal static string GetCmdHashListName(int cmdHash) + { + return GetCmdHashPrefixName(cmdHash, "InvokeSyncList"); + } + + // ----------------------------- Helpers -------------------------------- + + [EditorBrowsable(EditorBrowsableState.Never)] + protected void SetSyncVarGameObject(GameObject newGameObject, ref GameObject gameObjectField, uint dirtyBit, ref NetworkInstanceId netIdField) + { + if (m_SyncVarGuard) + return; + + NetworkInstanceId newGameObjectNetId = new NetworkInstanceId(); + if (newGameObject != null) + { + var uv = newGameObject.GetComponent(); + if (uv != null) + { + newGameObjectNetId = uv.netId; + if (newGameObjectNetId.IsEmpty()) + { + if (LogFilter.logWarn) { Debug.LogWarning("SetSyncVarGameObject GameObject " + newGameObject + " has a zero netId. Maybe it is not spawned yet?"); } + } + } + } + + NetworkInstanceId oldGameObjectNetId = new NetworkInstanceId(); + if (gameObjectField != null) + { + oldGameObjectNetId = gameObjectField.GetComponent().netId; + } + + if (newGameObjectNetId != oldGameObjectNetId) + { + if (LogFilter.logDev) { Debug.Log("SetSyncVar GameObject " + GetType().Name + " bit [" + dirtyBit + "] netfieldId:" + oldGameObjectNetId + "->" + newGameObjectNetId); } + SetDirtyBit(dirtyBit); + gameObjectField = newGameObject; + netIdField = newGameObjectNetId; + } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + protected void SetSyncVar(T value, ref T fieldValue, uint dirtyBit) + { + bool changed = false; + if (value == null) + { + if (fieldValue != null) + changed = true; + } + else + { + changed = !value.Equals(fieldValue); + } + if (changed) + { + if (LogFilter.logDev) { Debug.Log("SetSyncVar " + GetType().Name + " bit [" + dirtyBit + "] " + fieldValue + "->" + value); } + SetDirtyBit(dirtyBit); + fieldValue = value; + } + } + + /// + /// Used to set the behaviour as dirty, so that a network update will be sent for the object. + /// + /// Bit mask to set. + // these are masks, not bit numbers, ie. 0x004 not 2 + public void SetDirtyBit(uint dirtyBit) + { + m_SyncVarDirtyBits |= dirtyBit; + } + + /// + /// This clears all the dirty bits that were set on this script by SetDirtyBits(); + /// This is automatically invoked when an update is sent for this object, but can be called manually as well. + /// + public void ClearAllDirtyBits() + { + m_LastSendTime = Time.time; + m_SyncVarDirtyBits = 0; + } + + internal int GetDirtyChannel() + { + if (Time.time - m_LastSendTime > GetNetworkSendInterval()) + { + if (m_SyncVarDirtyBits != 0) + { + return GetNetworkChannel(); + } + } + return -1; + } + + /// + /// Virtual function to override to send custom serialization data. The corresponding function to send serialization data is OnDeserialize(). + /// The initialState flag is useful to differentiate between the first time an object is serialized and when incremental updates can be sent. The first time an object is sent to a client, it must include a full state snapshot, but subsequent updates can save on bandwidth by including only incremental changes. Note that SyncVar hook functions are not called when initialState is true, only for incremental updates. + /// If a class has SyncVars, then an implementation of this function and OnDeserialize() are added automatically to the class. So a class that has SyncVars cannot also have custom serialization functions. + /// The OnSerialize function should return true to indicate that an update should be sent. If it returns true, then the dirty bits for that script are set to zero, if it returns false then the dirty bits are not changed. This allows multiple changes to a script to be accumulated over time and sent when the system is ready, instead of every frame. + /// + /// Writer to use to write to the stream. + /// If this is being called to send initial state. + /// True if data was written. + public virtual bool OnSerialize(NetworkWriter writer, bool initialState) + { + if (!initialState) + { + writer.WritePackedUInt32(0); + } + return false; + } + + /// + /// Virtual function to override to receive custom serialization data. The corresponding function to send serialization data is OnSerialize(). + /// + /// Reader to read from the stream. + /// True if being sent initial state. + public virtual void OnDeserialize(NetworkReader reader, bool initialState) + { + if (!initialState) + { + reader.ReadPackedUInt32(); + } + } + + /// + /// An internal method called on client objects to resolve GameObject references. + /// It is not safe to put user code in this function as it may be replaced by the network system's code generation process. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual void PreStartClient() + { + } + + /// + /// This is invoked on clients when the server has caused this object to be destroyed. + /// This can be used as a hook to invoke effects or do client specific cleanup. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// class Bomb : NetworkBehaviour + /// { + /// public override void OnNetworkDestroy() + /// { + /// // play explosion sound + /// } + /// } + /// + /// + public virtual void OnNetworkDestroy() + { + } + + /// + /// This is invoked for NetworkBehaviour objects when they become active on the server. + /// This could be triggered by NetworkServer.Listen() for objects in the scene, or by NetworkServer.Spawn() for objects that are dynamically created. + /// This will be called for objects on a "host" as well as for object on a dedicated server. + /// + public virtual void OnStartServer() + { + } + + /// + /// Called on every NetworkBehaviour when it is activated on a client. + /// Objects on the host have this function called, as there is a local client on the host. The values of SyncVars on object are guaranteed to be initialized correctly with the latest state from the server when this function is called on the client. + /// + public virtual void OnStartClient() + { + } + + /// + /// Called when the local player object has been set up. + /// This happens after OnStartClient(), as it is triggered by an ownership message from the server. This is an appropriate place to activate components or functionality that should only be active for the local player, such as cameras and input. + /// + public virtual void OnStartLocalPlayer() + { + } + + /// + /// This is invoked on behaviours that have authority, based on context and 'NetworkIdentity.localPlayerAuthority.' + /// This is called after OnStartServer and OnStartClient. + /// When NetworkIdentity.AssignClientAuthority is called on the server, this will be called on the client that owns the object. When an object is spawned with NetworkServer.SpawnWithClientAuthority, this will be called on the client that owns the object. + /// + public virtual void OnStartAuthority() + { + } + + /// + /// This is invoked on behaviours when authority is removed. + /// When NetworkIdentity.RemoveClientAuthority is called on the server, this will be called on the client that owns the object. + /// + public virtual void OnStopAuthority() + { + } + + /// + /// Callback used by the visibility system to (re)construct the set of observers that can see this object. + /// Implementations of this callback should add network connections of players that can see this object to the observers set. + /// + /// The new set of observers for this object. + /// True if the set of observers is being built for the first time. + /// Return true if this function did work. + public virtual bool OnRebuildObservers(HashSet observers, bool initialize) + { + return false; + } + + /// + /// Callback used by the visibility system for objects on a host. + /// Objects on a host (with a local client) cannot be disabled or destroyed when they are not visibile to the local client. So this function is called to allow custom code to hide these objects. A typical implementation will disable renderer components on the object. This is only called on local clients on a host. + /// + /// New visibility state. + public virtual void OnSetLocalVisibility(bool vis) + { + } + + /// + /// Callback used by the visibility system to determine if an observer (player) can see this object. + /// If this function returns true, the network connection will be added as an observer. + /// + /// Network connection of a player. + /// True if the player can see this object. + public virtual bool OnCheckObserver(NetworkConnection conn) + { + return true; + } + + /// + /// This virtual function is used to specify the QoS channel to use for SyncVar updates for this script. + /// Using the NetworkSettings custom attribute causes this function to be implemented for this script, but developers can also implement it themselves. + /// + /// The QoS channel for this script. + public virtual int GetNetworkChannel() + { + return Channels.DefaultReliable; + } + + /// + /// This virtual function is used to specify the send interval to use for SyncVar updates for this script. + /// Using the NetworkSettings custom attribute causes this function to be implemented for this script, but developers can also implement it themselves. + /// + /// The time in seconds between updates. + public virtual float GetNetworkSendInterval() + { + return k_DefaultSendInterval; + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBehaviour.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBehaviour.cs.meta new file mode 100644 index 00000000..d62e70c2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6e3592ab23b7a47e3b6d3f50ee200c86 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBuffer.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBuffer.cs new file mode 100644 index 00000000..9b0f63e1 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBuffer.cs @@ -0,0 +1,248 @@ +#if ENABLE_UNET +using System; +using System.Runtime.InteropServices; + +namespace UnityEngine.Networking +{ + // A growable buffer class used by NetworkReader and NetworkWriter. + // this is used instead of MemoryStream and BinaryReader/BinaryWriter to avoid allocations. + class NetBuffer + { + byte[] m_Buffer; + uint m_Pos; + const int k_InitialSize = 64; + const float k_GrowthFactor = 1.5f; + const int k_BufferSizeWarning = 1024 * 1024 * 128; + + public uint Position { get { return m_Pos; } } + public int Length { get { return m_Buffer.Length; } } + + public NetBuffer() + { + m_Buffer = new byte[k_InitialSize]; + } + + // this does NOT copy the buffer + public NetBuffer(byte[] buffer) + { + m_Buffer = buffer; + } + + public byte ReadByte() + { + if (m_Pos >= m_Buffer.Length) + { + throw new IndexOutOfRangeException("NetworkReader:ReadByte out of range:" + ToString()); + } + + return m_Buffer[m_Pos++]; + } + + public void ReadBytes(byte[] buffer, uint count) + { + if (m_Pos + count > m_Buffer.Length) + { + throw new IndexOutOfRangeException("NetworkReader:ReadBytes out of range: (" + count + ") " + ToString()); + } + + for (ushort i = 0; i < count; i++) + { + buffer[i] = m_Buffer[m_Pos + i]; + } + m_Pos += count; + } + + internal ArraySegment AsArraySegment() + { + return new ArraySegment(m_Buffer, 0, (int)m_Pos); + } + + public void WriteByte(byte value) + { + WriteCheckForSpace(1); + m_Buffer[m_Pos] = value; + m_Pos += 1; + } + + public void WriteByte2(byte value0, byte value1) + { + WriteCheckForSpace(2); + m_Buffer[m_Pos] = value0; + m_Buffer[m_Pos + 1] = value1; + m_Pos += 2; + } + + public void WriteByte4(byte value0, byte value1, byte value2, byte value3) + { + WriteCheckForSpace(4); + m_Buffer[m_Pos] = value0; + m_Buffer[m_Pos + 1] = value1; + m_Buffer[m_Pos + 2] = value2; + m_Buffer[m_Pos + 3] = value3; + m_Pos += 4; + } + + public void WriteByte8(byte value0, byte value1, byte value2, byte value3, byte value4, byte value5, byte value6, byte value7) + { + WriteCheckForSpace(8); + m_Buffer[m_Pos] = value0; + m_Buffer[m_Pos + 1] = value1; + m_Buffer[m_Pos + 2] = value2; + m_Buffer[m_Pos + 3] = value3; + m_Buffer[m_Pos + 4] = value4; + m_Buffer[m_Pos + 5] = value5; + m_Buffer[m_Pos + 6] = value6; + m_Buffer[m_Pos + 7] = value7; + m_Pos += 8; + } + + // every other Write() function in this class writes implicitly at the end-marker m_Pos. + // this is the only Write() function that writes to a specific location within the buffer + public void WriteBytesAtOffset(byte[] buffer, ushort targetOffset, ushort count) + { + uint newEnd = (uint)(count + targetOffset); + + WriteCheckForSpace((ushort)newEnd); + + if (targetOffset == 0 && count == buffer.Length) + { + buffer.CopyTo(m_Buffer, (int)m_Pos); + } + else + { + //CopyTo doesnt take a count :( + for (int i = 0; i < count; i++) + { + m_Buffer[targetOffset + i] = buffer[i]; + } + } + + // although this writes within the buffer, it could move the end-marker + if (newEnd > m_Pos) + { + m_Pos = newEnd; + } + } + + public void WriteBytes(byte[] buffer, ushort count) + { + WriteCheckForSpace(count); + + if (count == buffer.Length) + { + buffer.CopyTo(m_Buffer, (int)m_Pos); + } + else + { + //CopyTo doesnt take a count :( + for (int i = 0; i < count; i++) + { + m_Buffer[m_Pos + i] = buffer[i]; + } + } + m_Pos += count; + } + + void WriteCheckForSpace(ushort count) + { + if (m_Pos + count < m_Buffer.Length) + return; + + int newLen = (int)Math.Ceiling(m_Buffer.Length * k_GrowthFactor); + while (m_Pos + count >= newLen) + { + newLen = (int)Math.Ceiling(newLen * k_GrowthFactor); + if (newLen > k_BufferSizeWarning) + { + Debug.LogWarning("NetworkBuffer size is " + newLen + " bytes!"); + } + } + + // only do the copy once, even if newLen is increased multiple times + byte[] tmp = new byte[newLen]; + m_Buffer.CopyTo(tmp, 0); + m_Buffer = tmp; + } + + public void FinishMessage() + { + // two shorts (size and msgType) are in header. + ushort sz = (ushort)(m_Pos - (sizeof(ushort) * 2)); + m_Buffer[0] = (byte)(sz & 0xff); + m_Buffer[1] = (byte)((sz >> 8) & 0xff); + } + + public void SeekZero() + { + m_Pos = 0; + } + + public void Replace(byte[] buffer) + { + m_Buffer = buffer; + m_Pos = 0; + } + + public override string ToString() + { + return String.Format("NetBuf sz:{0} pos:{1}", m_Buffer.Length, m_Pos); + } + } // end NetBuffer + + // -- helpers for float conversion -- + [StructLayout(LayoutKind.Explicit)] + internal struct UIntFloat + { + [FieldOffset(0)] + public float floatValue; + + [FieldOffset(0)] + public uint intValue; + + [FieldOffset(0)] + public double doubleValue; + + [FieldOffset(0)] + public ulong longValue; + } + + [StructLayout(LayoutKind.Explicit)] + internal struct UIntDecimal + { + [FieldOffset(0)] + public ulong longValue1; + + [FieldOffset(8)] + public ulong longValue2; + + [FieldOffset(0)] + public decimal decimalValue; + } + + internal class FloatConversion + { + public static float ToSingle(uint value) + { + UIntFloat uf = new UIntFloat(); + uf.intValue = value; + return uf.floatValue; + } + + public static double ToDouble(ulong value) + { + UIntFloat uf = new UIntFloat(); + uf.longValue = value; + return uf.doubleValue; + } + + public static decimal ToDecimal(ulong value1, ulong value2) + { + UIntDecimal uf = new UIntDecimal(); + uf.longValue1 = value1; + uf.longValue2 = value2; + return uf.decimalValue; + } + } +} + +#endif diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBuffer.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBuffer.cs.meta new file mode 100644 index 00000000..cd79c41e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkBuffer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1a5250de18ed64562bc2428157fe08fa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCRC.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCRC.cs new file mode 100644 index 00000000..65e0a498 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCRC.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEngine.Networking.NetworkSystem; + +namespace UnityEngine.Networking +{ + /// + /// This class holds information about which networked scripts use which QoS channels for updates. + /// This channel information is used to ensure that clients and servers are using compatible HLAPI script configurations. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkCRC + { + internal static NetworkCRC s_Singleton; + + Dictionary m_Scripts = new Dictionary(); + bool m_ScriptCRCCheck; + + static internal NetworkCRC singleton + { + get + { + if (s_Singleton == null) + { + s_Singleton = new NetworkCRC(); + } + return s_Singleton; + } + } + /// + /// A dictionary of script QoS channels. + /// This is used to compare script network configurations between clients and servers. + /// + public Dictionary scripts { get { return m_Scripts; } } + + /// + /// Enables a CRC check between server and client that ensures the NetworkBehaviour scripts match. + /// This may not be appropriate in some cases, such a when the client and server are different Unity projects. + /// + static public bool scriptCRCCheck + { + get + { + return singleton.m_ScriptCRCCheck; + } + set + { + singleton.m_ScriptCRCCheck = value; + } + } + + /// + /// This can be used to reinitialize the set of script CRCs. + /// This is very rarely required - only when NetworkBehaviour scripts are dynamically loaded. + /// + /// + // The NetworkCRC cache contain entries from + static public void ReinitializeScriptCRCs(Assembly callingAssembly) + { + singleton.m_Scripts.Clear(); + + var types = callingAssembly.GetTypes(); + for (int i = 0; i < types.Length; i++) + { + var t = types[i]; + if (t.GetBaseType() == typeof(NetworkBehaviour)) + { + var cctor = t.GetMethod(".cctor", BindingFlags.Static); + if (cctor != null) + { + cctor.Invoke(null, new object[] {}); + } + } + } + } + + /// + /// This is used to setup script network settings CRC data. + /// + /// Script name. + /// QoS Channel. + static public void RegisterBehaviour(string name, int channel) + { + singleton.m_Scripts[name] = channel; + } + + internal static bool Validate(CRCMessageEntry[] scripts, int numChannels) + { + return singleton.ValidateInternal(scripts, numChannels); + } + + bool ValidateInternal(CRCMessageEntry[] remoteScripts, int numChannels) + { + // check count against my channels + if (m_Scripts.Count != remoteScripts.Length) + { + if (LogFilter.logWarn) { Debug.LogWarning("Network configuration mismatch detected. The number of networked scripts on the client does not match the number of networked scripts on the server. This could be caused by lazy loading of scripts on the client. This warning can be disabled by the checkbox in NetworkManager Script CRC Check."); } + Dump(remoteScripts); + return false; + } + + // check each script + for (int i = 0; i < remoteScripts.Length; i++) + { + var script = remoteScripts[i]; + if (LogFilter.logDebug) { Debug.Log("Script: " + script.name + " Channel: " + script.channel); } + + if (m_Scripts.ContainsKey(script.name)) + { + int localChannel = m_Scripts[script.name]; + if (localChannel != script.channel) + { + if (LogFilter.logError) { Debug.LogError("HLAPI CRC Channel Mismatch. Script: " + script.name + " LocalChannel: " + localChannel + " RemoteChannel: " + script.channel); } + Dump(remoteScripts); + return false; + } + } + if (script.channel >= numChannels) + { + if (LogFilter.logError) { Debug.LogError("HLAPI CRC channel out of range! Script: " + script.name + " Channel: " + script.channel); } + Dump(remoteScripts); + return false; + } + } + return true; + } + + void Dump(CRCMessageEntry[] remoteScripts) + { + foreach (var script in m_Scripts.Keys) + { + Debug.Log("CRC Local Dump " + script + " : " + m_Scripts[script]); + } + + foreach (var remote in remoteScripts) + { + Debug.Log("CRC Remote Dump " + remote.name + " : " + remote.channel); + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCRC.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCRC.cs.meta new file mode 100644 index 00000000..2c204652 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCRC.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 248b66b86e74a4b8494569689bc0ccfb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCallbacks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCallbacks.cs new file mode 100644 index 00000000..3382b731 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCallbacks.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + public class NetworkCallbacks : MonoBehaviour + { + void LateUpdate() + { + NetworkIdentity.UNetStaticUpdate(); + } + } +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCallbacks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCallbacks.cs.meta new file mode 100644 index 00000000..4a6d7020 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkCallbacks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5424a267dd32cbb4181e868feb64e08d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkClient.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkClient.cs new file mode 100644 index 00000000..aa1d1d55 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkClient.cs @@ -0,0 +1,1299 @@ +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Sockets; +using UnityEngine.Networking.Match; +using UnityEngine.Networking.NetworkSystem; + +namespace UnityEngine.Networking +{ + /// + /// This is a network client class used by the networking system. It contains a NetworkConnection that is used to connect to a network server. + /// The NetworkClient handle connection state, messages handlers, and connection configuration. There can be many NetworkClient instances in a process at a time, but only one that is connected to a game server (NetworkServer) that uses spawned objects. + /// NetworkClient has an internal update function where it handles events from the transport layer. This includes asynchronous connect events, disconnect events and incoming data from a server. + /// The NetworkManager has a NetworkClient instance that it uses for games that it starts, but the NetworkClient may be used by itself. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkClient + { + Type m_NetworkConnectionClass = typeof(NetworkConnection); + + const int k_MaxEventsPerFrame = 500; + + static List s_Clients = new List(); + static bool s_IsActive; + + /// + /// A list of all the active network clients in the current process. + /// This is NOT a list of all clients that are connected to the remote server, it is client instances on the local game. + /// + public static List allClients { get { return s_Clients; } } + /// + /// True if a network client is currently active. + /// + public static bool active { get { return s_IsActive; } } + + HostTopology m_HostTopology; + int m_HostPort; + + bool m_UseSimulator; + int m_SimulatedLatency; + float m_PacketLoss; + + string m_ServerIp = ""; + int m_ServerPort; + int m_ClientId = -1; + int m_ClientConnectionId = -1; + //int m_RelaySlotId = -1; + + int m_StatResetTime; + + EndPoint m_RemoteEndPoint; + + // static message objects to avoid runtime-allocations + static CRCMessage s_CRCMessage = new CRCMessage(); + + NetworkMessageHandlers m_MessageHandlers = new NetworkMessageHandlers(); + protected NetworkConnection m_Connection; + + byte[] m_MsgBuffer; + NetworkReader m_MsgReader; + + protected enum ConnectState + { + None, + Resolving, + Resolved, + Connecting, + Connected, + Disconnected, + Failed + } + protected ConnectState m_AsyncConnect = ConnectState.None; + string m_RequestedServerHost = ""; + + internal void SetHandlers(NetworkConnection conn) + { + conn.SetHandlers(m_MessageHandlers); + } + + /// + /// The IP address of the server that this client is connected to. + /// This will be empty if the client has not connected yet. + /// + public string serverIp { get { return m_ServerIp; } } + /// + /// The port of the server that this client is connected to. + /// This will be zero if the client has not connected yet. + /// + public int serverPort { get { return m_ServerPort; } } + /// + /// The NetworkConnection object this client is using. + /// + public NetworkConnection connection { get { return m_Connection; } } + + [Obsolete("Moved to NetworkMigrationManager.")] + public PeerInfoMessage[] peers { get { return null; } } + + internal int hostId { get { return m_ClientId; } } + /// + /// The registered network message handlers. + /// + public Dictionary handlers { get { return m_MessageHandlers.GetHandlers(); } } + /// + /// The number of QoS channels currently configured for this client. + /// + public int numChannels { get { return m_HostTopology.DefaultConfig.ChannelCount; } } + /// + /// The host topology that this client is using. + /// This is read-only once the client is started. + /// + public HostTopology hostTopology { get { return m_HostTopology; }} + /// + /// The local port that the network client uses to connect to the server. + /// It defaults to 0, which means the network client will use a free port of system choice. + /// + public int hostPort + { + get { return m_HostPort; } + set + { + if (value < 0) + throw new ArgumentException("Port must not be a negative number."); + + if (value > 65535) + throw new ArgumentException("Port must not be greater than 65535."); + + m_HostPort = value; + } + } + + /// + /// This gives the current connection status of the client. + /// + public bool isConnected { get { return m_AsyncConnect == ConnectState.Connected; }} + + /// + /// The class to use when creating new NetworkConnections. + /// This can be set with SetNetworkConnectionClass. This allows custom classes that do special processing of data from the transport layer to be used with the NetworkClient. + /// See NetworkConnection.TransportSend and NetworkConnection.TransportReceive for details. + /// + public Type networkConnectionClass + { + get { return m_NetworkConnectionClass; } + } + + /// + /// This sets the class that is used when creating new network connections. + /// The class must be derived from NetworkConnection. + /// + /// + public void SetNetworkConnectionClass() where T : NetworkConnection + { + m_NetworkConnectionClass = typeof(T); + } + + /// + /// Creates a new NetworkClient instance. + /// + public NetworkClient() + { + if (LogFilter.logDev) { Debug.Log("Client created version " + Version.Current); } + m_MsgBuffer = new byte[NetworkMessage.MaxMessageSize]; + m_MsgReader = new NetworkReader(m_MsgBuffer); + AddClient(this); + } + + public NetworkClient(NetworkConnection conn) + { + if (LogFilter.logDev) { Debug.Log("Client created version " + Version.Current); } + m_MsgBuffer = new byte[NetworkMessage.MaxMessageSize]; + m_MsgReader = new NetworkReader(m_MsgBuffer); + AddClient(this); + + SetActive(true); + m_Connection = conn; + m_AsyncConnect = ConnectState.Connected; + conn.SetHandlers(m_MessageHandlers); + RegisterSystemHandlers(false); + } + + /// + /// This configures the transport layer settings for a client. + /// The settings in the ConnectionConfig or HostTopology object will be used to configure the transport layer connection used by this client. This must match the configuration of the server. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : MonoBehaviour + /// { + /// void DoConnect() + /// { + /// ConnectionConfig config = new ConnectionConfig(); + /// config.AddChannel(QosType.ReliableSequenced); + /// config.AddChannel(QosType.UnreliableSequenced); + /// config.PacketSize = 500; + /// NetworkClient client = new NetworkClient(); + /// client.Configure(config, 1); + /// client.Connect("127.0.0.1", 7070); + /// } + /// }; + /// + /// + /// Transport layer configuration object. + /// The maximum number of connections to allow. + /// True if the configuration was successful. + public bool Configure(ConnectionConfig config, int maxConnections) + { + HostTopology top = new HostTopology(config, maxConnections); + return Configure(top); + } + + /// + /// This configures the transport layer settings for a client. + /// The settings in the ConnectionConfig or HostTopology object will be used to configure the transport layer connection used by this client. This must match the configuration of the server. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : MonoBehaviour + /// { + /// void DoConnect() + /// { + /// ConnectionConfig config = new ConnectionConfig(); + /// config.AddChannel(QosType.ReliableSequenced); + /// config.AddChannel(QosType.UnreliableSequenced); + /// config.PacketSize = 500; + /// NetworkClient client = new NetworkClient(); + /// client.Configure(config, 1); + /// client.Connect("127.0.0.1", 7070); + /// } + /// }; + /// + /// + /// Transport layer topology object. + /// True if the configuration was successful. + public bool Configure(HostTopology topology) + { + //NOTE: this maxConnections is across all clients that use this tuner, so it is + // effectively the number of _clients_. + m_HostTopology = topology; + return true; + } + + public void Connect(MatchInfo matchInfo) + { + PrepareForConnect(); + ConnectWithRelay(matchInfo); + } + + /// + /// This is used by a client that has lost the connection to the old host, to reconnect to the new host of a game. + /// + /// The IP address of the new host. + /// The port of the new host. + /// True if able to reconnect. + public bool ReconnectToNewHost(string serverIp, int serverPort) + { + if (!NetworkClient.active) + { + if (LogFilter.logError) { Debug.LogError("Reconnect - NetworkClient must be active"); } + return false; + } + + if (m_Connection == null) + { + if (LogFilter.logError) { Debug.LogError("Reconnect - no old connection exists"); } + return false; + } + + if (LogFilter.logInfo) { Debug.Log("NetworkClient Reconnect " + serverIp + ":" + serverPort); } + + ClientScene.HandleClientDisconnect(m_Connection); + ClientScene.ClearLocalPlayers(); + + m_Connection.Disconnect(); + m_Connection = null; + m_ClientId = NetworkManager.activeTransport.AddHost(m_HostTopology, m_HostPort, null); + + string hostnameOrIp = serverIp; + m_ServerPort = serverPort; + + //TODO: relay reconnect + /* + if (Match.NetworkMatch.matchSingleton != null) + { + hostnameOrIp = Match.NetworkMatch.matchSingleton.address; + m_ServerPort = Match.NetworkMatch.matchSingleton.port; + }*/ + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + m_ServerIp = hostnameOrIp; + m_AsyncConnect = ConnectState.Resolved; + } + else if (serverIp.Equals("127.0.0.1") || serverIp.Equals("localhost")) + { + m_ServerIp = "127.0.0.1"; + m_AsyncConnect = ConnectState.Resolved; + } + else + { + if (LogFilter.logDebug) { Debug.Log("Async DNS START:" + hostnameOrIp); } + m_AsyncConnect = ConnectState.Resolving; + Dns.BeginGetHostAddresses(hostnameOrIp, new AsyncCallback(GetHostAddressesCallback), this); + } + return true; + } + + public bool ReconnectToNewHost(EndPoint secureTunnelEndPoint) + { + if (!NetworkClient.active) + { + if (LogFilter.logError) { Debug.LogError("Reconnect - NetworkClient must be active"); } + return false; + } + + if (m_Connection == null) + { + if (LogFilter.logError) { Debug.LogError("Reconnect - no old connection exists"); } + return false; + } + + if (LogFilter.logInfo) { Debug.Log("NetworkClient Reconnect to remoteSockAddr"); } + + ClientScene.HandleClientDisconnect(m_Connection); + ClientScene.ClearLocalPlayers(); + + m_Connection.Disconnect(); + m_Connection = null; + m_ClientId = NetworkManager.activeTransport.AddHost(m_HostTopology, m_HostPort, null); + + if (secureTunnelEndPoint == null) + { + if (LogFilter.logError) { Debug.LogError("Reconnect failed: null endpoint passed in"); } + m_AsyncConnect = ConnectState.Failed; + return false; + } + + // Make sure it's either IPv4 or IPv6 + if (secureTunnelEndPoint.AddressFamily != AddressFamily.InterNetwork && secureTunnelEndPoint.AddressFamily != AddressFamily.InterNetworkV6) + { + if (LogFilter.logError) { Debug.LogError("Reconnect failed: Endpoint AddressFamily must be either InterNetwork or InterNetworkV6"); } + m_AsyncConnect = ConnectState.Failed; + return false; + } + + // Make sure it's an Endpoint we know what to do with + string endPointType = secureTunnelEndPoint.GetType().FullName; + if (endPointType == "System.Net.IPEndPoint") + { + IPEndPoint tmp = (IPEndPoint)secureTunnelEndPoint; + Connect(tmp.Address.ToString(), tmp.Port); + return m_AsyncConnect != ConnectState.Failed; + } + if ((endPointType != "UnityEngine.XboxOne.XboxOneEndPoint") && (endPointType != "UnityEngine.PS4.SceEndPoint")) + { + if (LogFilter.logError) { Debug.LogError("Reconnect failed: invalid Endpoint (not IPEndPoint or XboxOneEndPoint or SceEndPoint)"); } + m_AsyncConnect = ConnectState.Failed; + return false; + } + + byte error = 0; + // regular non-relay connect + m_RemoteEndPoint = secureTunnelEndPoint; + m_AsyncConnect = ConnectState.Connecting; + + try + { + m_ClientConnectionId = NetworkManager.activeTransport.ConnectEndPoint(m_ClientId, m_RemoteEndPoint, 0, out error); + } + catch (Exception ex) + { + if (LogFilter.logError) { Debug.LogError("Reconnect failed: Exception when trying to connect to EndPoint: " + ex); } + m_AsyncConnect = ConnectState.Failed; + return false; + } + if (m_ClientConnectionId == 0) + { + if (LogFilter.logError) { Debug.LogError("Reconnect failed: Unable to connect to EndPoint (" + error + ")"); } + m_AsyncConnect = ConnectState.Failed; + return false; + } + + m_Connection = (NetworkConnection)Activator.CreateInstance(m_NetworkConnectionClass); + m_Connection.SetHandlers(m_MessageHandlers); + m_Connection.Initialize(m_ServerIp, m_ClientId, m_ClientConnectionId, m_HostTopology); + return true; + } + + /// + /// Connect client to a NetworkServer instance with simulated latency and packet loss. + /// + /// Target IP address or hostname. + /// Target port number. + /// Simulated latency in milliseconds. + /// Simulated packet loss percentage. + public void ConnectWithSimulator(string serverIp, int serverPort, int latency, float packetLoss) + { + m_UseSimulator = true; + m_SimulatedLatency = latency; + m_PacketLoss = packetLoss; + Connect(serverIp, serverPort); + } + + static bool IsValidIpV6(string address) + { + for (int i = 0; i < address.Length; i++) + { + var c = address[i]; + if ( + (c == ':') || + (c >= '0' && c <= '9') || + (c >= 'a' && c <= 'f') || + (c >= 'A' && c <= 'F') + ) + { + continue; + } + return false; + } + return true; + } + + /// + /// Connect client to a NetworkServer instance. + /// Connecting to a server is asynchronous. There is connection message that is fired when the client connects. If the connection fails, a MsgType.Error message will be generated. Once a connection is established you are able to send messages on the connection using NetworkClient.Send(). If using other features of the high level api, the client should call NetworkClient.IsReady() once it is ready to participate in the game. At that point the client will be sent spawned objects and state update messages. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class NetClient + /// { + /// NetworkClient myClient; + /// + /// public void OnConnected(NetworkConnection conn, NetworkReader reader) + /// { + /// Debug.Log("Connected to server"); + /// } + /// + /// public void OnDisconnected(NetworkConnection conn, NetworkReader reader) + /// { + /// Debug.Log("Disconnected from server"); + /// } + /// + /// public void OnError(NetworkConnection conn, NetworkReader reader) + /// { + /// SystemErrorMessage errorMsg = reader.SmartRead<SystemErrorMessage>(); + /// Debug.Log("Error connecting with code " + errorMsg.errorCode); + /// } + /// + /// public void Start() + /// { + /// myClient = NetworkClient.Instance; + /// myClient.RegisterHandler(MsgType.SYSTEM_CONNECT, OnConnected); + /// myClient.RegisterHandler(MsgType.SYSTEM_DISCONNECT, OnDisconnected); + /// myClient.RegisterHandler(MsgType.SYSTEM_ERROR, OnError); + /// myClient.Connect("127.0.0.1", 8888); + /// } + /// } + /// + /// + /// Target IP address or hostname. + /// Target port number. + public void Connect(string serverIp, int serverPort) + { + PrepareForConnect(); + + if (LogFilter.logDebug) { Debug.Log("Client Connect: " + serverIp + ":" + serverPort); } + + string hostnameOrIp = serverIp; + m_ServerPort = serverPort; + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + m_ServerIp = hostnameOrIp; + m_AsyncConnect = ConnectState.Resolved; + } + else if (serverIp.Equals("127.0.0.1") || serverIp.Equals("localhost")) + { + m_ServerIp = "127.0.0.1"; + m_AsyncConnect = ConnectState.Resolved; + } + else if (serverIp.IndexOf(":") != -1 && IsValidIpV6(serverIp)) + { + m_ServerIp = serverIp; + m_AsyncConnect = ConnectState.Resolved; + } + else + { + if (LogFilter.logDebug) { Debug.Log("Async DNS START:" + hostnameOrIp); } + m_RequestedServerHost = hostnameOrIp; + m_AsyncConnect = ConnectState.Resolving; + Dns.BeginGetHostAddresses(hostnameOrIp, GetHostAddressesCallback, this); + } + } + + public void Connect(EndPoint secureTunnelEndPoint) + { + bool usePlatformSpecificProtocols = NetworkManager.activeTransport.DoesEndPointUsePlatformProtocols(secureTunnelEndPoint); + PrepareForConnect(usePlatformSpecificProtocols); + + if (LogFilter.logDebug) { Debug.Log("Client Connect to remoteSockAddr"); } + + if (secureTunnelEndPoint == null) + { + if (LogFilter.logError) { Debug.LogError("Connect failed: null endpoint passed in"); } + m_AsyncConnect = ConnectState.Failed; + return; + } + + // Make sure it's either IPv4 or IPv6 + if (secureTunnelEndPoint.AddressFamily != AddressFamily.InterNetwork && secureTunnelEndPoint.AddressFamily != AddressFamily.InterNetworkV6) + { + if (LogFilter.logError) { Debug.LogError("Connect failed: Endpoint AddressFamily must be either InterNetwork or InterNetworkV6"); } + m_AsyncConnect = ConnectState.Failed; + return; + } + + // Make sure it's an Endpoint we know what to do with + string endPointType = secureTunnelEndPoint.GetType().FullName; + if (endPointType == "System.Net.IPEndPoint") + { + IPEndPoint tmp = (IPEndPoint)secureTunnelEndPoint; + Connect(tmp.Address.ToString(), tmp.Port); + return; + } + if ((endPointType != "UnityEngine.XboxOne.XboxOneEndPoint") && (endPointType != "UnityEngine.PS4.SceEndPoint")) + { + if (LogFilter.logError) { Debug.LogError("Connect failed: invalid Endpoint (not IPEndPoint or XboxOneEndPoint or SceEndPoint)"); } + m_AsyncConnect = ConnectState.Failed; + return; + } + + byte error = 0; + // regular non-relay connect + m_RemoteEndPoint = secureTunnelEndPoint; + m_AsyncConnect = ConnectState.Connecting; + + try + { + m_ClientConnectionId = NetworkManager.activeTransport.ConnectEndPoint(m_ClientId, m_RemoteEndPoint, 0, out error); + } + catch (Exception ex) + { + if (LogFilter.logError) { Debug.LogError("Connect failed: Exception when trying to connect to EndPoint: " + ex); } + m_AsyncConnect = ConnectState.Failed; + return; + } + if (m_ClientConnectionId == 0) + { + if (LogFilter.logError) { Debug.LogError("Connect failed: Unable to connect to EndPoint (" + error + ")"); } + m_AsyncConnect = ConnectState.Failed; + return; + } + + m_Connection = (NetworkConnection)Activator.CreateInstance(m_NetworkConnectionClass); + m_Connection.SetHandlers(m_MessageHandlers); + m_Connection.Initialize(m_ServerIp, m_ClientId, m_ClientConnectionId, m_HostTopology); + } + + void PrepareForConnect() + { + PrepareForConnect(false); + } + + void PrepareForConnect(bool usePlatformSpecificProtocols) + { + SetActive(true); + RegisterSystemHandlers(false); + + if (m_HostTopology == null) + { + var config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + config.UsePlatformSpecificProtocols = usePlatformSpecificProtocols; + m_HostTopology = new HostTopology(config, 8); + } + + if (m_UseSimulator) + { + int minTimeout = (m_SimulatedLatency / 3) - 1; + if (minTimeout < 1) + { + minTimeout = 1; + } + int maxTimeout = m_SimulatedLatency * 3; + + if (LogFilter.logDebug) { Debug.Log("AddHost Using Simulator " + minTimeout + "/" + maxTimeout); } + m_ClientId = NetworkManager.activeTransport.AddHostWithSimulator(m_HostTopology, minTimeout, maxTimeout, m_HostPort); + } + else + { + m_ClientId = NetworkManager.activeTransport.AddHost(m_HostTopology, m_HostPort, null); + } + } + + // this called in another thread! Cannot call Update() here. + internal static void GetHostAddressesCallback(IAsyncResult ar) + { + try + { + IPAddress[] ip = Dns.EndGetHostAddresses(ar); + NetworkClient client = (NetworkClient)ar.AsyncState; + + if (ip.Length == 0) + { + if (LogFilter.logError) { Debug.LogError("DNS lookup failed for:" + client.m_RequestedServerHost); } + client.m_AsyncConnect = ConnectState.Failed; + return; + } + + client.m_ServerIp = ip[0].ToString(); + client.m_AsyncConnect = ConnectState.Resolved; + if (LogFilter.logDebug) { Debug.Log("Async DNS Result:" + client.m_ServerIp + " for " + client.m_RequestedServerHost + ": " + client.m_ServerIp); } + } + catch (SocketException e) + { + NetworkClient client = (NetworkClient)ar.AsyncState; + if (LogFilter.logError) { Debug.LogError("DNS resolution failed: " + e.GetErrorCode()); } + if (LogFilter.logDebug) { Debug.Log("Exception:" + e); } + client.m_AsyncConnect = ConnectState.Failed; + } + } + + internal void ContinueConnect() + { + byte error; + // regular non-relay connect + if (m_UseSimulator) + { + int simLatency = m_SimulatedLatency / 3; + if (simLatency < 1) + { + simLatency = 1; + } + + if (LogFilter.logDebug) { Debug.Log("Connect Using Simulator " + (m_SimulatedLatency / 3) + "/" + m_SimulatedLatency); } + var simConfig = new ConnectionSimulatorConfig( + simLatency, + m_SimulatedLatency, + simLatency, + m_SimulatedLatency, + m_PacketLoss); + + m_ClientConnectionId = NetworkManager.activeTransport.ConnectWithSimulator(m_ClientId, m_ServerIp, m_ServerPort, 0, out error, simConfig); + } + else + { + m_ClientConnectionId = NetworkManager.activeTransport.Connect(m_ClientId, m_ServerIp, m_ServerPort, 0, out error); + } + + m_Connection = (NetworkConnection)Activator.CreateInstance(m_NetworkConnectionClass); + m_Connection.SetHandlers(m_MessageHandlers); + m_Connection.Initialize(m_ServerIp, m_ClientId, m_ClientConnectionId, m_HostTopology); + } + + void ConnectWithRelay(MatchInfo info) + { + m_AsyncConnect = ConnectState.Connecting; + + Update(); + + byte error; + m_ClientConnectionId = NetworkManager.activeTransport.ConnectToNetworkPeer( + m_ClientId, + info.address, + info.port, + 0, + 0, + info.networkId, + Utility.GetSourceID(), + info.nodeId, + out error); + + m_Connection = (NetworkConnection)Activator.CreateInstance(m_NetworkConnectionClass); + m_Connection.SetHandlers(m_MessageHandlers); + m_Connection.Initialize(info.address, m_ClientId, m_ClientConnectionId, m_HostTopology); + + if (error != 0) { Debug.LogError("ConnectToNetworkPeer Error: " + error); } + } + + /// + /// Disconnect from server. + /// The disconnect message will be invoked. + /// + public virtual void Disconnect() + { + m_AsyncConnect = ConnectState.Disconnected; + ClientScene.HandleClientDisconnect(m_Connection); + if (m_Connection != null) + { + m_Connection.Disconnect(); + m_Connection.Dispose(); + m_Connection = null; + if (m_ClientId != -1) + { + NetworkManager.activeTransport.RemoveHost(m_ClientId); + m_ClientId = -1; + } + } + } + + /// + /// This sends a network message with a message Id to the server. This message is sent on channel zero, which by default is the reliable channel. + /// The message must be an instance of a class derived from MessageBase. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class RegisterHostMessage : MessageBase + /// { + /// public string gameName; + /// public string comment; + /// public bool passwordProtected; + /// } + /// + /// public class MasterClient + /// { + /// public NetworkClient client; + /// + /// public const short RegisterHostMsgId = 888; + /// + /// public void RegisterHost(string name) + /// { + /// RegisterHostMessage msg = new RegisterHostMessage(); + /// msg.gameName = name; + /// msg.comment = "test"; + /// msg.passwordProtected = false; + /// client.Send(RegisterHostMsgId, msg); + /// } + /// } + /// + /// The message id passed to Send() is used to identify the handler function to invoke on the server when the message is received. + /// + /// The id of the message to send. + /// A message instance to send. + /// True if message was sent. + public bool Send(short msgType, MessageBase msg) + { + if (m_Connection != null) + { + if (m_AsyncConnect != ConnectState.Connected) + { + if (LogFilter.logError) { Debug.LogError("NetworkClient Send when not connected to a server"); } + return false; + } +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.UserMessage, msgType + ":" + msg.GetType().Name); +#endif + return m_Connection.Send(msgType, msg); + } + if (LogFilter.logError) { Debug.LogError("NetworkClient Send with no connection"); } + return false; + } + + /// + /// This sends the contents of the NetworkWriter's buffer to the connected server on the specified channel. + /// The format of the data in the writer must be properly formatted for it to be processed as a message by the server. The functions StartMessage() and FinishMessage() can be used to properly format messages: + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class TestClient + /// { + /// public NetworkClient client; + /// + /// public const int RegisterHostMsgId = 888; + /// + /// public void RegisterHost(string name) + /// { + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(RegisterHostMsgId); + /// writer.Write(name); + /// writer.FinishMessage(); + /// client.SendWriter(writer, Channels.DefaultReliable); + /// } + /// } + /// + /// + /// Writer object containing data to send. + /// QoS channel to send data on. + /// True if data successfully sent. + public bool SendWriter(NetworkWriter writer, int channelId) + { + if (m_Connection != null) + { + if (m_AsyncConnect != ConnectState.Connected) + { + if (LogFilter.logError) { Debug.LogError("NetworkClient SendWriter when not connected to a server"); } + return false; + } + return m_Connection.SendWriter(writer, channelId); + } + if (LogFilter.logError) { Debug.LogError("NetworkClient SendWriter with no connection"); } + return false; + } + + /// + /// This sends the data in an array of bytes to the server that the client is connected to. + /// The data must be properly formatted. + /// + /// Data to send. + /// Number of bytes of data. + /// The QoS channel to send data on. + /// True if successfully sent. + public bool SendBytes(byte[] data, int numBytes, int channelId) + { + if (m_Connection != null) + { + if (m_AsyncConnect != ConnectState.Connected) + { + if (LogFilter.logError) { Debug.LogError("NetworkClient SendBytes when not connected to a server"); } + return false; + } + return m_Connection.SendBytes(data, numBytes, channelId); + } + if (LogFilter.logError) { Debug.LogError("NetworkClient SendBytes with no connection"); } + return false; + } + + /// + /// This sends a network message with a message Id to the server on channel one, which by default is the unreliable channel. + /// This does the same thing as NetworkClient.Send(), except that it send on the unreliable channel. + /// + /// The message id to send. + /// The message to send. + /// True if the message was sent. + public bool SendUnreliable(short msgType, MessageBase msg) + { + if (m_Connection != null) + { + if (m_AsyncConnect != ConnectState.Connected) + { + if (LogFilter.logError) { Debug.LogError("NetworkClient SendUnreliable when not connected to a server"); } + return false; + } +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.UserMessage, msgType + ":" + msg.GetType().Name); +#endif + return m_Connection.SendUnreliable(msgType, msg); + } + if (LogFilter.logError) { Debug.LogError("NetworkClient SendUnreliable with no connection"); } + return false; + } + + /// + /// This sends a network message with a message Id to the server on a specific channel. + /// This does the same thing as NetworkClient.Send(), but allows a transport layer QoS channel to be specified. + /// + /// The id of the message to send. + /// The message to send. + /// The channel to send the message on. + /// True if the message was sent. + public bool SendByChannel(short msgType, MessageBase msg, int channelId) + { +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.UserMessage, msgType + ":" + msg.GetType().Name); +#endif + if (m_Connection != null) + { + if (m_AsyncConnect != ConnectState.Connected) + { + if (LogFilter.logError) { Debug.LogError("NetworkClient SendByChannel when not connected to a server"); } + return false; + } + return m_Connection.SendByChannel(msgType, msg, channelId); + } + if (LogFilter.logError) { Debug.LogError("NetworkClient SendByChannel with no connection"); } + return false; + } + + /// + /// Set the maximum amount of time that can pass for transmitting the send buffer. + /// + /// Delay in seconds. + public void SetMaxDelay(float seconds) + { + if (m_Connection == null) + { + if (LogFilter.logWarn) { Debug.LogWarning("SetMaxDelay failed, not connected."); } + return; + } + m_Connection.SetMaxDelay(seconds); + } + + /// + /// Shut down a client. + /// This should be done when a client is no longer going to be used. + /// + public void Shutdown() + { + if (LogFilter.logDebug) Debug.Log("Shutting down client " + m_ClientId); + if (m_ClientId != -1) + { + NetworkManager.activeTransport.RemoveHost(m_ClientId); + m_ClientId = -1; + } + RemoveClient(this); + if (s_Clients.Count == 0) + { + SetActive(false); + } + } + + internal virtual void Update() + { + if (m_ClientId == -1) + { + return; + } + + switch (m_AsyncConnect) + { + case ConnectState.None: + case ConnectState.Resolving: + case ConnectState.Disconnected: + return; + + case ConnectState.Failed: + GenerateConnectError((int)NetworkError.DNSFailure); + m_AsyncConnect = ConnectState.Disconnected; + return; + + case ConnectState.Resolved: + m_AsyncConnect = ConnectState.Connecting; + ContinueConnect(); + return; + + case ConnectState.Connecting: + case ConnectState.Connected: + { + break; + } + } + + if (m_Connection != null) + { + if ((int)Time.time != m_StatResetTime) + { + m_Connection.ResetStats(); + m_StatResetTime = (int)Time.time; + } + } + + int numEvents = 0; + NetworkEventType networkEvent; + do + { + int connectionId; + int channelId; + int receivedSize; + byte error; + + networkEvent = NetworkManager.activeTransport.ReceiveFromHost(m_ClientId, out connectionId, out channelId, m_MsgBuffer, (ushort)m_MsgBuffer.Length, out receivedSize, out error); + if (m_Connection != null) m_Connection.lastError = (NetworkError)error; + + if (networkEvent != NetworkEventType.Nothing) + { + if (LogFilter.logDev) { Debug.Log("Client event: host=" + m_ClientId + " event=" + networkEvent + " error=" + error); } + } + + switch (networkEvent) + { + case NetworkEventType.ConnectEvent: + + if (LogFilter.logDebug) { Debug.Log("Client connected"); } + + if (error != 0) + { + GenerateConnectError(error); + return; + } + + m_AsyncConnect = ConnectState.Connected; + m_Connection.InvokeHandlerNoData(MsgType.Connect); + break; + + case NetworkEventType.DataEvent: + if (error != 0) + { + GenerateDataError(error); + return; + } + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.LLAPIMsg); +#endif + + m_MsgReader.SeekZero(); + m_Connection.TransportReceive(m_MsgBuffer, receivedSize, channelId); + break; + + case NetworkEventType.DisconnectEvent: + if (LogFilter.logDebug) { Debug.Log("Client disconnected"); } + + m_AsyncConnect = ConnectState.Disconnected; + + if (error != 0) + { + if ((NetworkError)error != NetworkError.Timeout) + { + GenerateDisconnectError(error); + } + } + ClientScene.HandleClientDisconnect(m_Connection); + if (m_Connection != null) + { + m_Connection.InvokeHandlerNoData(MsgType.Disconnect); + } + break; + + case NetworkEventType.Nothing: + break; + + default: + if (LogFilter.logError) { Debug.LogError("Unknown network message type received: " + networkEvent); } + break; + } + + if (++numEvents >= k_MaxEventsPerFrame) + { + if (LogFilter.logDebug) { Debug.Log("MaxEventsPerFrame hit (" + k_MaxEventsPerFrame + ")"); } + break; + } + if (m_ClientId == -1) + { + break; + } + } + while (networkEvent != NetworkEventType.Nothing); + + if (m_Connection != null && m_AsyncConnect == ConnectState.Connected) + m_Connection.FlushChannels(); + } + + void GenerateConnectError(int error) + { + if (LogFilter.logError) { Debug.LogError("UNet Client Error Connect Error: " + error); } + GenerateError(error); + } + + void GenerateDataError(int error) + { + NetworkError dataError = (NetworkError)error; + if (LogFilter.logError) { Debug.LogError("UNet Client Data Error: " + dataError); } + GenerateError(error); + } + + void GenerateDisconnectError(int error) + { + NetworkError disconnectError = (NetworkError)error; + if (LogFilter.logError) { Debug.LogError("UNet Client Disconnect Error: " + disconnectError); } + GenerateError(error); + } + + void GenerateError(int error) + { + NetworkMessageDelegate msgDelegate = m_MessageHandlers.GetHandler(MsgType.Error); + if (msgDelegate == null) + { + msgDelegate = m_MessageHandlers.GetHandler(MsgType.Error); + } + if (msgDelegate != null) + { + ErrorMessage msg = new ErrorMessage(); + msg.errorCode = error; + + // write the message to a local buffer + byte[] errorBuffer = new byte[200]; + NetworkWriter writer = new NetworkWriter(errorBuffer); + msg.Serialize(writer); + + // pass a reader (attached to local buffer) to handler + NetworkReader reader = new NetworkReader(errorBuffer); + + NetworkMessage netMsg = new NetworkMessage(); + netMsg.msgType = MsgType.Error; + netMsg.reader = reader; + netMsg.conn = m_Connection; + netMsg.channelId = 0; + msgDelegate(netMsg); + } + } + + /// + /// Get outbound network statistics for the client. + /// + /// Number of messages sent so far (including collated messages send through buffer). + /// Number of messages sent through buffer. + /// Number of bytes sent so far. + /// Number of messages buffered for sending per second. + public void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) + { + numMsgs = 0; + numBufferedMsgs = 0; + numBytes = 0; + lastBufferedPerSecond = 0; + + if (m_Connection != null) + { + m_Connection.GetStatsOut(out numMsgs, out numBufferedMsgs, out numBytes, out lastBufferedPerSecond); + } + } + + /// + /// Get inbound network statistics for the client. + /// + /// Number of messages received so far. + /// Number of bytes received so far. + public void GetStatsIn(out int numMsgs, out int numBytes) + { + numMsgs = 0; + numBytes = 0; + + if (m_Connection != null) + { + m_Connection.GetStatsIn(out numMsgs, out numBytes); + } + } + + /// + /// Retrieves statistics about the network packets sent on this connection. + /// + /// Dictionary of packet statistics for the client's connection. + public Dictionary GetConnectionStats() + { + if (m_Connection == null) + return null; + + return m_Connection.packetStats; + } + + /// + /// Resets the statistics return by NetworkClient.GetConnectionStats() to zero values. + /// Useful when building per-second network statistics. + /// + public void ResetConnectionStats() + { + if (m_Connection == null) + return; + + m_Connection.ResetStats(); + } + + /// + /// Gets the Return Trip Time for this connection. + /// This value is calculated by the transport layer. + /// + /// Return trip time in milliseconds. + public int GetRTT() + { + if (m_ClientId == -1) + return 0; + + byte err; + return NetworkManager.activeTransport.GetCurrentRTT(m_ClientId, m_ClientConnectionId, out err); + } + + internal void RegisterSystemHandlers(bool localClient) + { + ClientScene.RegisterSystemHandlers(this, localClient); + RegisterHandlerSafe(MsgType.CRC, OnCRC); + RegisterHandlerSafe(MsgType.Fragment, NetworkConnection.OnFragment); + } + + void OnCRC(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_CRCMessage); + NetworkCRC.Validate(s_CRCMessage.scripts, numChannels); + } + + /// + /// Register a handler for a particular message type. + /// There are several system message types which you can add handlers for. You can also add your own message types. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Server : MonoBehaviour + /// { + /// void Start() + /// { + /// NetworkServer.Listen(7070); + /// Debug.Log("Registering server callbacks"); + /// NetworkClient client = new NetworkClient(); + /// client.RegisterHandler(MsgType.Connect, OnConnected); + /// } + /// + /// void OnConnected(NetworkMessage netMsg) + /// { + /// Debug.Log("Client connected"); + /// } + /// } + /// + /// + /// Message type number. + /// Function handler which will be invoked for when this message type is received. + public void RegisterHandler(short msgType, NetworkMessageDelegate handler) + { + m_MessageHandlers.RegisterHandler(msgType, handler); + } + + public void RegisterHandlerSafe(short msgType, NetworkMessageDelegate handler) + { + m_MessageHandlers.RegisterHandlerSafe(msgType, handler); + } + + /// + /// Unregisters a network message handler. + /// + /// The message type to unregister. + public void UnregisterHandler(short msgType) + { + m_MessageHandlers.UnregisterHandler(msgType); + } + + /// + /// Retrieves statistics about the network packets sent on all connections. + /// + /// Dictionary of stats. + static public Dictionary GetTotalConnectionStats() + { + Dictionary stats = new Dictionary(); + for (int i = 0; i < s_Clients.Count; i++) + { + var client = s_Clients[i]; + var clientStats = client.GetConnectionStats(); + foreach (short k in clientStats.Keys) + { + if (stats.ContainsKey(k)) + { + NetworkConnection.PacketStat s = stats[k]; + s.count += clientStats[k].count; + s.bytes += clientStats[k].bytes; + stats[k] = s; + } + else + { + stats[k] = new NetworkConnection.PacketStat(clientStats[k]); + } + } + } + return stats; + } + + internal static void AddClient(NetworkClient client) + { + s_Clients.Add(client); + } + + internal static bool RemoveClient(NetworkClient client) + { + return s_Clients.Remove(client); + } + + static internal void UpdateClients() + { + for (int i = 0; i < s_Clients.Count; ++i) + { + if (s_Clients[i] != null) + s_Clients[i].Update(); + else + s_Clients.RemoveAt(i); + } + } + + /// + /// Shuts down all network clients. + /// This also shuts down the transport layer. + /// + static public void ShutdownAll() + { + while (s_Clients.Count != 0) + { + s_Clients[0].Shutdown(); + } + s_Clients = new List(); + s_IsActive = false; + ClientScene.Shutdown(); +#if UNITY_EDITOR + Profiler.ResetAll(); +#endif + } + + internal static void SetActive(bool state) + { + // what is this check? + //if (state == false && s_Clients.Count != 0) + // return; + + if (!s_IsActive && state) + { + NetworkManager.activeTransport.Init(); + } + s_IsActive = state; + } + }; +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkClient.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkClient.cs.meta new file mode 100644 index 00000000..1eb775e5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkClient.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd8cfd15219a14eefab007d470458856 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkConnection.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkConnection.cs new file mode 100644 index 00000000..548e49f6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkConnection.cs @@ -0,0 +1,968 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UnityEngine.Networking +{ + /// + /// A High level network connection. This is used for connections from client-to-server and for connection from server-to-client. + /// A NetworkConnection corresponds to a specific connection for a host in the transport layer. It has a connectionId that is assigned by the transport layer and passed to the Initialize function. + /// A NetworkClient has one NetworkConnection. A NetworkServerSimple manages multiple NetworkConnections. The NetworkServer has multiple "remote" connections and a "local" connection for the local client. + /// The NetworkConnection class provides message sending and handling facilities. For sending data over a network, there are methods to send message objects, byte arrays, and NetworkWriter objects. To handle data arriving from the network, handler functions can be registered for message Ids, byte arrays can be processed by HandleBytes(), and NetworkReader object can be processed by HandleReader(). + /// NetworkConnection objects also act as observers for networked objects. When a connection is an observer of a networked object with a NetworkIdentity, then the object will be visible to corresponding client for the connection, and incremental state changes will be sent to the client. + /// NetworkConnection objects can "own" networked game objects. Owned objects will be destroyed on the server by default when the connection is destroyed. A connection owns the player objects created by its client, and other objects with client-authority assigned to the corresponding client. + /// There are many virtual functions on NetworkConnection that allow its behaviour to be customized. NetworkClient and NetworkServer can both be made to instantiate custom classes derived from NetworkConnection by setting their networkConnectionClass member variable. + /// + /* + * wire protocol is a list of : size | msgType | payload + * (short) (variable) (buffer) + */ + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkConnection : IDisposable + { + ChannelBuffer[] m_Channels; + List m_PlayerControllers = new List(); + NetworkMessage m_NetMsg = new NetworkMessage(); + HashSet m_VisList = new HashSet(); + internal HashSet visList { get { return m_VisList; } } + NetworkWriter m_Writer; + + Dictionary m_MessageHandlersDict; + NetworkMessageHandlers m_MessageHandlers; + + HashSet m_ClientOwnedObjects; + NetworkMessage m_MessageInfo = new NetworkMessage(); + + const int k_MaxMessageLogSize = 150; + private NetworkError error; + + /// + /// Transport level host ID for this connection. + /// This is assigned by the transport layer and passed to the connection instance through the Initialize function. + /// + public int hostId = -1; + /// + /// Unique identifier for this connection that is assigned by the transport layer. + /// On a server, this Id is unique for every connection on the server. On a client this Id is local to the client, it is not the same as the Id on the server for this connection. + /// Transport layers connections begin at one. So on a client with a single connection to a server, the connectionId of that connection will be one. In NetworkServer, the connectionId of the local connection is zero. + /// Clients do not know their connectionId on the server, and do not know the connectionId of other clients on the server. + /// + public int connectionId = -1; + /// + /// Flag that tells if the connection has been marked as "ready" by a client calling ClientScene.Ready(). + /// This property is read-only. It is set by the system on the client when ClientScene.Ready() is called, and set by the system on the server when a ready message is received from a client. + /// A client that is ready is sent spawned objects by the server and updates to the state of spawned objects. A client that is not ready is not sent spawned objects. + /// + public bool isReady; + /// + /// The IP address associated with the connection. + /// + public string address; + /// + /// The last time that a message was received on this connection. + /// This includes internal system messages (such as Commands and ClientRpc calls) and user messages. + /// + public float lastMessageTime; + /// + /// The list of players for this connection. + /// In most cases this will be a single player. But, for "Couch Multiplayer" there could be multiple players for a single client. To see the players on your own client see ClientScene.localPlayers list. + /// + public List playerControllers { get { return m_PlayerControllers; } } + /// + /// A list of the NetworkIdentity objects owned by this connection. + /// This includes the player object for the connection - if it has localPlayerAutority set, and any objects spawned with local authority or set with AssignLocalAuthority. This list is read only. + /// This list can be used to validate messages from clients, to ensure that clients are only trying to control objects that they own. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Handler + /// { + /// static public void HandleTransform(NetworkMessage netMsg) + /// { + /// NetworkInstanceId netId = netMsg.reader.ReadNetworkId(); + /// GameObject foundObj = NetworkServer.FindLocalObject(netId); + /// if (foundObj == null) + /// { + /// return; + /// } + /// NetworkTransform foundSync = foundObj.GetComponent<NetworkTransform>(); + /// if (foundSync == null) + /// { + /// return; + /// } + /// if (!foundSync.localPlayerAuthority) + /// { + /// return; + /// } + /// if (netMsg.conn.clientOwnedObjects.Contains(netId)) + /// { + /// // process message + /// } + /// else + /// { + /// // error + /// } + /// } + /// } + /// + /// + public HashSet clientOwnedObjects { get { return m_ClientOwnedObjects; } } + /// + /// Setting this to true will log the contents of network message to the console. + /// Warning: this can be a lot of data and can be very slow. Both incoming and outgoing messages are logged. The format of the logs is: + /// ConnectionSend con:1 bytes:11 msgId:5 FB59D743FD120000000000 ConnectionRecv con:1 bytes:27 msgId:8 14F21000000000016800AC3FE090C240437846403CDDC0BD3B0000 + /// Note that these are application-level network messages, not protocol-level packets. There will typically be multiple network messages combined in a single protocol packet. + /// + public bool logNetworkMessages = false; + /// + /// True if the connection is connected to a remote end-point. + /// This applies to NetworkServer and NetworkClient connections. When not connected, the hostID will be -1. When connected, the hostID will be a positive integer. + /// + public bool isConnected { get { return hostId != -1; }} + + + /// + /// Structure used to track the number and size of packets of each packets type. + /// + public class PacketStat + { + public PacketStat() + { + msgType = 0; + count = 0; + bytes = 0; + } + + public PacketStat(PacketStat s) + { + msgType = s.msgType; + count = s.count; + bytes = s.bytes; + } + + /// + /// The message type these stats are for. + /// + public short msgType; + /// + /// The total number of messages of this type. + /// + public int count; + /// + /// Total bytes of all messages of this type. + /// + public int bytes; + + public override string ToString() + { + return MsgType.MsgTypeToString(msgType) + ": count=" + count + " bytes=" + bytes; + } + } + + /// + /// The last error associated with this connection. + /// Retrieve the last error that occurred on the connection, this value is set every time an event is received from the NetworkTransport. + /// In the following example, OnServerDisconnect is overridden from NetworkManager: + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : NetworkManager + /// { + /// public override void OnServerDisconnect(NetworkConnection conn) + /// { + /// if (conn.lastError != NetworkError.Ok) + /// { + /// if (LogFilter.logError) + /// { + /// Debug.LogError("ServerDisconnected due to error: " + conn.lastError); + /// } + /// } + /// } + /// } + /// + /// + public NetworkError lastError { get { return error; } internal set { error = value; } } + + Dictionary m_PacketStats = new Dictionary(); + internal Dictionary packetStats { get { return m_PacketStats; }} + +#if UNITY_EDITOR + static int s_MaxPacketStats = 255;//the same as maximum message types +#endif + + /// + /// This inializes the internal data structures of a NetworkConnection object, including channel buffers. + /// This is called by NetworkServer and NetworkClient on connection objects, but if used outside of that context, this function should be called before the connection is used. + /// This function can be overriden to perform additional initialization for the connection, but the base class Initialize function should always be called as it is required to setup internal state. + /// + /// The host or IP connected to. + /// The transport hostId for the connection. + /// The transport connectionId for the connection. + /// The topology to be used. + public virtual void Initialize(string networkAddress, int networkHostId, int networkConnectionId, HostTopology hostTopology) + { + m_Writer = new NetworkWriter(); + address = networkAddress; + hostId = networkHostId; + connectionId = networkConnectionId; + + int numChannels = hostTopology.DefaultConfig.ChannelCount; + int packetSize = hostTopology.DefaultConfig.PacketSize; + + if ((hostTopology.DefaultConfig.UsePlatformSpecificProtocols) && (UnityEngine.Application.platform != RuntimePlatform.PS4)) + throw new ArgumentOutOfRangeException("Platform specific protocols are not supported on this platform"); + + m_Channels = new ChannelBuffer[numChannels]; + for (int i = 0; i < numChannels; i++) + { + var qos = hostTopology.DefaultConfig.Channels[i]; + int actualPacketSize = packetSize; + if (qos.QOS == QosType.ReliableFragmented || qos.QOS == QosType.UnreliableFragmented) + { + actualPacketSize = hostTopology.DefaultConfig.FragmentSize * 128; + } + m_Channels[i] = new ChannelBuffer(this, actualPacketSize, (byte)i, IsReliableQoS(qos.QOS), IsSequencedQoS(qos.QOS)); + } + } + + // Track whether Dispose has been called. + bool m_Disposed; + + ~NetworkConnection() + { + Dispose(false); + } + + /// + /// Disposes of this connection, releasing channel buffers that it holds. + /// + public void Dispose() + { + Dispose(true); + // Take yourself off the Finalization queue + // to prevent finalization code for this object + // from executing a second time. + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + // Check to see if Dispose has already been called. + if (!m_Disposed && m_Channels != null) + { + for (int i = 0; i < m_Channels.Length; i++) + { + m_Channels[i].Dispose(); + } + } + m_Channels = null; + + if (m_ClientOwnedObjects != null) + { + foreach (var netId in m_ClientOwnedObjects) + { + var obj = NetworkServer.FindLocalObject(netId); + if (obj != null) + { + obj.GetComponent().ClearClientOwner(); + } + } + } + m_ClientOwnedObjects = null; + + m_Disposed = true; + } + + static bool IsSequencedQoS(QosType qos) + { + return (qos == QosType.ReliableSequenced || qos == QosType.UnreliableSequenced); + } + + static bool IsReliableQoS(QosType qos) + { + return (qos == QosType.Reliable || qos == QosType.ReliableFragmented || qos == QosType.ReliableSequenced || qos == QosType.ReliableStateUpdate); + } + + /// + /// This sets an option on the network channel. + /// Channel options are usually advanced tuning parameters. + /// + /// The channel the option will be set on. + /// The option to set. + /// The value for the option. + /// True if the option was set. + public bool SetChannelOption(int channelId, ChannelOption option, int value) + { + if (m_Channels == null) + return false; + + if (channelId < 0 || channelId >= m_Channels.Length) + return false; + + return m_Channels[channelId].SetOption(option, value); + } + + public NetworkConnection() + { + m_Writer = new NetworkWriter(); + } + + /// + /// Disconnects this connection. + /// + public void Disconnect() + { + address = ""; + isReady = false; + ClientScene.HandleClientDisconnect(this); + if (hostId == -1) + { + return; + } + byte error; + NetworkManager.activeTransport.Disconnect(hostId, connectionId, out error); + + RemoveObservers(); + } + + internal void SetHandlers(NetworkMessageHandlers handlers) + { + m_MessageHandlers = handlers; + m_MessageHandlersDict = handlers.GetHandlers(); + } + + /// + /// This function checks if there is a message handler registered for the message ID. + /// This is usually not required, as InvokeHandler handles message IDs without handlers. + /// + /// The message ID of the handler to look for. + /// True if a handler function was found. + public bool CheckHandler(short msgType) + { + return m_MessageHandlersDict.ContainsKey(msgType); + } + + /// + /// This function invokes the registered handler function for a message, without any message data. + /// This is useful to invoke handlers that dont have any additional data, such as the handlers for MsgType.Connect. + /// + /// The message ID of the handler to invoke. + /// True if a handler function was found and invoked. + public bool InvokeHandlerNoData(short msgType) + { + return InvokeHandler(msgType, null, 0); + } + + /// + /// This function invokes the registered handler function for a message. + /// Network connections used by the NetworkClient and NetworkServer use this function for handling network messages. + /// + /// The message type of the handler to use. + /// The stream to read the contents of the message from. + /// The channel that the message arrived on. + /// True if a handler function was found and invoked. + public bool InvokeHandler(short msgType, NetworkReader reader, int channelId) + { + if (m_MessageHandlersDict.ContainsKey(msgType)) + { + m_MessageInfo.msgType = msgType; + m_MessageInfo.conn = this; + m_MessageInfo.reader = reader; + m_MessageInfo.channelId = channelId; + + NetworkMessageDelegate msgDelegate = m_MessageHandlersDict[msgType]; + if (msgDelegate == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkConnection InvokeHandler no handler for " + msgType); } + return false; + } + msgDelegate(m_MessageInfo); + return true; + } + return false; + } + + /// + /// This function invokes the registered handler function for a message. + /// Network connections used by the NetworkClient and NetworkServer use this function for handling network messages. + /// + /// The message object to process. + /// True if a handler function was found and invoked. + public bool InvokeHandler(NetworkMessage netMsg) + { + if (m_MessageHandlersDict.ContainsKey(netMsg.msgType)) + { + NetworkMessageDelegate msgDelegate = m_MessageHandlersDict[netMsg.msgType]; + msgDelegate(netMsg); + return true; + } + return false; + } + + internal void HandleFragment(NetworkReader reader, int channelId) + { + if (channelId < 0 || channelId >= m_Channels.Length) + { + return; + } + + var channel = m_Channels[channelId]; + if (channel.HandleFragment(reader)) + { + NetworkReader msgReader = new NetworkReader(channel.fragmentBuffer.AsArraySegment().Array); + msgReader.ReadInt16(); // size + short msgType = msgReader.ReadInt16(); + InvokeHandler(msgType, msgReader, channelId); + } + } + + /// + /// This registers a handler function for a message Id. + /// + /// The message ID to register. + /// The handler function to register. + public void RegisterHandler(short msgType, NetworkMessageDelegate handler) + { + m_MessageHandlers.RegisterHandler(msgType, handler); + } + + /// + /// This removes the handler registered for a message Id. + /// + /// The message ID to unregister. + public void UnregisterHandler(short msgType) + { + m_MessageHandlers.UnregisterHandler(msgType); + } + + internal void SetPlayerController(PlayerController player) + { + while (player.playerControllerId >= m_PlayerControllers.Count) + { + m_PlayerControllers.Add(new PlayerController()); + } + + m_PlayerControllers[player.playerControllerId] = player; + } + + internal void RemovePlayerController(short playerControllerId) + { + int count = m_PlayerControllers.Count; + while (count >= 0) + { + if (playerControllerId == count && playerControllerId == m_PlayerControllers[count].playerControllerId) + { + m_PlayerControllers[count] = new PlayerController(); + return; + } + count -= 1; + } + if (LogFilter.logError) { Debug.LogError("RemovePlayer player at playerControllerId " + playerControllerId + " not found"); } + } + + // Get player controller from connection's list + internal bool GetPlayerController(short playerControllerId, out PlayerController playerController) + { + playerController = null; + if (playerControllers.Count > 0) + { + for (int i = 0; i < playerControllers.Count; i++) + { + if (playerControllers[i].IsValid && playerControllers[i].playerControllerId == playerControllerId) + { + playerController = playerControllers[i]; + return true; + } + } + return false; + } + return false; + } + + /// + /// This causes the channels of the network connection to flush their data to the transport layer. + /// This is called automatically by connections used by NetworkServer and NetworkClient, but can be called manually for connections used in other contexts. + /// + public void FlushChannels() + { + if (m_Channels == null) + { + return; + } + for (int channelId = 0; channelId < m_Channels.Length; channelId++) + { + m_Channels[channelId].CheckInternalBuffer(); + } + } + + /// + /// The maximum time in seconds that messages are buffered before being sent. + /// If this is set to zero, then there will be no buffering of messages before they are sent to the transport layer. This may reduce latency but can lead to packet queue overflow issues if many small packets are being sent. + /// + /// Time in seconds. + public void SetMaxDelay(float seconds) + { + if (m_Channels == null) + { + return; + } + for (int channelId = 0; channelId < m_Channels.Length; channelId++) + { + m_Channels[channelId].maxDelay = seconds; + } + } + + /// + /// This sends a network message with a message ID on the connection. This message is sent on channel zero, which by default is the reliable channel. + /// + /// The ID of the message to send. + /// The message to send. + /// True if the message was sent. + public virtual bool Send(short msgType, MessageBase msg) + { + return SendByChannel(msgType, msg, Channels.DefaultReliable); + } + + /// + /// This sends a network message with a message ID on the connection. This message is sent on channel one, which by default is the unreliable channel. + /// + /// The message ID to send. + /// The message to send. + /// True if the message was sent. + public virtual bool SendUnreliable(short msgType, MessageBase msg) + { + return SendByChannel(msgType, msg, Channels.DefaultUnreliable); + } + + /// + /// This sends a network message on the connection using a specific transport layer channel. + /// + /// The message ID to send. + /// The message to send. + /// The transport layer channel to send on. + /// True if the message was sent. + public virtual bool SendByChannel(short msgType, MessageBase msg, int channelId) + { + m_Writer.StartMessage(msgType); + msg.Serialize(m_Writer); + m_Writer.FinishMessage(); + return SendWriter(m_Writer, channelId); + } + + /// + /// This sends an array of bytes on the connection. + /// + /// The array of data to be sent. + /// The number of bytes in the array to be sent. + /// The transport channel to send on. + /// Success if data was sent. + public virtual bool SendBytes(byte[] bytes, int numBytes, int channelId) + { + if (logNetworkMessages) + { + LogSend(bytes); + } + return CheckChannel(channelId) && m_Channels[channelId].SendBytes(bytes, numBytes); + } + + /// + /// This sends the contents of a NetworkWriter object on the connection. + /// The example below constructs a writer and sends it on a connection. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// public bool Send(short msgType, MessageBase msg, NetworkConnection conn) + /// { + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(msgType); + /// msg.Serialize(writer); + /// writer.FinishMessage(); + /// return conn.SendWriter(writer, Channels.DefaultReliable); + /// } + /// } + /// + /// + /// A writer object containing data to send. + /// The transport channel to send on. + /// True if the data was sent. + public virtual bool SendWriter(NetworkWriter writer, int channelId) + { + if (logNetworkMessages) + { + LogSend(writer.ToArray()); + } + return CheckChannel(channelId) && m_Channels[channelId].SendWriter(writer); + } + + void LogSend(byte[] bytes) + { + NetworkReader reader = new NetworkReader(bytes); + var msgSize = reader.ReadUInt16(); + var msgId = reader.ReadUInt16(); + + const int k_PayloadStartPosition = 4; + + StringBuilder msg = new StringBuilder(); + for (int i = k_PayloadStartPosition; i < k_PayloadStartPosition + msgSize; i++) + { + msg.AppendFormat("{0:X2}", bytes[i]); + if (i > k_MaxMessageLogSize) break; + } + Debug.Log("ConnectionSend con:" + connectionId + " bytes:" + msgSize + " msgId:" + msgId + " " + msg); + } + + bool CheckChannel(int channelId) + { + if (m_Channels == null) + { + if (LogFilter.logWarn) { Debug.LogWarning("Channels not initialized sending on id '" + channelId); } + return false; + } + if (channelId < 0 || channelId >= m_Channels.Length) + { + if (LogFilter.logError) { Debug.LogError("Invalid channel when sending buffered data, '" + channelId + "'. Current channel count is " + m_Channels.Length); } + return false; + } + return true; + } + + /// + /// Resets the statistics that are returned from NetworkClient.GetConnectionStats(). + /// + public void ResetStats() + { +#if UNITY_EDITOR + for (short i = 0; i < s_MaxPacketStats; i++) + { + if (m_PacketStats.ContainsKey(i)) + { + var value = m_PacketStats[i]; + value.count = 0; + value.bytes = 0; + NetworkManager.activeTransport.SetPacketStat(0, i, 0, 0); + NetworkManager.activeTransport.SetPacketStat(1, i, 0, 0); + } + } +#endif + } + + /// + /// This makes the connection process the data contained in the buffer, and call handler functions. + /// The data is assumed to have come from the network, and contains network messages. + /// This function is used by network connections when they receive data. + /// + /// Data to process. + /// Size of the data to process. + /// Channel the data was recieved on. + protected void HandleBytes( + byte[] buffer, + int receivedSize, + int channelId) + { + // build the stream form the buffer passed in + NetworkReader reader = new NetworkReader(buffer); + + HandleReader(reader, receivedSize, channelId); + } + + /// + /// This makes the connection process the data contained in the stream, and call handler functions. + /// The data in the stream is assumed to have come from the network, and contains network messages. + /// This function is used by network connections when they receive data. + /// + /// Stream that contains data. + /// Size of the data. + /// Channel the data was received on. + protected void HandleReader( + NetworkReader reader, + int receivedSize, + int channelId) + { + // read until size is reached. + // NOTE: stream.Capacity is 1300, NOT the size of the available data + while (reader.Position < receivedSize) + { + // the reader passed to user code has a copy of bytes from the real stream. user code never touches the real stream. + // this ensures it can never get out of sync if user code reads less or more than the real amount. + ushort sz = reader.ReadUInt16(); + short msgType = reader.ReadInt16(); + + // create a reader just for this message + //TODO: Allocation!! + byte[] msgBuffer = reader.ReadBytes(sz); + NetworkReader msgReader = new NetworkReader(msgBuffer); + + if (logNetworkMessages) + { + StringBuilder msg = new StringBuilder(); + for (int i = 0; i < sz; i++) + { + msg.AppendFormat("{0:X2}", msgBuffer[i]); + if (i > k_MaxMessageLogSize) break; + } + Debug.Log("ConnectionRecv con:" + connectionId + " bytes:" + sz + " msgId:" + msgType + " " + msg); + } + + NetworkMessageDelegate msgDelegate = null; + if (m_MessageHandlersDict.ContainsKey(msgType)) + { + msgDelegate = m_MessageHandlersDict[msgType]; + } + if (msgDelegate != null) + { + m_NetMsg.msgType = msgType; + m_NetMsg.reader = msgReader; + m_NetMsg.conn = this; + m_NetMsg.channelId = channelId; + msgDelegate(m_NetMsg); + lastMessageTime = Time.time; + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.HLAPIMsg); + + if (msgType > MsgType.Highest) + { + Profiler.IncrementStatIncoming(MsgType.UserMessage, msgType + ":" + msgType.GetType().Name); + } +#endif + +#if UNITY_EDITOR + if (m_PacketStats.ContainsKey(msgType)) + { + PacketStat stat = m_PacketStats[msgType]; + stat.count += 1; + stat.bytes += sz; + } + else + { + PacketStat stat = new PacketStat(); + stat.msgType = msgType; + stat.count += 1; + stat.bytes += sz; + m_PacketStats[msgType] = stat; + } +#endif + } + else + { + //NOTE: this throws away the rest of the buffer. Need moar error codes + if (LogFilter.logError) { Debug.LogError("Unknown message ID " + msgType + " connId:" + connectionId); } + break; + } + } + } + + /// + /// Get statistics for outgoing traffic. + /// + /// Number of messages sent. + /// Number of messages currently buffered for sending. + /// Number of bytes sent. + /// How many messages were buffered in the last second. + public virtual void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) + { + numMsgs = 0; + numBufferedMsgs = 0; + numBytes = 0; + lastBufferedPerSecond = 0; + + for (int channelId = 0; channelId < m_Channels.Length; channelId++) + { + var channel = m_Channels[channelId]; + numMsgs += channel.numMsgsOut; + numBufferedMsgs += channel.numBufferedMsgsOut; + numBytes += channel.numBytesOut; + lastBufferedPerSecond += channel.lastBufferedPerSecond; + } + } + + /// + /// Get statistics for incoming traffic. + /// + /// Number of messages received. + /// Number of bytes received. + public virtual void GetStatsIn(out int numMsgs, out int numBytes) + { + numMsgs = 0; + numBytes = 0; + + for (int channelId = 0; channelId < m_Channels.Length; channelId++) + { + var channel = m_Channels[channelId]; + numMsgs += channel.numMsgsIn; + numBytes += channel.numBytesIn; + } + } + + /// + /// Returns a string representation of the NetworkConnection object state. + /// + /// + public override string ToString() + { + return string.Format("hostId: {0} connectionId: {1} isReady: {2} channel count: {3}", hostId, connectionId, isReady, (m_Channels != null ? m_Channels.Length : 0)); + } + + internal void AddToVisList(NetworkIdentity uv) + { + m_VisList.Add(uv); + + // spawn uv for this conn + NetworkServer.ShowForConnection(uv, this); + } + + internal void RemoveFromVisList(NetworkIdentity uv, bool isDestroyed) + { + m_VisList.Remove(uv); + + if (!isDestroyed) + { + // hide uv for this conn + NetworkServer.HideForConnection(uv, this); + } + } + + internal void RemoveObservers() + { + foreach (var uv in m_VisList) + { + uv.RemoveObserverInternal(this); + } + m_VisList.Clear(); + } + + /// + /// This virtual function allows custom network connection classes to process data from the network before it is passed to the application. + /// The default implementation of this function calls HandleBytes() on the received data. Custom implmentations can also use HandleBytes(), but can pass modified versions of the data received or other data. + /// This example logs the data received to the console, then passes it to HandleBytes. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using System; + /// using System.Text; + /// public class DebugConnection : NetworkConnection + /// { + /// public override void TransportReceive(byte[] bytes, int numBytes, int channelId) + /// { + /// StringBuilder msg = new StringBuilder(); + /// for (int i = 0; i < numBytes; i++) { + /// { + /// var s = String.Format("{0:X2}", bytes[i]); + /// msg.Append(s); + /// if (i > 50) break; + /// } + /// UnityEngine.Debug.LogError("TransportReceive h:" + hostId + " con:" + connectionId + " bytes:" + numBytes + " " + msg); + /// HandleBytes(bytes, numBytes, channelId); + /// } + /// } + /// + /// Other uses for this function could be data compression or data encryption. + /// Custom network connection classes are used by setting NetworkServer.NetworkConnectionClass and NetworkClient.NetworkConnectionClass. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class SpaceManager : NetworkManager + /// { + /// void Start() + /// { + /// NetworkServer.networkConnectionClass = typeof(DebugConnection); + /// NetworkClient.networkConnectionClass = typeof(DebugConnection); + /// } + /// } + /// + /// + /// The data recieved. + /// The size of the data recieved. + /// The channel that the data was received on. + public virtual void TransportReceive(byte[] bytes, int numBytes, int channelId) + { + HandleBytes(bytes, numBytes, channelId); + } + + [Obsolete("TransportRecieve has been deprecated. Use TransportReceive instead.", false)] + public virtual void TransportRecieve(byte[] bytes, int numBytes, int channelId) + { + TransportReceive(bytes, numBytes, channelId); + } + + /// + /// This virtual function allows custom network connection classes to process data send by the application before it goes to the network transport layer. + /// The default implementation of this function calls NetworkTransport.Send() with the supplied data, but custom implementations can pass modified versions of the data. This example logs the sent data to the console: + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using System; + /// using System.Text; + /// + /// class DebugConnection : NetworkConnection + /// { + /// public override bool TransportSend(byte[] bytes, int numBytes, int channelId, out byte error) + /// { + /// StringBuilder msg = new StringBuilder(); + /// for (int i = 0; i < numBytes; i++) + /// { + /// var s = String.Format("{0:X2}", bytes[i]); + /// msg.Append(s); + /// if (i > 50) break; + /// } + /// UnityEngine.Debug.LogError("TransportSend h:" + hostId + " con:" + connectionId + " bytes:" + numBytes + " " + msg); + /// return NetworkTransport.Send(hostId, connectionId, channelId, bytes, numBytes, out error); + /// } + /// } + /// + /// Other uses for this function could be data compression or data encryption. + /// Custom network connection classes are used by setting NetworkServer.NetworkConnectionClass and NetworkClient.NetworkConnectionClass. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class SpaceManager : NetworkManager + /// { + /// void Start() + /// { + /// NetworkServer.networkConnectionClass = typeof(DebugConnection); + /// NetworkClient.networkConnectionClass = typeof(DebugConnection); + /// } + /// } + /// + /// + /// Data to send. + /// Size of data to send. + /// Channel to send data on. + /// Error code for send. + /// True if data was sent. + public virtual bool TransportSend(byte[] bytes, int numBytes, int channelId, out byte error) + { + return NetworkManager.activeTransport.Send(hostId, connectionId, channelId, bytes, numBytes, out error); + } + + internal void AddOwnedObject(NetworkIdentity obj) + { + if (m_ClientOwnedObjects == null) + { + m_ClientOwnedObjects = new HashSet(); + } + m_ClientOwnedObjects.Add(obj.netId); + } + + internal void RemoveOwnedObject(NetworkIdentity obj) + { + if (m_ClientOwnedObjects == null) + { + return; + } + m_ClientOwnedObjects.Remove(obj.netId); + } + + internal static void OnFragment(NetworkMessage netMsg) + { + netMsg.conn.HandleFragment(netMsg.reader, netMsg.channelId); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkConnection.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkConnection.cs.meta new file mode 100644 index 00000000..8cec5e70 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkConnection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 86c99182e8e2c4648ad5061425003932 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkDiscovery.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkDiscovery.cs new file mode 100644 index 00000000..75970a90 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkDiscovery.cs @@ -0,0 +1,541 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEngine.Networking +{ + /// + /// A structure that contains data from a NetworkDiscovery server broadcast. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public struct NetworkBroadcastResult + { + /// + /// The IP address of the server that broadcasts this data. + /// + public string serverAddress; + /// + /// The data broadcast by the server. + /// + public byte[] broadcastData; + } + + /// + /// The NetworkDiscovery component allows Unity games to find each other on a local network. It can broadcast presence and listen for broadcasts, and optionally join matching games using the NetworkManager. + /// This component can run in server mode (by calling StartAsServer) where it broadcasts to other computers on the local network, or in client mode (by calling StartAsClient) where it listens for broadcasts from a server. This class should be override to receive calls from OnReceivedBroadcast. + /// Note : Do not use void Update() in a class that inherits from NetworkDiscovery. If needed, you must override it and call base.Update() instead. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using System.Collections; + /// + /// public class OverriddenNetworkDiscovery : NetworkDiscovery + /// { + /// public override void OnReceivedBroadcast(string fromAddress, string data) + /// { + /// NetworkManager.singleton.networkAddress = fromAddress; + /// NetworkManager.singleton.StartClient(); + /// } + /// } + /// + /// + [DisallowMultipleComponent] + [AddComponentMenu("Network/NetworkDiscovery")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkDiscovery : MonoBehaviour + { + const int k_MaxBroadcastMsgSize = 1024; + + // config data + [SerializeField] + int m_BroadcastPort = 47777; + + [SerializeField] + int m_BroadcastKey = 2222; + + [SerializeField] + int m_BroadcastVersion = 1; + + [SerializeField] + int m_BroadcastSubVersion = 1; + + [SerializeField] + int m_BroadcastInterval = 1000; + + [SerializeField] + bool m_UseNetworkManager = false; + + [SerializeField] + string m_BroadcastData = "HELLO"; + + [SerializeField] + bool m_ShowGUI = true; + + [SerializeField] + int m_OffsetX; + + [SerializeField] + int m_OffsetY; + + // runtime data + int m_HostId = -1; + bool m_Running; + + bool m_IsServer; + bool m_IsClient; + + byte[] m_MsgOutBuffer; + byte[] m_MsgInBuffer; + HostTopology m_DefaultTopology; + Dictionary m_BroadcastsReceived; + + /// + /// The network port to broadcast on and listen to. + /// + public int broadcastPort + { + get { return m_BroadcastPort; } + set { m_BroadcastPort = value; } + } + + /// + /// A key to identify this application in broadcasts. + /// + public int broadcastKey + { + get { return m_BroadcastKey; } + set { m_BroadcastKey = value; } + } + + /// + /// The version of the application to broadcast. This is used to match versions of the same application. + /// + public int broadcastVersion + { + get { return m_BroadcastVersion; } + set { m_BroadcastVersion = value; } + } + + /// + /// The sub-version of the application to broadcast. This is used to match versions of the same application. + /// + public int broadcastSubVersion + { + get { return m_BroadcastSubVersion; } + set { m_BroadcastSubVersion = value; } + } + + /// + /// How often in milliseconds to broadcast when running as a server. + /// + public int broadcastInterval + { + get { return m_BroadcastInterval; } + set { m_BroadcastInterval = value; } + } + + /// + /// True to integrate with the NetworkManager. + /// When running as a server, this will include the NetworkManager's address in broadcast messages. When running as a client, this will be able to join matching games found by using the NetworkManager. + /// + public bool useNetworkManager + { + get { return m_UseNetworkManager; } + set { m_UseNetworkManager = value; } + } + + /// + /// The data to include in the broadcast message when running as a server. + /// If using NetworkManager integration, this will be overriden with the NetworkManager's address. + /// + public string broadcastData + { + get { return m_BroadcastData; } + set + { + m_BroadcastData = value; + m_MsgOutBuffer = StringToBytes(m_BroadcastData); + if (m_UseNetworkManager) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkDiscovery broadcast data changed while using NetworkManager. This can prevent clients from finding the server. The format of the broadcast data must be 'NetworkManager:IPAddress:Port'."); } + } + } + } + + /// + /// True to draw the default Broacast control UI. + /// + public bool showGUI + { + get { return m_ShowGUI; } + set { m_ShowGUI = value; } + } + + /// + /// The horizontal offset of the GUI if active. + /// + public int offsetX + { + get { return m_OffsetX; } + set { m_OffsetX = value; } + } + + /// + /// The vertical offset of the GUI if active. + /// + public int offsetY + { + get { return m_OffsetY; } + set { m_OffsetY = value; } + } + + /// + /// The TransportLayer hostId being used (read-only). + /// + public int hostId + { + get { return m_HostId; } + set { m_HostId = value; } + } + + /// + /// True is broadcasting or listening (read-only). + /// + public bool running + { + get { return m_Running; } + set { m_Running = value; } + } + + /// + /// True if running in server mode (read-only). + /// + public bool isServer + { + get { return m_IsServer; } + set { m_IsServer = value; } + } + + /// + /// True if running in client mode (read-only). + /// + public bool isClient + { + get { return m_IsClient; } + set { m_IsClient = value; } + } + + /// + /// A dictionary of broadcasts received from servers. + /// The key is the server address, and the value is a NetworkBroadcastResult object that contains the data sent by the server. + /// + public Dictionary broadcastsReceived + { + get { return m_BroadcastsReceived; } + } + + static byte[] StringToBytes(string str) + { + byte[] bytes = new byte[str.Length * sizeof(char)]; + Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length); + return bytes; + } + + static string BytesToString(byte[] bytes) + { + char[] chars = new char[bytes.Length / sizeof(char)]; + Buffer.BlockCopy(bytes, 0, chars, 0, bytes.Length); + return new string(chars); + } + + /// + /// Initializes the NetworkDiscovery component. + /// + /// Return true if the network port was available. + public bool Initialize() + { + if (m_BroadcastData.Length >= k_MaxBroadcastMsgSize) + { + if (LogFilter.logError) { Debug.LogError("NetworkDiscovery Initialize - data too large. max is " + k_MaxBroadcastMsgSize); } + return false; + } + + if (!NetworkManager.activeTransport.IsStarted) + { + NetworkManager.activeTransport.Init(); + } + + if (m_UseNetworkManager && NetworkManager.singleton != null) + { + m_BroadcastData = "NetworkManager:" + NetworkManager.singleton.networkAddress + ":" + NetworkManager.singleton.networkPort; + if (LogFilter.logInfo) { Debug.Log("NetworkDiscovery set broadcast data to:" + m_BroadcastData); } + } + + m_MsgOutBuffer = StringToBytes(m_BroadcastData); + m_MsgInBuffer = new byte[k_MaxBroadcastMsgSize]; + m_BroadcastsReceived = new Dictionary(); + + ConnectionConfig cc = new ConnectionConfig(); + cc.AddChannel(QosType.Unreliable); + m_DefaultTopology = new HostTopology(cc, 1); + + if (m_IsServer) + StartAsServer(); + + if (m_IsClient) + StartAsClient(); + + return true; + } + + /// + /// Starts listening for broadcasts messages. + /// + /// True is able to listen. + // listen for broadcasts + public bool StartAsClient() + { + if (m_HostId != -1 || m_Running) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkDiscovery StartAsClient already started"); } + return false; + } + + if (m_MsgInBuffer == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkDiscovery StartAsClient, NetworkDiscovery is not initialized"); } + return false; + } + + m_HostId = NetworkManager.activeTransport.AddHost(m_DefaultTopology, m_BroadcastPort, null); + if (m_HostId == -1) + { + if (LogFilter.logError) { Debug.LogError("NetworkDiscovery StartAsClient - addHost failed"); } + return false; + } + + NetworkTransport.SetMulticastLock(true); + + byte error; + NetworkManager.activeTransport.SetBroadcastCredentials(m_HostId, m_BroadcastKey, m_BroadcastVersion, m_BroadcastSubVersion, out error); + + m_Running = true; + m_IsClient = true; + if (LogFilter.logDebug) { Debug.Log("StartAsClient Discovery listening"); } + return true; + } + + /// + /// Starts sending broadcast messages. + /// + /// True is able to broadcast. + // perform actual broadcasts + public bool StartAsServer() + { + if (m_HostId != -1 || m_Running) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkDiscovery StartAsServer already started"); } + return false; + } + + m_HostId = NetworkManager.activeTransport.AddHost(m_DefaultTopology, 0, null); + if (m_HostId == -1) + { + if (LogFilter.logError) { Debug.LogError("NetworkDiscovery StartAsServer - addHost failed"); } + return false; + } + + NetworkTransport.SetMulticastLock(true); + + byte err; + if (!NetworkManager.activeTransport.StartBroadcastDiscovery(m_HostId, m_BroadcastPort, m_BroadcastKey, m_BroadcastVersion, m_BroadcastSubVersion, m_MsgOutBuffer, m_MsgOutBuffer.Length, m_BroadcastInterval, out err)) + { + NetworkTransport.RemoveHost(m_HostId); + m_HostId = -1; + if (LogFilter.logError) { Debug.LogError("NetworkDiscovery StartBroadcast failed err: " + err); } + return false; + } + + m_Running = true; + m_IsServer = true; + if (LogFilter.logDebug) { Debug.Log("StartAsServer Discovery broadcasting"); } + DontDestroyOnLoad(gameObject); + return true; + } + + /// + /// Stops listening and broadcasting. + /// + public void StopBroadcast() + { + if (m_HostId == -1) + { + if (LogFilter.logError) { Debug.LogError("NetworkDiscovery StopBroadcast not initialized"); } + return; + } + + if (!m_Running) + { + Debug.LogWarning("NetworkDiscovery StopBroadcast not started"); + return; + } + if (m_IsServer) + { + NetworkManager.activeTransport.StopBroadcastDiscovery(); + } + + NetworkManager.activeTransport.RemoveHost(m_HostId); + NetworkTransport.SetMulticastLock(false); + m_HostId = -1; + m_Running = false; + m_IsServer = false; + m_IsClient = false; + m_MsgInBuffer = null; + m_BroadcastsReceived = null; + if (LogFilter.logDebug) { Debug.Log("Stopped Discovery broadcasting"); } + } + + void Update() + { + if (m_HostId == -1) + return; + + if (m_IsServer) + return; + + NetworkEventType networkEvent; + do + { + int connectionId; + int channelId; + int receivedSize; + byte error; + networkEvent = NetworkManager.activeTransport.ReceiveFromHost(m_HostId, out connectionId, out channelId, m_MsgInBuffer, k_MaxBroadcastMsgSize, out receivedSize, out error); + + if (networkEvent == NetworkEventType.BroadcastEvent) + { + NetworkManager.activeTransport.GetBroadcastConnectionMessage(m_HostId, m_MsgInBuffer, k_MaxBroadcastMsgSize, out receivedSize, out error); + + string senderAddr; + int senderPort; + NetworkManager.activeTransport.GetBroadcastConnectionInfo(m_HostId, out senderAddr, out senderPort, out error); + + var recv = new NetworkBroadcastResult(); + recv.serverAddress = senderAddr; + recv.broadcastData = new byte[receivedSize]; + Buffer.BlockCopy(m_MsgInBuffer, 0, recv.broadcastData, 0, receivedSize); + m_BroadcastsReceived[senderAddr] = recv; + + OnReceivedBroadcast(senderAddr, BytesToString(m_MsgInBuffer)); + } + } + while (networkEvent != NetworkEventType.Nothing); + } + + void OnDestroy() + { + if (m_IsServer && m_Running && m_HostId != -1) + { + NetworkManager.activeTransport.StopBroadcastDiscovery(); + NetworkManager.activeTransport.RemoveHost(m_HostId); + } + + if (m_IsClient && m_Running && m_HostId != -1) + { + NetworkManager.activeTransport.RemoveHost(m_HostId); + } + + if (m_Running) + NetworkTransport.SetMulticastLock(false); + } + + /// + /// This is a virtual function that can be implemented to handle broadcast messages when running as a client. + /// + /// The IP address of the server. + /// The data broadcast by the server. + public virtual void OnReceivedBroadcast(string fromAddress, string data) + { + //Debug.Log("Got broadcast from [" + fromAddress + "] " + data); + } + + void OnGUI() + { + if (!m_ShowGUI) + return; + + int xpos = 10 + m_OffsetX; + int ypos = 40 + m_OffsetY; + const int spacing = 24; + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + GUI.Box(new Rect(xpos, ypos, 200, 20), "( WebGL cannot broadcast )"); + return; + } + + if (m_MsgInBuffer == null) + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Initialize Broadcast")) + { + Initialize(); + } + return; + } + string suffix = ""; + if (m_IsServer) + suffix = " (server)"; + if (m_IsClient) + suffix = " (client)"; + + GUI.Label(new Rect(xpos, ypos, 200, 20), "initialized" + suffix); + ypos += spacing; + + if (m_Running) + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Stop")) + { + StopBroadcast(); + } + ypos += spacing; + + if (m_BroadcastsReceived != null) + { + foreach (var addr in m_BroadcastsReceived.Keys) + { + var value = m_BroadcastsReceived[addr]; + if (GUI.Button(new Rect(xpos, ypos + 20, 200, 20), "Game at " + addr) && m_UseNetworkManager) + { + string dataString = BytesToString(value.broadcastData); + var items = dataString.Split(':'); + if (items.Length == 3 && items[0] == "NetworkManager") + { + if (NetworkManager.singleton != null && NetworkManager.singleton.client == null) + { + NetworkManager.singleton.networkAddress = items[1]; + NetworkManager.singleton.networkPort = Convert.ToInt32(items[2]); + NetworkManager.singleton.StartClient(); + } + } + } + ypos += spacing; + } + } + } + else + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Start Broadcasting")) + { + StartAsServer(); + } + ypos += spacing; + + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Listen for Broadcast")) + { + StartAsClient(); + } + ypos += spacing; + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkDiscovery.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkDiscovery.cs.meta new file mode 100644 index 00000000..a74cafe3 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkDiscovery.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7bb4737dc5d484e948281d0890233d14 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkHash128.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkHash128.cs new file mode 100644 index 00000000..bc6cf2e4 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkHash128.cs @@ -0,0 +1,140 @@ +using System; + +namespace UnityEngine.Networking +{ + /// + /// A 128 bit number used to represent assets in a networking context. + /// + // unrolled for your pleasure. + [Serializable] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public struct NetworkHash128 + { + // struct cannot have embedded arrays.. + public byte i0; + public byte i1; + public byte i2; + public byte i3; + public byte i4; + public byte i5; + public byte i6; + public byte i7; + public byte i8; + public byte i9; + public byte i10; + public byte i11; + public byte i12; + public byte i13; + public byte i14; + public byte i15; + + /// + /// Resets the value of a NetworkHash to zero (invalid). + /// + public void Reset() + { + i0 = 0; + i1 = 0; + i2 = 0; + i3 = 0; + i4 = 0; + i5 = 0; + i6 = 0; + i7 = 0; + i8 = 0; + i9 = 0; + i10 = 0; + i11 = 0; + i12 = 0; + i13 = 0; + i14 = 0; + i15 = 0; + } + + /// + /// A valid NetworkHash has a non-zero value. + /// + /// True if the value is non-zero. + public bool IsValid() + { + return (i0 | i1 | i2 | i3 | i4 | i5 | i6 | i7 | i8 | i9 | i10 | i11 | i12 | i13 | i14 | i15) != 0; + } + + static int HexToNumber(char c) + { + if (c >= '0' && c <= '9') + return c - '0'; + if (c >= 'a' && c <= 'f') + return c - 'a' + 10; + if (c >= 'A' && c <= 'F') + return c - 'A' + 10; + return 0; + } + + /// + /// This parses the string representation of a NetworkHash into a binary object. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// class HashTest : MonoBehaviour + /// { + /// const string assetString = "0176acd452adc180"; + /// NetworkHash128 assetId = NetworkHash128.Parse(assetString); + /// + /// void Start() + /// { + /// Debug.Log("asset:" + assetId); + /// } + /// } + /// + /// + /// A hex string to parse. + /// A 128 bit network hash object. + public static NetworkHash128 Parse(string text) + { + NetworkHash128 hash; + + // add leading zeros if required + int l = text.Length; + if (l < 32) + { + string tmp = ""; + for (int i = 0; i < 32 - l; i++) + { + tmp += "0"; + } + text = (tmp + text); + } + + hash.i0 = (byte)(HexToNumber(text[0]) * 16 + HexToNumber(text[1])); + hash.i1 = (byte)(HexToNumber(text[2]) * 16 + HexToNumber(text[3])); + hash.i2 = (byte)(HexToNumber(text[4]) * 16 + HexToNumber(text[5])); + hash.i3 = (byte)(HexToNumber(text[6]) * 16 + HexToNumber(text[7])); + hash.i4 = (byte)(HexToNumber(text[8]) * 16 + HexToNumber(text[9])); + hash.i5 = (byte)(HexToNumber(text[10]) * 16 + HexToNumber(text[11])); + hash.i6 = (byte)(HexToNumber(text[12]) * 16 + HexToNumber(text[13])); + hash.i7 = (byte)(HexToNumber(text[14]) * 16 + HexToNumber(text[15])); + hash.i8 = (byte)(HexToNumber(text[16]) * 16 + HexToNumber(text[17])); + hash.i9 = (byte)(HexToNumber(text[18]) * 16 + HexToNumber(text[19])); + hash.i10 = (byte)(HexToNumber(text[20]) * 16 + HexToNumber(text[21])); + hash.i11 = (byte)(HexToNumber(text[22]) * 16 + HexToNumber(text[23])); + hash.i12 = (byte)(HexToNumber(text[24]) * 16 + HexToNumber(text[25])); + hash.i13 = (byte)(HexToNumber(text[26]) * 16 + HexToNumber(text[27])); + hash.i14 = (byte)(HexToNumber(text[28]) * 16 + HexToNumber(text[29])); + hash.i15 = (byte)(HexToNumber(text[30]) * 16 + HexToNumber(text[31])); + + return hash; + } + + /// + /// Returns a string representation of a NetworkHash object. + /// + /// A hex asset string. + public override string ToString() + { + return String.Format("{0:x2}{1:x2}{2:x2}{3:x2}{4:x2}{5:x2}{6:x2}{7:x2}{8:x2}{9:x2}{10:x2}{11:x2}{12:x2}{13:x2}{14:x2}{15:x2}", + i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkHash128.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkHash128.cs.meta new file mode 100644 index 00000000..d170ed7a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkHash128.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 07fa21e19bb4e442c9ef0c62ac4c31fc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkIdentity.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkIdentity.cs new file mode 100644 index 00000000..0bd6ec00 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkIdentity.cs @@ -0,0 +1,1253 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using UnityEngine.Networking.NetworkSystem; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace UnityEngine.Networking +{ + /// + /// The NetworkIdentity identifies objects across the network, between server and clients. Its primary data is a NetworkInstanceId which is allocated by the server and then set on clients. This is used in network communications to be able to lookup game objects on different machines. + /// The NetworkIdentity is used to synchronize information in the object with the network. Only the server should create instances of objects which have NetworkIdentity as otherwise they will not be properly connected to the system. + /// For complex objects with a hierarchy of subcomponents, the NetworkIdentity must be on the root of the hierarchy. It is not supported to have multiple NetworkIdentity components on subcomponents of a hierarchy. + /// NetworkBehaviour scripts require a NetworkIdentity on the game object to be able to function. + /// The NetworkIdentity manages the dirty state of the NetworkBehaviours of the object. When it discovers that NetworkBehaviours are dirty, it causes an update packet to be created and sent to clients. + /// The flow for serialization updates managed by the NetworkIdentity is: + /// * Each NetworkBehaviour has a dirty mask. This mask is available inside OnSerialize as syncVarDirtyBits + /// * Each SyncVar in a NetworkBehaviour script is assigned a bit in the dirty mask. + /// * Changing the value of SyncVars causes the bit for that SyncVar to be set in the dirty mask + /// * Alternatively, calling SetDirtyBit() writes directly to the dirty mask + /// * NetworkIdentity objects are checked on the server as part of it's update loop + /// * If any NetworkBehaviours on a NetworkIdentity are dirty, then an UpdateVars packet is created for that object + /// * The UpdateVars packet is populated by calling OnSerialize on each NetworkBehaviour on the object + /// * NetworkBehaviours that are NOT dirty write a zero to the packet for their dirty bits + /// * NetworkBehaviours that are dirty write their dirty mask, then the values for the SyncVars that have changed + /// * If OnSerialize returns true for a NetworkBehaviour, the dirty mask is reset for that NetworkBehaviour, so it will not send again until its value changes. + /// * The UpdateVars packet is sent to ready clients that are observing the object + /// On the client: + /// * an UpdateVars packet is received for an object + /// * The OnDeserialize function is called for each NetworkBehaviour script on the object + /// * Each NetworkBehaviour script on the object reads a dirty mask. + /// * If the dirty mask for a NetworkBehaviour is zero, the OnDeserialize functions returns without reading any more + /// * If the dirty mask is non-zero value, then the OnDeserialize function reads the values for the SyncVars that correspond to the dirty bits that are set + /// * If there are SyncVar hook functions, those are invoked with the value read from the stream. + /// + [ExecuteInEditMode] + [DisallowMultipleComponent] + [AddComponentMenu("Network/NetworkIdentity")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public sealed class NetworkIdentity : MonoBehaviour + { + // configuration + [SerializeField] NetworkSceneId m_SceneId; + [SerializeField] NetworkHash128 m_AssetId; + [SerializeField] bool m_ServerOnly; + [SerializeField] bool m_LocalPlayerAuthority; + + // runtime data + bool m_IsClient; + bool m_IsServer; + bool m_HasAuthority; + + NetworkInstanceId m_NetId; + bool m_IsLocalPlayer; + NetworkConnection m_ConnectionToServer; + NetworkConnection m_ConnectionToClient; + short m_PlayerId = -1; + NetworkBehaviour[] m_NetworkBehaviours; + + // there is a list AND a hashSet of connections, for fast verification of dupes, but the main operation is iteration over the list. + HashSet m_ObserverConnections; + List m_Observers; + NetworkConnection m_ClientAuthorityOwner; + + // member used to mark a identity for future reset + // check MarkForReset for more information. + bool m_Reset = false; + // properties + /// + /// Returns true if running as a client and this object was spawned by a server. + /// + public bool isClient { get { return m_IsClient; } } + + /// + /// Returns true if running as a server, which spawned the object. + /// + public bool isServer + { + get + { + // if server has stopped, should not still return true here + return m_IsServer && NetworkServer.active; + } + } + + /// + /// This returns true if this object is the authoritative version of the object in the distributed network application. + /// This value is determined at runtime, as opposed to localPlayerAuthority which is set on the prefab. For most objects, authority is held by the server / host. For objects with localPlayerAuthority set, authority is held by the client of that player. + /// For objects that had their authority set by AssignClientAuthority on the server, this will be true on the client that owns the object. NOT on other clients. + /// + public bool hasAuthority { get { return m_HasAuthority; } } + + /// + /// Unique identifier for this particular object instance, used for tracking objects between networked clients and the server. + /// This is a unique identifier for this particular GameObject instance. Use it to track GameObjects between networked clients and the server. + /// + /// //For this example to work, attach a NetworkIdentity component to your GameObject. + /// //Then, create a new empty GameObject and drag it under your NetworkIdentity GameObject in the Hierarchy. This makes it the child of the GameObject. //Next, attach a TextMesh component to the child GameObject. You can then place this TextMesh GameObject to be above your GameObject in the Scene. + /// //Attach this script to the parent GameObject, and it changes the text of the TextMesh to the identity of your GameObject. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class NetworkIdentityNetID : MonoBehaviour + /// { + /// NetworkIdentity m_Identity; + /// //This is a TextMesh component that you attach to the child of the NetworkIdentity GameObject + /// TextMesh m_TextMesh; + /// + /// void Start() + /// { + /// //Fetch the NetworkIdentity component of the GameObject + /// m_Identity = GetComponent<NetworkIdentity>(); + /// //Enter the child of your GameObject (the GameObject with the TextMesh you attach) + /// //Fetch the TextMesh component of it + /// m_TextMesh = GetComponentInChildren(typeof(TextMesh)) as TextMesh; + /// //Change the Text of the TextMesh to show the netId + /// m_TextMesh.text = "ID : " + m_Identity.netId; + /// } + /// } + /// + /// + public NetworkInstanceId netId { get { return m_NetId; } } + /// + /// A unique identifier for NetworkIdentity objects within a scene. + /// This is used for spawning scene objects on clients. + /// + public NetworkSceneId sceneId { get { return m_SceneId; } } + /// + /// Flag to make this object only exist when the game is running as a server (or host). + /// + public bool serverOnly { get { return m_ServerOnly; } set { m_ServerOnly = value; } } + /// + /// localPlayerAuthority means that the client of the "owning" player has authority over their own player object. + /// Authority for this object will be on the player's client. So hasAuthority will be true on that client - and false on the server and on other clients. + /// + public bool localPlayerAuthority { get { return m_LocalPlayerAuthority; } set { m_LocalPlayerAuthority = value; } } + /// + /// The client that has authority for this object. This will be null if no client has authority. + /// This is set for player objects with localPlayerAuthority, and for objects set with AssignClientAuthority, and spawned with SpawnWithClientAuthority. + /// + public NetworkConnection clientAuthorityOwner { get { return m_ClientAuthorityOwner; }} + + /// + /// Unique identifier used to find the source assets when server spawns the on clients. + /// + public NetworkHash128 assetId + { + get + { +#if UNITY_EDITOR + // This is important because sometimes OnValidate does not run (like when adding view to prefab with no child links) + if (!m_AssetId.IsValid()) + SetupIDs(); +#endif + return m_AssetId; + } + } + internal void SetDynamicAssetId(NetworkHash128 newAssetId) + { + if (!m_AssetId.IsValid() || m_AssetId.Equals(newAssetId)) + { + m_AssetId = newAssetId; + } + else + { + if (LogFilter.logWarn) { Debug.LogWarning("SetDynamicAssetId object already has an assetId <" + m_AssetId + ">"); } + } + } + + // used when adding players + internal void SetClientOwner(NetworkConnection conn) + { + if (m_ClientAuthorityOwner != null) + { + if (LogFilter.logError) { Debug.LogError("SetClientOwner m_ClientAuthorityOwner already set!"); } + } + m_ClientAuthorityOwner = conn; + m_ClientAuthorityOwner.AddOwnedObject(this); + } + + // used during dispose after disconnect + internal void ClearClientOwner() + { + m_ClientAuthorityOwner = null; + } + + internal void ForceAuthority(bool authority) + { + if (m_HasAuthority == authority) + { + return; + } + + m_HasAuthority = authority; + if (authority) + { + OnStartAuthority(); + } + else + { + OnStopAuthority(); + } + } + + /// + /// This returns true if this object is the one that represents the player on the local machine. + /// This is set when the server has spawned an object for this particular client. + /// + public bool isLocalPlayer { get { return m_IsLocalPlayer; } } + /// + /// The id of the player associated with this GameObject. + /// This is only valid if this GameObject is for a local player. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public short playerControllerId { get { return m_PlayerId; } } + /// + /// The UConnection associated with this NetworkIdentity. This is only valid for player objects on a local client. + /// + public NetworkConnection connectionToServer { get { return m_ConnectionToServer; } } + /// + /// The connection associated with this NetworkIdentity. This is only valid for player objects on the server. + /// Use it to return details such as the connection's identity, IP address and ready status. + /// + /// //For this example to work, attach a NetworkIdentity component to your GameObject. + /// //Make sure your Scene has a NetworkManager and NetworkManagerHUD + /// //Attach this script to the GameObject, and it outputs the connection of your GameObject to the console. + /// + /// using System.Collections; + /// using System.Collections.Generic; + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class NetworkIdentityNetID : MonoBehaviour + /// { + /// NetworkIdentity m_Identity; + /// //This is a TextMesh component that you attach to the child of the NetworkIdentity GameObject + /// + /// void Start() + /// { + /// //Fetch the NetworkIdentity component of the GameObject + /// m_Identity = GetComponent<NetworkIdentity>(); + /// //Output to the console the connection associated with this NetworkIdentity + /// Debug.Log("Connection : " + m_Identity.connectionToClient); + /// } + /// } + /// + /// + public NetworkConnection connectionToClient { get { return m_ConnectionToClient; } } + + /// + /// The set of network connections (players) that can see this object. + /// + public ReadOnlyCollection observers + { + get + { + if (m_Observers == null) + return null; + + return new ReadOnlyCollection(m_Observers); + } + } + + static uint s_NextNetworkId = 1; + static internal NetworkInstanceId GetNextNetworkId() + { + uint newId = s_NextNetworkId; + s_NextNetworkId += 1; + return new NetworkInstanceId(newId); + } + + static NetworkWriter s_UpdateWriter = new NetworkWriter(); + + void CacheBehaviours() + { + if (m_NetworkBehaviours == null) + { + m_NetworkBehaviours = GetComponents(); + } + } + + /// + /// The delegate type for the clientAuthorityCallback. + /// + /// The network connection that is gaining or losing authority. + /// The object whose client authority status is being changed. + /// The new state of client authority of the object for the connection. + public delegate void ClientAuthorityCallback(NetworkConnection conn, NetworkIdentity uv, bool authorityState); + /// + /// A callback that can be populated to be notified when the client-authority state of objects changes. + /// Whenever an object is spawned using SpawnWithClientAuthority, or the client authority status of an object is changed with AssignClientAuthority or RemoveClientAuthority, then this callback will be invoked. + /// This callback is used by the NetworkMigrationManager to distribute client authority state to peers for host migration. If the NetworkMigrationManager is not being used, this callback does not need to be populated. + /// + public static ClientAuthorityCallback clientAuthorityCallback; + + static internal void AddNetworkId(uint id) + { + if (id >= s_NextNetworkId) + { + s_NextNetworkId = (uint)(id + 1); + } + } + + // only used during spawning on clients to set the identity. + internal void SetNetworkInstanceId(NetworkInstanceId newNetId) + { + m_NetId = newNetId; + if (newNetId.Value == 0) + { + m_IsServer = false; + } + } + + /// + /// Force the scene ID to a specific value. + /// This can be used to fix an invalid scene ID. If you process all the NetworkIdentity components in a scene you can assign them new values starting from 1. + /// + /// The new scene ID. + // only used when fixing duplicate scene IDs duing post-processing + public void ForceSceneId(int newSceneId) + { + m_SceneId = new NetworkSceneId((uint)newSceneId); + } + + // only used in SetLocalObject + internal void UpdateClientServer(bool isClientFlag, bool isServerFlag) + { + m_IsClient |= isClientFlag; + m_IsServer |= isServerFlag; + } + + // used when the player object for a connection changes + internal void SetNotLocalPlayer() + { + m_IsLocalPlayer = false; + + if (NetworkServer.active && NetworkServer.localClientActive) + { + // dont change authority for objects on the host + return; + } + m_HasAuthority = false; + } + + // this is used when a connection is destroyed, since the "observers" property is read-only + internal void RemoveObserverInternal(NetworkConnection conn) + { + if (m_Observers != null) + { + m_Observers.Remove(conn); + m_ObserverConnections.Remove(conn.connectionId); + } + } + +#if UNITY_EDITOR + void OnValidate() + { + if (m_ServerOnly && m_LocalPlayerAuthority) + { + if (LogFilter.logWarn) { Debug.LogWarning("Disabling Local Player Authority for " + gameObject + " because it is server-only."); } + m_LocalPlayerAuthority = false; + } + + SetupIDs(); + } + + void AssignAssetID(GameObject prefab) + { + string path = AssetDatabase.GetAssetPath(prefab); + m_AssetId = NetworkHash128.Parse(AssetDatabase.AssetPathToGUID(path)); + } + + bool ThisIsAPrefab() + { + return PrefabUtility.IsPartOfPrefabAsset(gameObject); + } + + bool ThisIsASceneObjectWithThatReferencesPrefabAsset(out GameObject prefab) + { + prefab = null; + if (!PrefabUtility.IsPartOfNonAssetPrefabInstance(gameObject)) + return false; + prefab = (GameObject)PrefabUtility.GetCorrespondingObjectFromSource(gameObject); + if (prefab == null) + { + if (LogFilter.logError) { Debug.LogError("Failed to find prefab parent for scene object [name:" + gameObject.name + "]"); } + return false; + } + return true; + } + + void SetupIDs() + { + GameObject prefab; + if (ThisIsAPrefab()) + { + ForceSceneId(0); + AssignAssetID(gameObject); + } + else if (ThisIsASceneObjectWithThatReferencesPrefabAsset(out prefab)) + { + AssignAssetID(prefab); + } + else + { + m_AssetId.Reset(); + } + } + +#endif + void OnDestroy() + { + if (m_IsServer && NetworkServer.active) + { + NetworkServer.Destroy(gameObject); + } + } + + internal void OnStartServer(bool allowNonZeroNetId) + { + if (m_IsServer) + { + return; + } + m_IsServer = true; + + if (m_LocalPlayerAuthority) + { + // local player on server has NO authority + m_HasAuthority = false; + } + else + { + // enemy on server has authority + m_HasAuthority = true; + } + + m_Observers = new List(); + m_ObserverConnections = new HashSet(); + CacheBehaviours(); + + // If the instance/net ID is invalid here then this is an object instantiated from a prefab and the server should assign a valid ID + if (netId.IsEmpty()) + { + m_NetId = GetNextNetworkId(); + } + else + { + if (allowNonZeroNetId) + { + //allowed + } + else + { + if (LogFilter.logError) { Debug.LogError("Object has non-zero netId " + netId + " for " + gameObject); } + return; + } + } + + if (LogFilter.logDev) { Debug.Log("OnStartServer " + gameObject + " GUID:" + netId); } + NetworkServer.instance.SetLocalObjectOnServer(netId, gameObject); + + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + try + { + comp.OnStartServer(); + } + catch (Exception e) + { + Debug.LogError("Exception in OnStartServer:" + e.Message + " " + e.StackTrace); + } + } + + if (NetworkClient.active && NetworkServer.localClientActive) + { + // there will be no spawn message, so start the client here too + ClientScene.SetLocalObject(netId, gameObject); + OnStartClient(); + } + + if (m_HasAuthority) + { + OnStartAuthority(); + } + } + + internal void OnStartClient() + { + if (!m_IsClient) + { + m_IsClient = true; + } + CacheBehaviours(); + + if (LogFilter.logDev) { Debug.Log("OnStartClient " + gameObject + " GUID:" + netId + " localPlayerAuthority:" + localPlayerAuthority); } + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + try + { + comp.PreStartClient(); // generated startup to resolve object references + comp.OnStartClient(); // user implemented startup + } + catch (Exception e) + { + Debug.LogError("Exception in OnStartClient:" + e.Message + " " + e.StackTrace); + } + } + } + + internal void OnStartAuthority() + { + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + try + { + comp.OnStartAuthority(); + } + catch (Exception e) + { + Debug.LogError("Exception in OnStartAuthority:" + e.Message + " " + e.StackTrace); + } + } + } + + internal void OnStopAuthority() + { + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + try + { + comp.OnStopAuthority(); + } + catch (Exception e) + { + Debug.LogError("Exception in OnStopAuthority:" + e.Message + " " + e.StackTrace); + } + } + } + + internal void OnSetLocalVisibility(bool vis) + { + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + try + { + comp.OnSetLocalVisibility(vis); + } + catch (Exception e) + { + Debug.LogError("Exception in OnSetLocalVisibility:" + e.Message + " " + e.StackTrace); + } + } + } + + internal bool OnCheckObserver(NetworkConnection conn) + { + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + try + { + if (!comp.OnCheckObserver(conn)) + return false; + } + catch (Exception e) + { + Debug.LogError("Exception in OnCheckObserver:" + e.Message + " " + e.StackTrace); + } + } + return true; + } + + // happens on server + internal void UNetSerializeAllVars(NetworkWriter writer) + { + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + comp.OnSerialize(writer, true); + } + } + + // happens on client + internal void HandleClientAuthority(bool authority) + { + if (!localPlayerAuthority) + { + if (LogFilter.logError) { Debug.LogError("HandleClientAuthority " + gameObject + " does not have localPlayerAuthority"); } + return; + } + + ForceAuthority(authority); + } + + // helper function for Handle** functions + bool GetInvokeComponent(int cmdHash, Type invokeClass, out NetworkBehaviour invokeComponent) + { + // dont use GetComponent(), already have a list - avoids an allocation + NetworkBehaviour foundComp = null; + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + var comp = m_NetworkBehaviours[i]; + if (comp.GetType() == invokeClass || comp.GetType().IsSubclassOf(invokeClass)) + { + // found matching class + foundComp = comp; + break; + } + } + if (foundComp == null) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logError) { Debug.LogError("Found no behaviour for incoming [" + errorCmdName + "] on " + gameObject + ", the server and client should have the same NetworkBehaviour instances [netId=" + netId + "]."); } + invokeComponent = null; + return false; + } + invokeComponent = foundComp; + return true; + } + + // happens on client + internal void HandleSyncEvent(int cmdHash, NetworkReader reader) + { + // this doesn't use NetworkBehaviour.InvokeSyncEvent function (anymore). this method of calling is faster. + // The hash is only looked up once, insted of twice(!) per NetworkBehaviour on the object. + + if (gameObject == null) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logWarn) { Debug.LogWarning("SyncEvent [" + errorCmdName + "] received for deleted object [netId=" + netId + "]"); } + return; + } + + // find the matching SyncEvent function and networkBehaviour class + NetworkBehaviour.CmdDelegate invokeFunction; + Type invokeClass; + bool invokeFound = NetworkBehaviour.GetInvokerForHashSyncEvent(cmdHash, out invokeClass, out invokeFunction); + if (!invokeFound) + { + // We don't get a valid lookup of the command name when it doesn't exist... + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logError) { Debug.LogError("Found no receiver for incoming [" + errorCmdName + "] on " + gameObject + ", the server and client should have the same NetworkBehaviour instances [netId=" + netId + "]."); } + return; + } + + // find the right component to invoke the function on + NetworkBehaviour invokeComponent; + if (!GetInvokeComponent(cmdHash, invokeClass, out invokeComponent)) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logWarn) { Debug.LogWarning("SyncEvent [" + errorCmdName + "] handler not found [netId=" + netId + "]"); } + return; + } + + invokeFunction(invokeComponent, reader); + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.SyncEvent, NetworkBehaviour.GetCmdHashEventName(cmdHash)); +#endif + } + + // happens on client + internal void HandleSyncList(int cmdHash, NetworkReader reader) + { + // this doesn't use NetworkBehaviour.InvokSyncList function (anymore). this method of calling is faster. + // The hash is only looked up once, insted of twice(!) per NetworkBehaviour on the object. + + if (gameObject == null) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logWarn) { Debug.LogWarning("SyncList [" + errorCmdName + "] received for deleted object [netId=" + netId + "]"); } + return; + } + + // find the matching SyncList function and networkBehaviour class + NetworkBehaviour.CmdDelegate invokeFunction; + Type invokeClass; + bool invokeFound = NetworkBehaviour.GetInvokerForHashSyncList(cmdHash, out invokeClass, out invokeFunction); + if (!invokeFound) + { + // We don't get a valid lookup of the command name when it doesn't exist... + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logError) { Debug.LogError("Found no receiver for incoming [" + errorCmdName + "] on " + gameObject + ", the server and client should have the same NetworkBehaviour instances [netId=" + netId + "]."); } + return; + } + + // find the right component to invoke the function on + NetworkBehaviour invokeComponent; + if (!GetInvokeComponent(cmdHash, invokeClass, out invokeComponent)) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logWarn) { Debug.LogWarning("SyncList [" + errorCmdName + "] handler not found [netId=" + netId + "]"); } + return; + } + + invokeFunction(invokeComponent, reader); + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.SyncList, NetworkBehaviour.GetCmdHashListName(cmdHash)); +#endif + } + + // happens on server + internal void HandleCommand(int cmdHash, NetworkReader reader) + { + // this doesn't use NetworkBehaviour.InvokeCommand function (anymore). this method of calling is faster. + // The hash is only looked up once, insted of twice(!) per NetworkBehaviour on the object. + + if (gameObject == null) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logWarn) { Debug.LogWarning("Command [" + errorCmdName + "] received for deleted object [netId=" + netId + "]"); } + return; + } + + // find the matching Command function and networkBehaviour class + NetworkBehaviour.CmdDelegate invokeFunction; + Type invokeClass; + bool invokeFound = NetworkBehaviour.GetInvokerForHashCommand(cmdHash, out invokeClass, out invokeFunction); + if (!invokeFound) + { + // We don't get a valid lookup of the command name when it doesn't exist... + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logError) { Debug.LogError("Found no receiver for incoming [" + errorCmdName + "] on " + gameObject + ", the server and client should have the same NetworkBehaviour instances [netId=" + netId + "]."); } + return; + } + + // find the right component to invoke the function on + NetworkBehaviour invokeComponent; + if (!GetInvokeComponent(cmdHash, invokeClass, out invokeComponent)) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logWarn) { Debug.LogWarning("Command [" + errorCmdName + "] handler not found [netId=" + netId + "]"); } + return; + } + + invokeFunction(invokeComponent, reader); + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.Command, NetworkBehaviour.GetCmdHashCmdName(cmdHash)); +#endif + } + + // happens on client + internal void HandleRPC(int cmdHash, NetworkReader reader) + { + // this doesn't use NetworkBehaviour.InvokeClientRpc function (anymore). this method of calling is faster. + // The hash is only looked up once, insted of twice(!) per NetworkBehaviour on the object. + + if (gameObject == null) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logWarn) { Debug.LogWarning("ClientRpc [" + errorCmdName + "] received for deleted object [netId=" + netId + "]"); } + return; + } + + // find the matching ClientRpc function and networkBehaviour class + NetworkBehaviour.CmdDelegate invokeFunction; + Type invokeClass; + bool invokeFound = NetworkBehaviour.GetInvokerForHashClientRpc(cmdHash, out invokeClass, out invokeFunction); + if (!invokeFound) + { + // We don't get a valid lookup of the command name when it doesn't exist... + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logError) { Debug.LogError("Found no receiver for incoming [" + errorCmdName + "] on " + gameObject + ", the server and client should have the same NetworkBehaviour instances [netId=" + netId + "]."); } + return; + } + + // find the right component to invoke the function on + NetworkBehaviour invokeComponent; + if (!GetInvokeComponent(cmdHash, invokeClass, out invokeComponent)) + { + string errorCmdName = NetworkBehaviour.GetCmdHashHandlerName(cmdHash); + if (LogFilter.logWarn) { Debug.LogWarning("ClientRpc [" + errorCmdName + "] handler not found [netId=" + netId + "]"); } + return; + } + + invokeFunction(invokeComponent, reader); + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.Rpc, NetworkBehaviour.GetCmdHashRpcName(cmdHash)); +#endif + } + + // invoked by unity runtime immediately after the regular "Update()" function. + public void UNetUpdate() + { + // check if any behaviours are ready to send + uint dirtyChannelBits = 0; + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + int channelId = comp.GetDirtyChannel(); + if (channelId != -1) + { + dirtyChannelBits |= (uint)(1 << channelId); + } + } + if (dirtyChannelBits == 0) + return; + + for (int channelId = 0; channelId < NetworkServer.numChannels; channelId++) + { + if ((dirtyChannelBits & (uint)(1 << channelId)) != 0) + { + s_UpdateWriter.StartMessage(MsgType.UpdateVars); + s_UpdateWriter.Write(netId); + + bool wroteData = false; + short oldPos; + NetworkBehaviour[] behaviourOfSameChannel = GetBehavioursOfSameChannel(channelId, false); + for (int i = 0; i < behaviourOfSameChannel.Length; i++) + { + oldPos = s_UpdateWriter.Position; + NetworkBehaviour comp = behaviourOfSameChannel[i]; + + if (comp.OnSerialize(s_UpdateWriter, false)) + { + comp.ClearAllDirtyBits(); + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.UpdateVars, comp.GetType().Name); +#endif + + wroteData = true; + } + if (s_UpdateWriter.Position - oldPos > NetworkServer.maxPacketSize) + { + if (LogFilter.logWarn) { Debug.LogWarning("Large state update of " + (s_UpdateWriter.Position - oldPos) + " bytes for netId:" + netId + " from script:" + comp); } + } + } + + if (!wroteData) + { + // nothing to send.. this could be a script with no OnSerialize function setting dirty bits + continue; + } + + s_UpdateWriter.FinishMessage(); + NetworkServer.SendWriterToReady(gameObject, s_UpdateWriter, channelId); + } + } + } + + private NetworkBehaviour[] GetBehavioursOfSameChannel(int channelId, bool initialState) + { + List channels = new List(); + if (initialState && m_NetworkBehaviours == null) + { + m_NetworkBehaviours = GetComponents(); + return m_NetworkBehaviours; + } + for (int itr = 0; itr < m_NetworkBehaviours.Length; itr++) + { + NetworkBehaviour comp = m_NetworkBehaviours[itr]; + if (comp.GetNetworkChannel() == channelId) + { + channels.Add(comp); + } + } + return channels.ToArray(); + } + + internal void OnUpdateVars(NetworkReader reader, bool initialState, NetworkMessage netMsg) + { + NetworkBehaviour[] behaviourOfSameChannel = GetBehavioursOfSameChannel(netMsg.channelId, initialState); + for (int i = 0; i < behaviourOfSameChannel.Length; i++) + { + NetworkBehaviour comp = behaviourOfSameChannel[i]; + +#if UNITY_EDITOR + var oldReadPos = reader.Position; +#endif + comp.OnDeserialize(reader, initialState); +#if UNITY_EDITOR + if (reader.Position - oldReadPos > 1) + { + Profiler.IncrementStatIncoming(MsgType.UpdateVars, comp.GetType().Name); + } +#endif + } + } + + internal void SetLocalPlayer(short localPlayerControllerId) + { + m_IsLocalPlayer = true; + m_PlayerId = localPlayerControllerId; + + // there is an ordering issue here that originAuthority solves. OnStartAuthority should only be called if m_HasAuthority was false when this function began, + // or it will be called twice for this object. But that state is lost by the time OnStartAuthority is called below, so the original value is cached + // here to be checked below. + bool originAuthority = m_HasAuthority; + if (localPlayerAuthority) + { + m_HasAuthority = true; + } + + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + comp.OnStartLocalPlayer(); + + if (localPlayerAuthority && !originAuthority) + { + comp.OnStartAuthority(); + } + } + } + + internal void SetConnectionToServer(NetworkConnection conn) + { + m_ConnectionToServer = conn; + } + + internal void SetConnectionToClient(NetworkConnection conn, short newPlayerControllerId) + { + m_PlayerId = newPlayerControllerId; + m_ConnectionToClient = conn; + } + + internal void OnNetworkDestroy() + { + for (int i = 0; + m_NetworkBehaviours != null && i < m_NetworkBehaviours.Length; + i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + comp.OnNetworkDestroy(); + } + m_IsServer = false; + } + + internal void ClearObservers() + { + if (m_Observers != null) + { + int count = m_Observers.Count; + for (int i = 0; i < count; i++) + { + var c = m_Observers[i]; + c.RemoveFromVisList(this, true); + } + m_Observers.Clear(); + m_ObserverConnections.Clear(); + } + } + + internal void AddObserver(NetworkConnection conn) + { + if (m_Observers == null) + { + if (LogFilter.logError) { Debug.LogError("AddObserver for " + gameObject + " observer list is null"); } + return; + } + + // uses hashset for better-than-list-iteration lookup performance. + if (m_ObserverConnections.Contains(conn.connectionId)) + { + if (LogFilter.logDebug) { Debug.Log("Duplicate observer " + conn.address + " added for " + gameObject); } + return; + } + + if (LogFilter.logDev) { Debug.Log("Added observer " + conn.address + " added for " + gameObject); } + + m_Observers.Add(conn); + m_ObserverConnections.Add(conn.connectionId); + conn.AddToVisList(this); + } + + internal void RemoveObserver(NetworkConnection conn) + { + if (m_Observers == null) + return; + + // NOTE this is linear performance now.. + m_Observers.Remove(conn); + m_ObserverConnections.Remove(conn.connectionId); + conn.RemoveFromVisList(this, false); + } + + /// + /// This causes the set of players that can see this object to be rebuild. The OnRebuildObservers callback function will be invoked on each NetworkBehaviour. + /// + /// True if this is the first time. + public void RebuildObservers(bool initialize) + { + if (m_Observers == null) + return; + + bool changed = false; + bool result = false; + HashSet newObservers = new HashSet(); + HashSet oldObservers = new HashSet(m_Observers); + + for (int i = 0; i < m_NetworkBehaviours.Length; i++) + { + NetworkBehaviour comp = m_NetworkBehaviours[i]; + result |= comp.OnRebuildObservers(newObservers, initialize); + } + if (!result) + { + // none of the behaviours rebuilt our observers, use built-in rebuild method + if (initialize) + { + for (int i = 0; i < NetworkServer.connections.Count; i++) + { + var conn = NetworkServer.connections[i]; + if (conn == null) continue; + if (conn.isReady) + AddObserver(conn); + } + + for (int i = 0; i < NetworkServer.localConnections.Count; i++) + { + var conn = NetworkServer.localConnections[i]; + if (conn == null) continue; + if (conn.isReady) + AddObserver(conn); + } + } + return; + } + + // apply changes from rebuild + foreach (var conn in newObservers) + { + if (conn == null) + { + continue; + } + + if (!conn.isReady) + { + if (LogFilter.logWarn) { Debug.LogWarning("Observer is not ready for " + gameObject + " " + conn); } + continue; + } + + if (initialize || !oldObservers.Contains(conn)) + { + // new observer + conn.AddToVisList(this); + if (LogFilter.logDebug) { Debug.Log("New Observer for " + gameObject + " " + conn); } + changed = true; + } + } + + foreach (var conn in oldObservers) + { + if (!newObservers.Contains(conn)) + { + // removed observer + conn.RemoveFromVisList(this, false); + if (LogFilter.logDebug) { Debug.Log("Removed Observer for " + gameObject + " " + conn); } + changed = true; + } + } + + // special case for local client. + if (initialize) + { + for (int i = 0; i < NetworkServer.localConnections.Count; i++) + { + if (!newObservers.Contains(NetworkServer.localConnections[i])) + { + OnSetLocalVisibility(false); + } + } + } + + if (!changed) + return; + + m_Observers = new List(newObservers); + + // rebuild hashset once we have the final set of new observers + m_ObserverConnections.Clear(); + for (int i = 0; i < m_Observers.Count; i++) + { + m_ObserverConnections.Add(m_Observers[i].connectionId); + } + } + + /// + /// Removes ownership for an object for a client by its conneciton. + /// This applies to objects that had authority set by AssignClientAuthority, or NetworkServer.SpawnWithClientAuthority. Authority cannot be removed for player objects. + /// + /// The connection of the client to remove authority for. + /// True if authority is removed. + public bool RemoveClientAuthority(NetworkConnection conn) + { + if (!isServer) + { + if (LogFilter.logError) { Debug.LogError("RemoveClientAuthority can only be call on the server for spawned objects."); } + return false; + } + + if (connectionToClient != null) + { + if (LogFilter.logError) { Debug.LogError("RemoveClientAuthority cannot remove authority for a player object"); } + return false; + } + + if (m_ClientAuthorityOwner == null) + { + if (LogFilter.logError) { Debug.LogError("RemoveClientAuthority for " + gameObject + " has no clientAuthority owner."); } + return false; + } + + if (m_ClientAuthorityOwner != conn) + { + if (LogFilter.logError) { Debug.LogError("RemoveClientAuthority for " + gameObject + " has different owner."); } + return false; + } + + m_ClientAuthorityOwner.RemoveOwnedObject(this); + m_ClientAuthorityOwner = null; + + // server now has authority (this is only called on server) + ForceAuthority(true); + + // send msg to that client + var msg = new ClientAuthorityMessage(); + msg.netId = netId; + msg.authority = false; + conn.Send(MsgType.LocalClientAuthority, msg); + + if (clientAuthorityCallback != null) + { + clientAuthorityCallback(conn, this, false); + } + return true; + } + + /// + /// This assigns control of an object to a client via the client's NetworkConnection. + /// This causes hasAuthority to be set on the client that owns the object, and NetworkBehaviour.OnStartAuthority will be called on that client. This object then will be in the NetworkConnection.clientOwnedObjects list for the connection. + /// Authority can be removed with RemoveClientAuthority. Only one client can own an object at any time. Only NetworkIdentities with localPlayerAuthority set can have client authority assigned. This does not need to be called for player objects, as their authority is setup automatically. + /// + /// The connection of the client to assign authority to. + /// True if authority was assigned. + public bool AssignClientAuthority(NetworkConnection conn) + { + if (!isServer) + { + if (LogFilter.logError) { Debug.LogError("AssignClientAuthority can only be call on the server for spawned objects."); } + return false; + } + if (!localPlayerAuthority) + { + if (LogFilter.logError) { Debug.LogError("AssignClientAuthority can only be used for NetworkIdentity component with LocalPlayerAuthority set."); } + return false; + } + + if (m_ClientAuthorityOwner != null && conn != m_ClientAuthorityOwner) + { + if (LogFilter.logError) { Debug.LogError("AssignClientAuthority for " + gameObject + " already has an owner. Use RemoveClientAuthority() first."); } + return false; + } + + if (conn == null) + { + if (LogFilter.logError) { Debug.LogError("AssignClientAuthority for " + gameObject + " owner cannot be null. Use RemoveClientAuthority() instead."); } + return false; + } + + m_ClientAuthorityOwner = conn; + m_ClientAuthorityOwner.AddOwnedObject(this); + + // server no longer has authority (this is called on server). Note that local client could re-acquire authority below + ForceAuthority(false); + + // send msg to that client + var msg = new ClientAuthorityMessage(); + msg.netId = netId; + msg.authority = true; + conn.Send(MsgType.LocalClientAuthority, msg); + + if (clientAuthorityCallback != null) + { + clientAuthorityCallback(conn, this, true); + } + return true; + } + + // marks the identity for future reset, this is because we cant reset the identity during destroy + // as people might want to be able to read the members inside OnDestroy(), and we have no way + // of invoking reset after OnDestroy is called. + internal void MarkForReset() + { + m_Reset = true; + } + + // if we have marked an identity for reset we do the actual reset. + internal void Reset() + { + if (!m_Reset) + return; + + m_Reset = false; + m_IsServer = false; + m_IsClient = false; + m_HasAuthority = false; + + m_NetId = NetworkInstanceId.Zero; + m_IsLocalPlayer = false; + m_ConnectionToServer = null; + m_ConnectionToClient = null; + m_PlayerId = -1; + m_NetworkBehaviours = null; + + ClearObservers(); + m_ClientAuthorityOwner = null; + } + + +#if UNITY_EDITOR + [InitializeOnLoadMethod] + static void OnInitializeOnLoad() + { + // The transport layer has state in C++, so when the C# state is lost (on domain reload), the C++ transport layer must be shutown as well. + NetworkManager.OnDomainReload(); + } +#endif + + [RuntimeInitializeOnLoadMethod] + static void OnRuntimeInitializeOnLoad() + { + var go = new GameObject("UNETCallbacks"); + go.AddComponent(typeof(NetworkCallbacks)); + go.hideFlags = go.hideFlags | HideFlags.HideAndDontSave; + } + + static internal void UNetStaticUpdate() + { + NetworkServer.Update(); + NetworkClient.UpdateClients(); + NetworkManager.UpdateScene(); + +#if UNITY_EDITOR + Profiler.NewProfilerTick(); +#endif + } + }; +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkIdentity.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkIdentity.cs.meta new file mode 100644 index 00000000..8b843f9d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkIdentity.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f8258ea15b8f74c4889ce485d21cbbb1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkInstanceId.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkInstanceId.cs new file mode 100644 index 00000000..89c9f38d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkInstanceId.cs @@ -0,0 +1,76 @@ +using System; + +namespace UnityEngine.Networking +{ + /// + /// This is used to identify networked objects across all participants of a network. It is assigned at runtime by the server when an object is spawned. + /// + [Serializable] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public struct NetworkInstanceId : IEquatable + { + public NetworkInstanceId(uint value) + { + m_Value = value; + } + + [SerializeField] + readonly uint m_Value; + + /// + /// Returns true if the value of the NetworkInstanceId is zero. + /// Object that have not been spawned will have a value of zero. + /// + /// True if zero. + public bool IsEmpty() + { + return m_Value == 0; + } + + public override int GetHashCode() + { + return (int)m_Value; + } + + public override bool Equals(object obj) + { + return obj is NetworkInstanceId && Equals((NetworkInstanceId)obj); + } + + public bool Equals(NetworkInstanceId other) + { + return this == other; + } + + public static bool operator==(NetworkInstanceId c1, NetworkInstanceId c2) + { + return c1.m_Value == c2.m_Value; + } + + public static bool operator!=(NetworkInstanceId c1, NetworkInstanceId c2) + { + return c1.m_Value != c2.m_Value; + } + + /// + /// Returns a string of "NetID:value". + /// + /// String representation of this object. + public override string ToString() + { + return m_Value.ToString(); + } + + /// + /// The internal value of this identifier. + /// + public uint Value { get { return m_Value; } } + + /// + /// A static invalid NetworkInstanceId that can be used for comparisons. + /// The default value of NetworkInstanceId.Value is zero, and IsEmpty() can be used to check this. But NetworkInstanceId.Invalid is available for specifically setting and checking for invalid IDs. + /// + public static NetworkInstanceId Invalid = new NetworkInstanceId(uint.MaxValue); + internal static NetworkInstanceId Zero = new NetworkInstanceId(0); + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkInstanceId.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkInstanceId.cs.meta new file mode 100644 index 00000000..ecc038a9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkInstanceId.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bce8698b13d6b48a097329aac037daea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyManager.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyManager.cs new file mode 100644 index 00000000..1898cf13 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyManager.cs @@ -0,0 +1,1177 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Networking.NetworkSystem; +using UnityEngine.SceneManagement; + +namespace UnityEngine.Networking +{ + /// + /// This is a specialized NetworkManager that includes a networked lobby. + /// The lobby has slots that track the joined players, and a maximum player count that is enforced. It requires that the NetworkLobbyPlayer component be on the lobby player objects. + /// NetworkLobbyManager is derived from NetworkManager, and so it implements many of the virtual functions provided by the NetworkManager class. To avoid accidentally replacing functionality of the NetworkLobbyManager, there are new virtual functions on the NetworkLobbyManager that begin with "OnLobby". These should be used on classes derived from NetworkLobbyManager instead of the virtual functions on NetworkManager. + /// The OnLobby*() functions have empty implementations on the NetworkLobbyManager base class, so the base class functions do not have to be called. + /// + [AddComponentMenu("Network/NetworkLobbyManager")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkLobbyManager : NetworkManager + { + struct PendingPlayer + { + public NetworkConnection conn; + public GameObject lobbyPlayer; + } + + // configuration + [SerializeField] bool m_ShowLobbyGUI = true; + [SerializeField] int m_MaxPlayers = 4; + [SerializeField] int m_MaxPlayersPerConnection = 1; + [SerializeField] int m_MinPlayers; + [SerializeField] NetworkLobbyPlayer m_LobbyPlayerPrefab; + [SerializeField] GameObject m_GamePlayerPrefab; + [SerializeField] string m_LobbyScene = ""; + [SerializeField] string m_PlayScene = ""; + + // runtime data + List m_PendingPlayers = new List(); + /// + /// These slots track players that enter the lobby. + /// The slotId on players is global to the game - across all players. + /// + public NetworkLobbyPlayer[] lobbySlots; + + // static message objects to avoid runtime-allocations + static LobbyReadyToBeginMessage s_ReadyToBeginMessage = new LobbyReadyToBeginMessage(); + static IntegerMessage s_SceneLoadedMessage = new IntegerMessage(); + static LobbyReadyToBeginMessage s_LobbyReadyToBeginMessage = new LobbyReadyToBeginMessage(); + + // properties + /// + /// This flag enables display of the default lobby UI. + /// This is rendered using the old GUI system, so is only recommended for testing purposes. + /// + public bool showLobbyGUI { get { return m_ShowLobbyGUI; } set { m_ShowLobbyGUI = value; } } + /// + /// The maximum number of players allowed in the game. + /// Note that this is the number "players" not clients or connections. There can be multiple players per client. + /// + public int maxPlayers { get { return m_MaxPlayers; } set { m_MaxPlayers = value; } } + /// + /// The maximum number of players per connection. + /// Calling ClientScene.AddPlayer will fail if this limit is reached. + /// + public int maxPlayersPerConnection { get { return m_MaxPlayersPerConnection; } set { m_MaxPlayersPerConnection = value; } } + /// + /// The minimum number of players required to be ready for the game to start. + /// If this is zero then the game can start with any number of players. + /// + public int minPlayers { get { return m_MinPlayers; } set { m_MinPlayers = value; } } + /// + /// This is the prefab of the player to be created in the LobbyScene. + /// This prefab must have a NetworkLobbyPlayer component on it. + /// In the lobby scene, this will be the active player object, but in other scenes while the game is running, this will be replaced by a player object created from the GamePlayerPrefab. But once returned to the lobby scene this will again become the active player object. + /// This can be used to store user data that persists for the lifetime of the session, such as color choices or weapon choices. + /// + public NetworkLobbyPlayer lobbyPlayerPrefab { get { return m_LobbyPlayerPrefab; } set { m_LobbyPlayerPrefab = value; } } + /// + /// This is the prefab of the player to be created in the PlayScene. + /// When CheckReadyToBegin starts the game from the lobby, a new player object is created from this prefab, and that object is made the active player object using NetworkServer.ReplacePlayerForConnection. + /// + public GameObject gamePlayerPrefab { get { return m_GamePlayerPrefab; } set { m_GamePlayerPrefab = value; } } + /// + /// The scene to use for the lobby. This is similar to the offlineScene of the NetworkManager. + /// + public string lobbyScene { get { return m_LobbyScene; } set { m_LobbyScene = value; offlineScene = value; } } + /// + /// The scene to use for the playing the game from the lobby. This is similar to the onlineScene of the NetworkManager. + /// + public string playScene { get { return m_PlayScene; } set { m_PlayScene = value; } } + + void OnValidate() + { + if (m_MaxPlayers <= 0) + { + m_MaxPlayers = 1; + } + + if (m_MaxPlayersPerConnection <= 0) + { + m_MaxPlayersPerConnection = 1; + } + + if (m_MaxPlayersPerConnection > maxPlayers) + { + m_MaxPlayersPerConnection = maxPlayers; + } + + if (m_MinPlayers < 0) + { + m_MinPlayers = 0; + } + + if (m_MinPlayers > m_MaxPlayers) + { + m_MinPlayers = m_MaxPlayers; + } + + if (m_LobbyPlayerPrefab != null) + { + var uv = m_LobbyPlayerPrefab.GetComponent(); + if (uv == null) + { + m_LobbyPlayerPrefab = null; + Debug.LogWarning("LobbyPlayer prefab must have a NetworkIdentity component."); + } + } + + if (m_GamePlayerPrefab != null) + { + var uv = m_GamePlayerPrefab.GetComponent(); + if (uv == null) + { + m_GamePlayerPrefab = null; + Debug.LogWarning("GamePlayer prefab must have a NetworkIdentity component."); + } + } + } + + Byte FindSlot() + { + for (byte i = 0; i < maxPlayers; i++) + { + if (lobbySlots[i] == null) + { + return i; + } + } + return Byte.MaxValue; + } + + void SceneLoadedForPlayer(NetworkConnection conn, GameObject lobbyPlayerGameObject) + { + var lobbyPlayer = lobbyPlayerGameObject.GetComponent(); + if (lobbyPlayer == null) + { + // not a lobby player.. dont replace it + return; + } + + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (LogFilter.logDebug) { Debug.Log("NetworkLobby SceneLoadedForPlayer scene:" + loadedSceneName + " " + conn); } + + if (loadedSceneName == m_LobbyScene) + { + // cant be ready in lobby, add to ready list + PendingPlayer pending; + pending.conn = conn; + pending.lobbyPlayer = lobbyPlayerGameObject; + m_PendingPlayers.Add(pending); + return; + } + + var controllerId = lobbyPlayerGameObject.GetComponent().playerControllerId; + var gamePlayer = OnLobbyServerCreateGamePlayer(conn, controllerId); + if (gamePlayer == null) + { + // get start position from base class + Transform startPos = GetStartPosition(); + if (startPos != null) + { + gamePlayer = (GameObject)Instantiate(gamePlayerPrefab, startPos.position, startPos.rotation); + } + else + { + gamePlayer = (GameObject)Instantiate(gamePlayerPrefab, Vector3.zero, Quaternion.identity); + } + } + + if (!OnLobbyServerSceneLoadedForPlayer(lobbyPlayerGameObject, gamePlayer)) + { + return; + } + + // replace lobby player with game player + NetworkServer.ReplacePlayerForConnection(conn, gamePlayer, controllerId); + } + + static int CheckConnectionIsReadyToBegin(NetworkConnection conn) + { + int countPlayers = 0; + for (int i = 0; i < conn.playerControllers.Count; i++) + { + var player = conn.playerControllers[i]; + if (player.IsValid) + { + var lobbyPlayer = player.gameObject.GetComponent(); + if (lobbyPlayer.readyToBegin) + { + countPlayers += 1; + } + } + } + return countPlayers; + } + + /// + /// CheckReadyToBegin checks all of the players in the lobby to see if their readyToBegin flag is set. + /// If all of the players are ready, then the server switches from the LobbyScene to the PlayScene - essentially starting the game. This is called automatically in response to NetworkLobbyPlayer.SendReadyToBeginMessage(). + /// + public void CheckReadyToBegin() + { + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (loadedSceneName != m_LobbyScene) + { + return; + } + + int readyCount = 0; + int playerCount = 0; + + for (int i = 0; i < NetworkServer.connections.Count; i++) + { + var conn = NetworkServer.connections[i]; + + if (conn == null) + continue; + + playerCount += 1; + readyCount += CheckConnectionIsReadyToBegin(conn); + } + if (m_MinPlayers > 0 && readyCount < m_MinPlayers) + { + // not enough players ready yet. + return; + } + + if (readyCount < playerCount) + { + // not all players are ready yet + return; + } + + m_PendingPlayers.Clear(); + OnLobbyServerPlayersReady(); + } + + /// + /// Calling this causes the server to switch back to the lobby scene. + /// + public void ServerReturnToLobby() + { + if (!NetworkServer.active) + { + Debug.Log("ServerReturnToLobby called on client"); + return; + } + ServerChangeScene(m_LobbyScene); + } + + void CallOnClientEnterLobby() + { + OnLobbyClientEnter(); + for (int i = 0; i < lobbySlots.Length; i++) + { + var player = lobbySlots[i]; + if (player == null) + continue; + + player.readyToBegin = false; + player.OnClientEnterLobby(); + } + } + + void CallOnClientExitLobby() + { + OnLobbyClientExit(); + for (int i = 0; i < lobbySlots.Length; i++) + { + var player = lobbySlots[i]; + if (player == null) + continue; + + player.OnClientExitLobby(); + } + } + + /// + /// Sends a message to the server to make the game return to the lobby scene. + /// + /// True if message was sent. + public bool SendReturnToLobby() + { + if (client == null || !client.isConnected) + { + return false; + } + + var msg = new EmptyMessage(); + client.Send(MsgType.LobbyReturnToLobby, msg); + return true; + } + + // ------------------------ server handlers ------------------------ + + public override void OnServerConnect(NetworkConnection conn) + { + // numPlayers returns the player count including this one, so ok to be equal + if (numPlayers > maxPlayers) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkLobbyManager can't accept new connection [" + conn + "], too many players connected."); } + conn.Disconnect(); + return; + } + + // cannot join game in progress + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (loadedSceneName != m_LobbyScene) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkLobbyManager can't accept new connection [" + conn + "], not in lobby and game already in progress."); } + conn.Disconnect(); + return; + } + + base.OnServerConnect(conn); + + // when a new client connects, set all old players as dirty so their current ready state is sent out + for (int i = 0; i < lobbySlots.Length; ++i) + { + if (lobbySlots[i]) + { + lobbySlots[i].SetDirtyBit(1); + } + } + + OnLobbyServerConnect(conn); + } + + public override void OnServerDisconnect(NetworkConnection conn) + { + base.OnServerDisconnect(conn); + + // if lobbyplayer for this connection has not been destroyed by now, then destroy it here + for (int i = 0; i < lobbySlots.Length; i++) + { + var player = lobbySlots[i]; + if (player == null) + continue; + + if (player.connectionToClient == conn) + { + lobbySlots[i] = null; + NetworkServer.Destroy(player.gameObject); + } + } + + OnLobbyServerDisconnect(conn); + } + + public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) + { + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (loadedSceneName != m_LobbyScene) + { + return; + } + + // check MaxPlayersPerConnection + int numPlayersForConnection = 0; + for (int i = 0; i < conn.playerControllers.Count; i++) + { + if (conn.playerControllers[i].IsValid) + numPlayersForConnection += 1; + } + + if (numPlayersForConnection >= maxPlayersPerConnection) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkLobbyManager no more players for this connection."); } + + var errorMsg = new EmptyMessage(); + conn.Send(MsgType.LobbyAddPlayerFailed, errorMsg); + return; + } + + byte slot = FindSlot(); + if (slot == Byte.MaxValue) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkLobbyManager no space for more players"); } + + var errorMsg = new EmptyMessage(); + conn.Send(MsgType.LobbyAddPlayerFailed, errorMsg); + return; + } + + var newLobbyGameObject = OnLobbyServerCreateLobbyPlayer(conn, playerControllerId); + if (newLobbyGameObject == null) + { + newLobbyGameObject = (GameObject)Instantiate(lobbyPlayerPrefab.gameObject, Vector3.zero, Quaternion.identity); + } + + var newLobbyPlayer = newLobbyGameObject.GetComponent(); + newLobbyPlayer.slot = slot; + lobbySlots[slot] = newLobbyPlayer; + + NetworkServer.AddPlayerForConnection(conn, newLobbyGameObject, playerControllerId); + } + + public override void OnServerRemovePlayer(NetworkConnection conn, PlayerController player) + { + var playerControllerId = player.playerControllerId; + byte slot = player.gameObject.GetComponent().slot; + lobbySlots[slot] = null; + base.OnServerRemovePlayer(conn, player); + + for (int i = 0; i < lobbySlots.Length; i++) + { + var lobbyPlayer = lobbySlots[i]; + if (lobbyPlayer != null) + { + lobbyPlayer.GetComponent().readyToBegin = false; + + s_LobbyReadyToBeginMessage.slotId = lobbyPlayer.slot; + s_LobbyReadyToBeginMessage.readyState = false; + NetworkServer.SendToReady(null, MsgType.LobbyReadyToBegin, s_LobbyReadyToBeginMessage); + } + } + + OnLobbyServerPlayerRemoved(conn, playerControllerId); + } + + public override void ServerChangeScene(string sceneName) + { + if (sceneName == m_LobbyScene) + { + for (int i = 0; i < lobbySlots.Length; i++) + { + var lobbyPlayer = lobbySlots[i]; + if (lobbyPlayer == null) + continue; + + // find the game-player object for this connection, and destroy it + var uv = lobbyPlayer.GetComponent(); + + PlayerController playerController; + if (uv.connectionToClient.GetPlayerController(uv.playerControllerId, out playerController)) + { + NetworkServer.Destroy(playerController.gameObject); + } + + if (NetworkServer.active) + { + // re-add the lobby object + lobbyPlayer.GetComponent().readyToBegin = false; + NetworkServer.ReplacePlayerForConnection(uv.connectionToClient, lobbyPlayer.gameObject, uv.playerControllerId); + } + } + } + base.ServerChangeScene(sceneName); + } + + public override void OnServerSceneChanged(string sceneName) + { + if (sceneName != m_LobbyScene) + { + // call SceneLoadedForPlayer on any players that become ready while we were loading the scene. + for (int i = 0; i < m_PendingPlayers.Count; i++) + { + var pending = m_PendingPlayers[i]; + SceneLoadedForPlayer(pending.conn, pending.lobbyPlayer); + } + m_PendingPlayers.Clear(); + } + + OnLobbyServerSceneChanged(sceneName); + } + + void OnServerReadyToBeginMessage(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyManager OnServerReadyToBeginMessage"); } + netMsg.ReadMessage(s_ReadyToBeginMessage); + + PlayerController lobbyController; + if (!netMsg.conn.GetPlayerController((short)s_ReadyToBeginMessage.slotId, out lobbyController)) + { + if (LogFilter.logError) { Debug.LogError("NetworkLobbyManager OnServerReadyToBeginMessage invalid playerControllerId " + s_ReadyToBeginMessage.slotId); } + return; + } + + // set this player ready + var lobbyPlayer = lobbyController.gameObject.GetComponent(); + lobbyPlayer.readyToBegin = s_ReadyToBeginMessage.readyState; + + // tell every player that this player is ready + var outMsg = new LobbyReadyToBeginMessage(); + outMsg.slotId = lobbyPlayer.slot; + outMsg.readyState = s_ReadyToBeginMessage.readyState; + NetworkServer.SendToReady(null, MsgType.LobbyReadyToBegin, outMsg); + + // maybe start the game + CheckReadyToBegin(); + } + + void OnServerSceneLoadedMessage(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyManager OnSceneLoadedMessage"); } + + netMsg.ReadMessage(s_SceneLoadedMessage); + + PlayerController lobbyController; + if (!netMsg.conn.GetPlayerController((short)s_SceneLoadedMessage.value, out lobbyController)) + { + if (LogFilter.logError) { Debug.LogError("NetworkLobbyManager OnServerSceneLoadedMessage invalid playerControllerId " + s_SceneLoadedMessage.value); } + return; + } + + SceneLoadedForPlayer(netMsg.conn, lobbyController.gameObject); + } + + void OnServerReturnToLobbyMessage(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyManager OnServerReturnToLobbyMessage"); } + + ServerReturnToLobby(); + } + + public override void OnStartServer() + { + if (string.IsNullOrEmpty(m_LobbyScene)) + { + if (LogFilter.logError) { Debug.LogError("NetworkLobbyManager LobbyScene is empty. Set the LobbyScene in the inspector for the NetworkLobbyMangaer"); } + return; + } + + if (string.IsNullOrEmpty(m_PlayScene)) + { + if (LogFilter.logError) { Debug.LogError("NetworkLobbyManager PlayScene is empty. Set the PlayScene in the inspector for the NetworkLobbyMangaer"); } + return; + } + + if (lobbySlots.Length == 0) + { + lobbySlots = new NetworkLobbyPlayer[maxPlayers]; + } + + NetworkServer.RegisterHandler(MsgType.LobbyReadyToBegin, OnServerReadyToBeginMessage); + NetworkServer.RegisterHandler(MsgType.LobbySceneLoaded, OnServerSceneLoadedMessage); + NetworkServer.RegisterHandler(MsgType.LobbyReturnToLobby, OnServerReturnToLobbyMessage); + + OnLobbyStartServer(); + } + + public override void OnStartHost() + { + OnLobbyStartHost(); + } + + public override void OnStopHost() + { + OnLobbyStopHost(); + } + + // ------------------------ client handlers ------------------------ + + public override void OnStartClient(NetworkClient lobbyClient) + { + if (lobbySlots.Length == 0) + { + lobbySlots = new NetworkLobbyPlayer[maxPlayers]; + } + + if (m_LobbyPlayerPrefab == null || m_LobbyPlayerPrefab.gameObject == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkLobbyManager no LobbyPlayer prefab is registered. Please add a LobbyPlayer prefab."); } + } + else + { + ClientScene.RegisterPrefab(m_LobbyPlayerPrefab.gameObject); + } + + if (m_GamePlayerPrefab == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkLobbyManager no GamePlayer prefab is registered. Please add a GamePlayer prefab."); } + } + else + { + ClientScene.RegisterPrefab(m_GamePlayerPrefab); + } + + lobbyClient.RegisterHandler(MsgType.LobbyReadyToBegin, OnClientReadyToBegin); + lobbyClient.RegisterHandler(MsgType.LobbyAddPlayerFailed, OnClientAddPlayerFailedMessage); + + OnLobbyStartClient(lobbyClient); + } + + public override void OnClientConnect(NetworkConnection conn) + { + OnLobbyClientConnect(conn); + CallOnClientEnterLobby(); + base.OnClientConnect(conn); + } + + public override void OnClientDisconnect(NetworkConnection conn) + { + OnLobbyClientDisconnect(conn); + base.OnClientDisconnect(conn); + } + + public override void OnStopClient() + { + OnLobbyStopClient(); + CallOnClientExitLobby(); + } + + public override void OnClientSceneChanged(NetworkConnection conn) + { + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (loadedSceneName == m_LobbyScene) + { + if (client.isConnected) + { + CallOnClientEnterLobby(); + } + } + else + { + CallOnClientExitLobby(); + } + + base.OnClientSceneChanged(conn); + OnLobbyClientSceneChanged(conn); + } + + void OnClientReadyToBegin(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_LobbyReadyToBeginMessage); + + if (s_LobbyReadyToBeginMessage.slotId >= lobbySlots.Count()) + { + if (LogFilter.logError) { Debug.LogError("NetworkLobbyManager OnClientReadyToBegin invalid lobby slot " + s_LobbyReadyToBeginMessage.slotId); } + return; + } + + var lobbyPlayer = lobbySlots[s_LobbyReadyToBeginMessage.slotId]; + if (lobbyPlayer == null || lobbyPlayer.gameObject == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkLobbyManager OnClientReadyToBegin no player at lobby slot " + s_LobbyReadyToBeginMessage.slotId); } + return; + } + + lobbyPlayer.readyToBegin = s_LobbyReadyToBeginMessage.readyState; + lobbyPlayer.OnClientReady(s_LobbyReadyToBeginMessage.readyState); + } + + void OnClientAddPlayerFailedMessage(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyManager Add Player failed."); } + OnLobbyClientAddPlayerFailed(); + } + + // ------------------------ lobby server virtuals ------------------------ + + /// + /// This is called on the host when a host is started. + /// + /// //This script shows you how to add extra functionality when the lobby host starts and stops + /// //Add this script to your GameObject. Make sure there isn't another NetworkManager in the Scene. + /// //Create a Host Button (Create>UI>Text) and assign it in the Inspector of the GameObject this script is attached to + /// //Create a Text GameObject (Create>UI>Text) and attach it to the Status Text field in the Inspector. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.UI; + /// + /// public class Example : NetworkLobbyManager + /// { + /// public Button m_HostButton; + /// public Text m_StatusText; + /// bool m_HostStarted; + /// + /// void Start() + /// { + /// //Set the minimum and maximum number of players + /// maxPlayers = 6; + /// minPlayers = 2; + /// maxPlayersPerConnection = 1; + /// //Call these functions when each Button is clicked + /// m_HostButton.onClick.AddListener(HostButton); + /// m_StatusText.text = "Current Scene : " + lobbyScene; + /// } + /// + /// //Output a message when the host joins the lobby + /// public override void OnLobbyStartHost() + /// { + /// //Change the Text to show this message + /// m_StatusText.text = "A Host has joined the lobby!"; + /// m_HostStarted = true; + /// //Do the default actions for when the host starts in the lobby + /// base.OnLobbyStartHost(); + /// } + /// + /// // Output a message to the host when the host stops + /// public override void OnLobbyStopHost() + /// { + /// //Output this message when the host stops + /// m_StatusText.text = "A Host has left the lobby!"; + /// //Do the default actions when the host stops + /// base.OnLobbyStopHost(); + /// m_HostStarted = false; + /// } + /// + /// /// This is where the Buttons are given functionality + /// //Start the host when this Button is pressed + /// public void HostButton() + /// { + /// //Check if the host has already started + /// if (m_HostStarted == false) + /// { + /// //Start the host + /// StartHost(); + /// //Change the Button's Text + /// m_HostButton.GetComponentInChildren<Text>().text = "Stop Host"; + /// } + /// else + /// { + /// //If the host has already started, stop the host + /// StopHost(); + /// //Change the Button's Text + /// m_HostButton.GetComponentInChildren<Text>().text = "Start Host"; + /// } + /// } + /// } + /// + /// + public virtual void OnLobbyStartHost() + { + } + + /// + /// This is called on the host when the host is stopped. + /// + public virtual void OnLobbyStopHost() + { + } + + /// + /// This is called on the server when the server is started - including when a host is started. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.UI; + /// + /// public class Example : NetworkLobbyManager + /// { + /// //Add this script to your GameObject. Make sure there isn't another NetworkManager in the Scene. + /// //Create 2 Buttons (Create>UI>Text) and either: + /// //1. assign them in the Inspector of the GameObject this script is attached to or + /// //2. remove this part and the listeners and alter the OnClick section on each Button to match up with each function + /// //Create a Text GameObject (Create>UI>Text) and attach it to the Status Text field in the Inspector. + /// + /// public Button m_ClientButton, m_ServerButton; + /// bool m_ServerStarted, m_ClientStarted; + /// + /// void Start() + /// { + /// showLobbyGUI = true; + /// //Call these functions when each Button is clicked + /// m_ServerButton.onClick.AddListener(ServerButton); + /// m_ClientButton.onClick.AddListener(ClientButton); + /// } + /// + /// //Output a message when your client enters the lobby + /// public override void OnLobbyClientEnter() + /// { + /// m_ClientStarted = true; + /// base.OnLobbyClientEnter(); + /// Debug.Log("Your client has entered the lobby!"); + /// } + /// + /// public override void OnLobbyStopClient() + /// { + /// Debug.Log("Client stopped"); + /// base.OnLobbyStopClient(); + /// } + /// + /// public override void OnLobbyStartServer() + /// { + /// m_ServerStarted = true; + /// base.OnLobbyStartServer(); + /// Debug.Log("Server Started!"); + /// } + /// + /// public override void OnStopServer() + /// { + /// m_ServerStarted = false; + /// base.OnStopServer(); + /// Debug.Log("Server Stopped!"); + /// } + /// + /// //Start the Client when this Button is pressed + /// public void ClientButton() + /// { + /// if (m_ClientStarted == false) + /// { + /// StartClient(); + /// m_ClientButton.GetComponentInChildren<Text>().text = "Stop Client"; + /// } + /// else + /// { + /// StopClient(); + /// m_ClientButton.GetComponentInChildren<Text>().text = "Start Client"; + /// } + /// } + /// + /// //Start the Server when this Button is pressed + /// public void ServerButton() + /// { + /// Debug.Log("Server : " + m_ServerStarted); + /// if (m_ServerStarted == false) + /// { + /// StartServer(); + /// m_ServerButton.GetComponentInChildren<Text>().text = "Stop Server"; + /// } + /// else + /// { + /// StopServer(); + /// ServerReturnToLobby(); + /// m_ServerButton.GetComponentInChildren<Text>().text = "Start Server"; + /// } + /// } + /// } + /// + /// + public virtual void OnLobbyStartServer() + { + } + + /// + /// This is called on the server when a new client connects to the server. + /// + /// The new connection. + public virtual void OnLobbyServerConnect(NetworkConnection conn) + { + } + + /// + /// This is called on the server when a client disconnects. + /// + /// The connection that disconnected. + public virtual void OnLobbyServerDisconnect(NetworkConnection conn) + { + } + + /// + /// This is called on the server when a networked scene finishes loading. + /// + /// Name of the new scene. + public virtual void OnLobbyServerSceneChanged(string sceneName) + { + } + + /// + /// This allows customization of the creation of the lobby-player object on the server. + /// By default the lobbyPlayerPrefab is used to create the lobby-player, but this function allows that behaviour to be customized. + /// + /// The connection the player object is for. + /// The controllerId of the player. + /// The new lobby-player object. + public virtual GameObject OnLobbyServerCreateLobbyPlayer(NetworkConnection conn, short playerControllerId) + { + return null; + } + + /// + /// This allows customization of the creation of the GamePlayer object on the server. + /// By default the gamePlayerPrefab is used to create the game-player, but this function allows that behaviour to be customized. The object returned from the function will be used to replace the lobby-player on the connection. + /// + /// The connection the player object is for. + /// The controllerId of the player on the connnection. + /// A new GamePlayer object. + public virtual GameObject OnLobbyServerCreateGamePlayer(NetworkConnection conn, short playerControllerId) + { + return null; + } + + /// + /// This is called on the server when a player is removed. + /// + /// The connection the player object is for. + /// The controllerId of the player that was removed. + public virtual void OnLobbyServerPlayerRemoved(NetworkConnection conn, short playerControllerId) + { + } + + /// + /// This is called on the server when it is told that a client has finished switching from the lobby scene to a game player scene. + /// When switching from the lobby, the lobby-player is replaced with a game-player object. This callback function gives an opportunity to apply state from the lobby-player to the game-player object. + /// + /// The lobby player object. + /// The game player object. + /// False to not allow this player to replace the lobby player. + // for users to apply settings from their lobby player object to their in-game player object + public virtual bool OnLobbyServerSceneLoadedForPlayer(GameObject lobbyPlayer, GameObject gamePlayer) + { + return true; + } + + /// + /// This is called on the server when all the players in the lobby are ready. + /// The default implementation of this function uses ServerChangeScene() to switch to the game player scene. By implementing this callback you can customize what happens when all the players in the lobby are ready, such as adding a countdown or a confirmation for a group leader. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class GuiLobby : NetworkLobbyManager + /// { + /// float countTimer = 0; + /// + /// public override void OnLobbyServerPlayersReady() + /// { + /// countTimer = Time.time + 5; + /// } + /// + /// void Update() + /// { + /// if (countTimer == 0) + /// return; + /// if (Time.time > countTimer) + /// { + /// countTimer = 0; + /// ServerChangeScene(playScene); + /// } + /// else + /// { + /// Debug.Log("Counting down " + (countTimer - Time.time)); + /// } + /// } + /// } + /// + /// + public virtual void OnLobbyServerPlayersReady() + { + // all players are readyToBegin, start the game + ServerChangeScene(m_PlayScene); + } + + // ------------------------ lobby client virtuals ------------------------ + + /// + /// This is a hook to allow custom behaviour when the game client enters the lobby. + /// + public virtual void OnLobbyClientEnter() + { + } + + /// + /// This is a hook to allow custom behaviour when the game client exits the lobby. + /// + public virtual void OnLobbyClientExit() + { + } + + /// + /// This is called on the client when it connects to server. + /// + /// The connection that connected. + public virtual void OnLobbyClientConnect(NetworkConnection conn) + { + } + + /// + /// This is called on the client when disconnected from a server. + /// + /// The connection that disconnected. + public virtual void OnLobbyClientDisconnect(NetworkConnection conn) + { + } + + /// + /// This is called on the client when a client is started. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.UI; + /// + /// public class Example : NetworkLobbyManager + /// { + /// //Add this script to your GameObject. Make sure there isn't another NetworkManager in the Scene. + /// //Create 2 Buttons (Create>UI>Text) and either: + /// //1. assign them in the Inspector of the GameObject this script is attached to or + /// //2. remove this part and the listeners and alter the OnClick section on each Button to match up with each function + /// //Create a Text GameObject (Create>UI>Text) and attach it to the Status Text field in the Inspector. + /// + /// public Button m_ClientButton, m_ServerButton; + /// bool m_ServerStarted, m_ClientStarted; + /// + /// void Start() + /// { + /// showLobbyGUI = true; + /// //Call these functions when each Button is clicked + /// m_ServerButton.onClick.AddListener(ServerButton); + /// m_ClientButton.onClick.AddListener(ClientButton); + /// } + /// + /// //Output a message when your client enters the lobby + /// public override void OnLobbyClientEnter() + /// { + /// m_ClientStarted = true; + /// base.OnLobbyClientEnter(); + /// Debug.Log("Your client has entered the lobby!"); + /// } + /// + /// public override void OnLobbyStopClient() + /// { + /// Debug.Log("Client stopped"); + /// base.OnLobbyStopClient(); + /// } + /// + /// public override void OnLobbyStartServer() + /// { + /// m_ServerStarted = true; + /// base.OnLobbyStartServer(); + /// Debug.Log("Server Started!"); + /// } + /// + /// public override void OnStopServer() + /// { + /// m_ServerStarted = false; + /// base.OnStopServer(); + /// Debug.Log("Server Stopped!"); + /// } + /// + /// //Start the Client when this Button is pressed + /// public void ClientButton() + /// { + /// if (m_ClientStarted == false) + /// { + /// StartClient(); + /// m_ClientButton.GetComponentInChildren<Text>().text = "Stop Client"; + /// } + /// else + /// { + /// StopClient(); + /// m_ClientButton.GetComponentInChildren<Text>().text = "Start Client"; + /// } + /// } + /// + /// //Start the Server when this Button is pressed + /// public void ServerButton() + /// { + /// Debug.Log("Server : " + m_ServerStarted); + /// if (m_ServerStarted == false) + /// { + /// StartServer(); + /// m_ServerButton.GetComponentInChildren<Text>().text = "Stop Server"; + /// } + /// else + /// { + /// StopServer(); + /// ServerReturnToLobby(); + /// m_ServerButton.GetComponentInChildren<Text>().text = "Start Server"; + /// } + /// } + /// } + /// + /// + /// The connection for the lobby. + public virtual void OnLobbyStartClient(NetworkClient lobbyClient) + { + } + + /// + /// This is called on the client when the client stops. + /// + public virtual void OnLobbyStopClient() + { + } + + /// + /// This is called on the client when the client is finished loading a new networked scene. + /// + /// The connection that finished loading a new networked scene. + public virtual void OnLobbyClientSceneChanged(NetworkConnection conn) + { + } + + /// + /// Called on the client when adding a player to the lobby fails. + /// This could be because the lobby is full, or the connection is not allowed to have more players. + /// + // for users to handle adding a player failed on the server + public virtual void OnLobbyClientAddPlayerFailed() + { + } + + // ------------------------ optional UI ------------------------ + + void OnGUI() + { + if (!showLobbyGUI) + return; + + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (loadedSceneName != m_LobbyScene) + return; + + Rect backgroundRec = new Rect(90 , 180, 500, 150); + GUI.Box(backgroundRec, "Players:"); + + if (NetworkClient.active) + { + Rect addRec = new Rect(100, 300, 120, 20); + if (GUI.Button(addRec, "Add Player")) + { + TryToAddPlayer(); + } + } + } + + /// + /// This is used on clients to attempt to add a player to the game. + /// This may fail if the game is full or the connection cannot have more players. + /// + public void TryToAddPlayer() + { + if (NetworkClient.active) + { + short controllerId = -1; + var controllers = NetworkClient.allClients[0].connection.playerControllers; + + if (controllers.Count < maxPlayers) + { + controllerId = (short)controllers.Count; + } + else + { + for (short i = 0; i < maxPlayers; i++) + { + if (!controllers[i].IsValid) + { + controllerId = i; + break; + } + } + } + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyManager TryToAddPlayer controllerId " + controllerId + " ready:" + ClientScene.ready); } + + if (controllerId == -1) + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyManager No Space!"); } + return; + } + + if (ClientScene.ready) + { + ClientScene.AddPlayer(controllerId); + } + else + { + ClientScene.AddPlayer(NetworkClient.allClients[0].connection, controllerId); + } + } + else + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyManager NetworkClient not active!"); } + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyManager.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyManager.cs.meta new file mode 100644 index 00000000..ad722f7f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 49dbc7c55212049c58602e0da93a5b16 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyPlayer.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyPlayer.cs new file mode 100644 index 00000000..dd8211fc --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyPlayer.cs @@ -0,0 +1,271 @@ + +using System; +using UnityEngine; +using UnityEngine.Networking.NetworkSystem; +using UnityEngine.SceneManagement; + +namespace UnityEngine.Networking +{ + /// + /// This component works in conjunction with the NetworkLobbyManager to make up the multiplayer lobby system. + /// The LobbyPrefab object of the NetworkLobbyManager must have this component on it. This component holds basic lobby player data required for the lobby to function. Game specific data for lobby players can be put in other components on the LobbyPrefab or in scripts derived from NetworkLobbyPlayer. + /// + [DisallowMultipleComponent] + [AddComponentMenu("Network/NetworkLobbyPlayer")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkLobbyPlayer : NetworkBehaviour + { + /// + /// This flag controls whether the default UI is shown for the lobby player. + /// As this UI is rendered using the old GUI system, it is only recommended for testing purposes. + /// + [Tooltip("Enable to show the default lobby GUI for this player.")] + [SerializeField] public bool ShowLobbyGUI = true; + + byte m_Slot; + bool m_ReadyToBegin; + + /// + /// The slot within the lobby that this player inhabits. + /// Lobby slots are global for the game - each player has a unique slotId. + /// + public byte slot { get { return m_Slot; } set { m_Slot = value; }} + /// + /// This is a flag that control whether this player is ready for the game to begin. + /// When all players are ready to begin, the game will start. This should not be set directly, the SendReadyToBeginMessage function should be called on the client to set it on the server. + /// + public bool readyToBegin { get { return m_ReadyToBegin; } set { m_ReadyToBegin = value; } } + + void Start() + { + DontDestroyOnLoad(gameObject); + } + + void OnEnable() + { + SceneManager.sceneLoaded += OnSceneLoaded; + } + + void OnDisable() + { + SceneManager.sceneLoaded -= OnSceneLoaded; + } + + public override void OnStartClient() + { + var lobby = GetLobbyManager(); + if (lobby) + { + lobby.lobbySlots[m_Slot] = this; + m_ReadyToBegin = false; + OnClientEnterLobby(); + } + else + { + Debug.LogError("LobbyPlayer could not find a NetworkLobbyManager. The LobbyPlayer requires a NetworkLobbyManager object to function. Make sure that there is one in the scene."); + } + } + + /// + /// This is used on clients to tell the server that this player is ready for the game to begin. + /// + public void SendReadyToBeginMessage() + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyPlayer SendReadyToBeginMessage"); } + + var lobby = GetLobbyManager(); + if (lobby) + { + var msg = new LobbyReadyToBeginMessage(); + msg.slotId = (byte)playerControllerId; + msg.readyState = true; + lobby.client.Send(MsgType.LobbyReadyToBegin, msg); + } + } + + /// + /// This is used on clients to tell the server that this player is not ready for the game to begin. + /// + public void SendNotReadyToBeginMessage() + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyPlayer SendReadyToBeginMessage"); } + + var lobby = GetLobbyManager(); + if (lobby) + { + var msg = new LobbyReadyToBeginMessage(); + msg.slotId = (byte)playerControllerId; + msg.readyState = false; + lobby.client.Send(MsgType.LobbyReadyToBegin, msg); + } + } + + /// + /// This is used on clients to tell the server that the client has switched from the lobby to the GameScene and is ready to play. + /// This message triggers the server to replace the lobby player with the game player. + /// + public void SendSceneLoadedMessage() + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyPlayer SendSceneLoadedMessage"); } + + var lobby = GetLobbyManager(); + if (lobby) + { + var msg = new IntegerMessage(playerControllerId); + lobby.client.Send(MsgType.LobbySceneLoaded, msg); + } + } + + void OnSceneLoaded(Scene scene, LoadSceneMode mode) + { + var lobby = GetLobbyManager(); + if (lobby) + { + // dont even try this in the startup scene + // Should we check if the LoadSceneMode is Single or Additive?? + // Can the lobby scene be loaded Additively?? + string loadedSceneName = scene.name; + if (loadedSceneName == lobby.lobbyScene) + { + return; + } + } + + if (isLocalPlayer) + { + SendSceneLoadedMessage(); + } + } + + NetworkLobbyManager GetLobbyManager() + { + return NetworkManager.singleton as NetworkLobbyManager; + } + + /// + /// This removes this player from the lobby. + /// This player object will be destroyed - on the server and on all clients. + /// + public void RemovePlayer() + { + if (isLocalPlayer && !m_ReadyToBegin) + { + if (LogFilter.logDebug) { Debug.Log("NetworkLobbyPlayer RemovePlayer"); } + + ClientScene.RemovePlayer(GetComponent().playerControllerId); + } + } + + // ------------------------ callbacks ------------------------ + + /// + /// This is a hook that is invoked on all player objects when entering the lobby. + /// Note: isLocalPlayer is not guaranteed to be set until OnStartLocalPlayer is called. + /// + public virtual void OnClientEnterLobby() + { + } + + /// + /// This is a hook that is invoked on all player objects when exiting the lobby. + /// + public virtual void OnClientExitLobby() + { + } + + /// + /// This is a hook that is invoked on clients when a LobbyPlayer switches between ready or not ready. + /// This function is called when the a client player calls SendReadyToBeginMessage() or SendNotReadyToBeginMessage(). + /// + /// Whether the player is ready or not. + public virtual void OnClientReady(bool readyState) + { + } + + // ------------------------ Custom Serialization ------------------------ + + public override bool OnSerialize(NetworkWriter writer, bool initialState) + { + // dirty flag + writer.WritePackedUInt32(1); + + writer.Write(m_Slot); + writer.Write(m_ReadyToBegin); + return true; + } + + public override void OnDeserialize(NetworkReader reader, bool initialState) + { + var dirty = reader.ReadPackedUInt32(); + if (dirty == 0) + return; + + m_Slot = reader.ReadByte(); + m_ReadyToBegin = reader.ReadBoolean(); + } + + // ------------------------ optional UI ------------------------ + + void OnGUI() + { + if (!ShowLobbyGUI) + return; + + var lobby = GetLobbyManager(); + if (lobby) + { + if (!lobby.showLobbyGUI) + return; + + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (loadedSceneName != lobby.lobbyScene) + return; + } + + Rect rec = new Rect(100 + m_Slot * 100, 200, 90, 20); + + if (isLocalPlayer) + { + string youStr; + if (m_ReadyToBegin) + { + youStr = "(Ready)"; + } + else + { + youStr = "(Not Ready)"; + } + GUI.Label(rec, youStr); + + if (m_ReadyToBegin) + { + rec.y += 25; + if (GUI.Button(rec, "STOP")) + { + SendNotReadyToBeginMessage(); + } + } + else + { + rec.y += 25; + if (GUI.Button(rec, "START")) + { + SendReadyToBeginMessage(); + } + + rec.y += 25; + if (GUI.Button(rec, "Remove")) + { + ClientScene.RemovePlayer(GetComponent().playerControllerId); + } + } + } + else + { + GUI.Label(rec, "Player [" + netId + "]"); + rec.y += 25; + GUI.Label(rec, "Ready [" + m_ReadyToBegin + "]"); + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyPlayer.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyPlayer.cs.meta new file mode 100644 index 00000000..5088460d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkLobbyPlayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4d770e0150da44e8b958c69215097c1c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManager.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManager.cs new file mode 100644 index 00000000..63346433 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManager.cs @@ -0,0 +1,1957 @@ +using System; +using System.Collections.Generic; +using System.Net; +using UnityEngine.Networking.Match; +using UnityEngine.Networking.NetworkSystem; +using UnityEngine.Networking.Types; +using UnityEngine.SceneManagement; + +namespace UnityEngine.Networking +{ + /// + /// Enumeration of methods of where to spawn player objects in multiplayer games. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class PlayerSpawnMethodExample : MonoBehaviour + /// { + /// void Update() + /// { + /// //Press the space key to switch to spawning on a random spawn point + /// if (Input.GetKeyDown(KeyCode.Space)) + /// { + /// //Check that the PlayerSpawnMethod is currently RoundRobin + /// if (NetworkManager.singleton.playerSpawnMethod == PlayerSpawnMethod.RoundRobin) + /// //Switch it to Random spawning if it is + /// NetworkManager.singleton.playerSpawnMethod = PlayerSpawnMethod.Random; + /// //Otherwise switch it to RoundRobin + /// else NetworkManager.singleton.playerSpawnMethod = PlayerSpawnMethod.RoundRobin; + /// } + /// } + /// } + /// + /// + public enum PlayerSpawnMethod + { + Random, + RoundRobin + }; + + /// + /// The NetworkManager is a convenience class for the HLAPI for managing networking systems. + /// For simple network applications the NetworkManager can be used to control the HLAPI. It provides simple ways to start and stop client and servers, to manage scenes, and has virtual functions that user code can use to implement handlers for network events. The NetworkManager deals with one client at a time. The example below shows a minimal network setup. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Manager : NetworkManager + /// { + /// public override void OnServerConnect(NetworkConnection conn) + /// { + /// Debug.Log("OnPlayerConnected"); + /// } + /// } + /// + /// + [AddComponentMenu("Network/NetworkManager")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkManager : MonoBehaviour + { + // configuration + [SerializeField] int m_NetworkPort = 7777; + [SerializeField] bool m_ServerBindToIP; + [SerializeField] string m_ServerBindAddress = ""; + [SerializeField] string m_NetworkAddress = "localhost"; + [SerializeField] bool m_DontDestroyOnLoad = true; + [SerializeField] bool m_RunInBackground = true; + [SerializeField] bool m_ScriptCRCCheck = true; + [SerializeField] float m_MaxDelay = 0.01f; + [SerializeField] LogFilter.FilterLevel m_LogLevel = (LogFilter.FilterLevel)LogFilter.Info; + [SerializeField] GameObject m_PlayerPrefab; + [SerializeField] bool m_AutoCreatePlayer = true; + [SerializeField] PlayerSpawnMethod m_PlayerSpawnMethod; + [SerializeField] string m_OfflineScene = ""; + [SerializeField] string m_OnlineScene = ""; + [SerializeField] List m_SpawnPrefabs = new List(); + + [SerializeField] bool m_CustomConfig; + [SerializeField] int m_MaxConnections = 4; + [SerializeField] ConnectionConfig m_ConnectionConfig; + [SerializeField] GlobalConfig m_GlobalConfig; + [SerializeField] List m_Channels = new List(); + + [SerializeField] bool m_UseWebSockets; + [SerializeField] bool m_UseSimulator; + [SerializeField] int m_SimulatedLatency = 1; + [SerializeField] float m_PacketLossPercentage; + + [SerializeField] int m_MaxBufferedPackets = ChannelBuffer.MaxPendingPacketCount; + [SerializeField] bool m_AllowFragmentation = true; + + // matchmaking configuration + [SerializeField] string m_MatchHost = "mm.unet.unity3d.com"; + [SerializeField] int m_MatchPort = 443; + /// + /// The name of the current match. + /// A text string indicating the name of the current match in progress. + /// + [SerializeField] public string matchName = "default"; + /// + /// The maximum number of players in the current match. + /// + [SerializeField] public uint matchSize = 4; + + + NetworkMigrationManager m_MigrationManager; + + private EndPoint m_EndPoint; + bool m_ClientLoadedScene; + + static INetworkTransport s_ActiveTransport = new DefaultNetworkTransport(); + + // properties + /// + /// The network port currently in use. + /// For clients, this is the port of the server connected to. For servers, this is the listen port. + /// + public int networkPort { get { return m_NetworkPort; } set { m_NetworkPort = value; } } + /// + /// Flag to tell the server whether to bind to a specific IP address. + /// If this is false, then no specific IP address is bound to (IP_ANY). + /// + public bool serverBindToIP { get { return m_ServerBindToIP; } set { m_ServerBindToIP = value; }} + /// + /// The IP address to bind the server to. + /// This is only used if serverBindToIP is set to true. + /// + public string serverBindAddress { get { return m_ServerBindAddress; } set { m_ServerBindAddress = value; }} + /// + /// The network address currently in use. + /// For clients, this is the address of the server that is connected to. For servers, this is the local address. + /// + public string networkAddress { get { return m_NetworkAddress; } set { m_NetworkAddress = value; } } + /// + /// A flag to control whether the NetworkManager object is destroyed when the scene changes. + /// This should be set if your game has a single NetworkManager that exists for the lifetime of the process. If there is a NetworkManager in each scene, then this should not be set. + /// + public bool dontDestroyOnLoad { get { return m_DontDestroyOnLoad; } set { m_DontDestroyOnLoad = value; } } + /// + /// Controls whether the program runs when it is in the background. + /// This is required when multiple instances of a program using networking are running on the same machine, such as when testing using localhost. But this is not recommended when deploying to mobile platforms. + /// + public bool runInBackground { get { return m_RunInBackground; } set { m_RunInBackground = value; } } + /// + /// Flag for using the script CRC check between server and clients. + /// Enables a CRC check between server and client that ensures the NetworkBehaviour scripts match. This may not be appropriate in some cases, such a when the client and server are different Unity projects. + /// + public bool scriptCRCCheck { get { return m_ScriptCRCCheck; } set { m_ScriptCRCCheck = value; }} + + [Obsolete("moved to NetworkMigrationManager")] + public bool sendPeerInfo { get { return false; } set {} } + + /// + /// The maximum delay before sending packets on connections. + /// In seconds. The default of 0.01 seconds means packets will be delayed at most by 10 milliseconds. Setting this to zero will disable HLAPI connection buffering. + /// + public float maxDelay { get { return m_MaxDelay; } set { m_MaxDelay = value; } } + /// + /// The log level specifically to user for network log messages. + /// + public LogFilter.FilterLevel logLevel { get { return m_LogLevel; } set { m_LogLevel = value; LogFilter.currentLogLevel = (int)value; } } + /// + /// The default prefab to be used to create player objects on the server. + /// Player objects are created in the default handler for AddPlayer() on the server. Implementing OnServerAddPlayer overrides this behaviour. + /// + public GameObject playerPrefab { get { return m_PlayerPrefab; } set { m_PlayerPrefab = value; } } + /// + /// A flag to control whether or not player objects are automatically created on connect, and on scene change. + /// + public bool autoCreatePlayer { get { return m_AutoCreatePlayer; } set { m_AutoCreatePlayer = value; } } + /// + /// The current method of spawning players used by the NetworkManager. + /// + /// //Attach this script to a GameObject + /// //This script switches the Player spawn method between Round Robin spawning and Random spawning when you press the space key in Play Mode. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : NetworkManager + /// { + /// void Start() + /// { + /// //Change the Player Spawn Method to be Round Robin (spawn at the spawn points in order) + /// playerSpawnMethod = PlayerSpawnMethod.RoundRobin; + /// } + /// + /// void Update() + /// { + /// //Press the space key to switch the spawn method + /// if (Input.GetKeyDown(KeyCode.Space)) + /// { + /// //Press the space key to switch from RoundRobin method to Random method (spawn at the spawn points in a random order) + /// if (playerSpawnMethod == PlayerSpawnMethod.RoundRobin) + /// playerSpawnMethod = PlayerSpawnMethod.Random; + /// //Otherwise switch back to RoundRobin at the press of the space key + /// else playerSpawnMethod = PlayerSpawnMethod.RoundRobin; + /// } + /// } + /// } + /// + /// + public PlayerSpawnMethod playerSpawnMethod { get { return m_PlayerSpawnMethod; } set { m_PlayerSpawnMethod = value; } } + /// + /// The scene to switch to when offline. + /// Setting this makes the NetworkManager do scene management. This scene will be switched to when a network session is completed - such as a client disconnect, or a server shutdown. + /// + public string offlineScene { get { return m_OfflineScene; } set { m_OfflineScene = value; } } + /// + /// The scene to switch to when online. + /// Setting this makes the NetworkManager do scene management. This scene will be switched to when a network session is started - such as a client connect, or a server listen. + /// + public string onlineScene { get { return m_OnlineScene; } set { m_OnlineScene = value; } } + /// + /// List of prefabs that will be registered with the spawning system. + /// For each of these prefabs, ClientManager.RegisterPrefab() will be automatically invoke. + /// + public List spawnPrefabs { get { return m_SpawnPrefabs; }} + + /// + /// The list of currently registered player start positions for the current scene. + /// + public List startPositions { get { return s_StartPositions; }} + + /// + /// Flag to enable custom network configuration. + /// + public bool customConfig { get { return m_CustomConfig; } set { m_CustomConfig = value; } } + /// + /// The custom network configuration to use. + /// This will be used to configure the network transport layer. + /// + public ConnectionConfig connectionConfig { get { if (m_ConnectionConfig == null) { m_ConnectionConfig = new ConnectionConfig(); } return m_ConnectionConfig; } } + /// + /// The transport layer global configuration to be used. + /// This defines global settings for the operation of the transport layer. + /// + public GlobalConfig globalConfig { get { if (m_GlobalConfig == null) { m_GlobalConfig = new GlobalConfig(); } return m_GlobalConfig; } } + /// + /// The maximum number of concurrent network connections to support. + /// The effects the memory usage of the network layer. + /// + public int maxConnections { get { return m_MaxConnections; } set { m_MaxConnections = value; } } + /// + /// The Quality-of-Service channels to use for the network transport layer. + /// + public List channels { get { return m_Channels; } } + + /// + /// Allows you to specify an EndPoint object instead of setting networkAddress and networkPort (required for some platforms such as Xbox One). + /// Setting this object overrides the networkAddress and networkPort fields, and will be used instead of making connections. + /// + public EndPoint secureTunnelEndpoint { get { return m_EndPoint; } set { m_EndPoint = value; } } + + /// + /// This makes the NetworkServer listen for WebSockets connections instead of normal transport layer connections. + /// This allows WebGL clients to connect to the server. + /// + public bool useWebSockets { get { return m_UseWebSockets; } set { m_UseWebSockets = value; } } + /// + /// Flag that control whether clients started by this NetworkManager will use simulated latency and packet loss. + /// + public bool useSimulator { get { return m_UseSimulator; } set { m_UseSimulator = value; }} + /// + /// The delay in milliseconds to be added to incoming and outgoing packets for clients. + /// This is only used when useSimulator is set. + /// + public int simulatedLatency { get { return m_SimulatedLatency; } set { m_SimulatedLatency = value; } } + /// + /// The percentage of incoming and outgoing packets to be dropped for clients. + /// This is only used when useSimulator is set. + /// + public float packetLossPercentage { get { return m_PacketLossPercentage; } set { m_PacketLossPercentage = value; } } + + /// + /// The hostname of the matchmaking server. + /// The default address for the MatchMaker is mm.unet.unity3d.com That will connect a client to the nearest datacenter geographically. However because data centers are siloed from each other, players will only see matches occurring inside the data center they are currently connected to. If a player of your game is traveling to another part of the world, for instance, they may interact with a different set of players that are in that data center. You can override this behavior by specifying a particular data center. Keep in mind generally as distance grows so does latency, which is why we run data centers spread out over the world. + /// To connect to a specific data center use one of the following addresses: + /// United States: us1-mm.unet.unity3d.com Europe: eu1-mm.unet.unity3d.com Singapore: ap1-mm.unet.unity3d.com. + /// + public string matchHost { get { return m_MatchHost; } set { m_MatchHost = value; } } + /// + /// The port of the matchmaking service. + /// + public int matchPort { get { return m_MatchPort; } set { m_MatchPort = value; } } + /// + /// This is true if the client loaded a new scene when connecting to the server. + /// This is set before OnClientConnect is called, so it can be checked there to perform different logic if a scene load occurred. + /// + public bool clientLoadedScene { get { return m_ClientLoadedScene; } set { m_ClientLoadedScene = value; } } + + /// + /// The migration manager being used with the NetworkManager. + /// + public NetworkMigrationManager migrationManager { get { return m_MigrationManager; }} + + /// + /// NumPlayers is the number of active player objects across all connections on the server. + /// This is only valid on the host / server. + /// + // only really valid on the server + public int numPlayers + { + get + { + int numPlayers = 0; + for (int i = 0; i < NetworkServer.connections.Count; i++) + { + var conn = NetworkServer.connections[i]; + if (conn == null) + continue; + + for (int ii = 0; ii < conn.playerControllers.Count; ii++) + { + if (conn.playerControllers[ii].IsValid) + { + numPlayers += 1; + } + } + } + return numPlayers; + } + } + + public static INetworkTransport defaultTransport + { + get + { + return new DefaultNetworkTransport(); + } + } + + public static INetworkTransport activeTransport + { + get + { + return s_ActiveTransport; + } + set + { + if (s_ActiveTransport != null && s_ActiveTransport.IsStarted) + { + throw new InvalidOperationException("Cannot change network transport when current transport object is in use."); + } + + if (value == null) + { + throw new ArgumentNullException("Cannot set active transport to null."); + } + + s_ActiveTransport = value; + } + } + + // runtime data + /// + /// The name of the current network scene. + /// This is populated if the NetworkManager is doing scene management. This should not be changed directly. Calls to ServerChangeScene() cause this to change. New clients that connect to a server will automatically load this scene. + /// + static public string networkSceneName = ""; + /// + /// True if the NetworkServer or NetworkClient isactive. + /// This is read-only. Calling StopServer() or StopClient() turns this off. + /// + public bool isNetworkActive; + /// + /// The current NetworkClient being used by the manager. + /// This is populated when StartClient or StartLocalClient are called. + /// + public NetworkClient client; + static List s_StartPositions = new List(); + static int s_StartPositionIndex; + + /// + /// A MatchInfo instance that will be used when StartServer() or StartClient() are called. + /// This should be populated from the data handed to the callback for NetworkMatch.CreateMatch or NetworkMatch.JoinMatch. It contains all the information necessary to connect to the match in question. + /// + // matchmaking runtime data + public MatchInfo matchInfo; + /// + /// The UMatch MatchMaker object. + /// This is populated if StartMatchMaker() has been called. It is used to communicate with the matchmaking service. This should be shut down after the match is complete to clean up its internal state. If this object is null then the client is not setup to communicate with MatchMaker yet. + /// + public NetworkMatch matchMaker; + /// + /// The list of matches that are available to join. + /// This will be populated if UMatch.ListMatches() has been called. It will contain the most recent set of results from calling ListMatches. + /// + public List matches; + /// + /// The NetworkManager singleton object. + /// + /// //Create a GameObject and attach this script + /// //Create two buttons. To do this, go to Create>UI>Button for each. + /// //Click each Button in the Hierarchy, and navigate to the Inspector window. Scroll down to the On Click() section and press the + button to add an action + /// //Attach your GameObject to access the appropriate function you want your Button to do. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : NetworkManager + /// { + /// public void StartHostButton() + /// { + /// singleton.StartHost(); + /// } + /// + /// //Press the "Disconnect" Button to stop the Host + /// public void StopHostButton() + /// { + /// singleton.StopHost(); + /// } + /// } + /// + /// + public static NetworkManager singleton; + + // static message objects to avoid runtime-allocations + static AddPlayerMessage s_AddPlayerMessage = new AddPlayerMessage(); + static RemovePlayerMessage s_RemovePlayerMessage = new RemovePlayerMessage(); + static ErrorMessage s_ErrorMessage = new ErrorMessage(); + + static AsyncOperation s_LoadingSceneAsync; + static NetworkConnection s_ClientReadyConnection; + + // this is used to persist network address between scenes. + static string s_Address; + +#if UNITY_EDITOR + static bool s_DomainReload; + static NetworkManager s_PendingSingleton; + + internal static void OnDomainReload() + { + s_DomainReload = true; + } + + public NetworkManager() + { + s_PendingSingleton = this; + } + +#endif + + void Awake() + { + InitializeSingleton(); + } + + void InitializeSingleton() + { + if (singleton != null && singleton == this) + { + return; + } + + // do this early + var logLevel = (int)m_LogLevel; + if (logLevel != LogFilter.SetInScripting) + { + LogFilter.currentLogLevel = logLevel; + } + + if (m_DontDestroyOnLoad) + { + if (singleton != null) + { + if (LogFilter.logDev) { Debug.Log("Multiple NetworkManagers detected in the scene. Only one NetworkManager can exist at a time. The duplicate NetworkManager will not be used."); } + Destroy(gameObject); + return; + } + if (LogFilter.logDev) { Debug.Log("NetworkManager created singleton (DontDestroyOnLoad)"); } + singleton = this; + if (Application.isPlaying) DontDestroyOnLoad(gameObject); + } + else + { + if (LogFilter.logDev) { Debug.Log("NetworkManager created singleton (ForScene)"); } + singleton = this; + } + + if (m_NetworkAddress != "") + { + s_Address = m_NetworkAddress; + } + else if (s_Address != "") + { + m_NetworkAddress = s_Address; + } + } + + void OnValidate() + { + if (m_SimulatedLatency < 1) m_SimulatedLatency = 1; + if (m_SimulatedLatency > 500) m_SimulatedLatency = 500; + + if (m_PacketLossPercentage < 0) m_PacketLossPercentage = 0; + if (m_PacketLossPercentage > 99) m_PacketLossPercentage = 99; + + if (m_MaxConnections <= 0) m_MaxConnections = 1; + if (m_MaxConnections > 32000) m_MaxConnections = 32000; + + if (m_MaxBufferedPackets <= 0) m_MaxBufferedPackets = 0; + if (m_MaxBufferedPackets > ChannelBuffer.MaxBufferedPackets) + { + m_MaxBufferedPackets = ChannelBuffer.MaxBufferedPackets; + if (LogFilter.logError) { Debug.LogError("NetworkManager - MaxBufferedPackets cannot be more than " + ChannelBuffer.MaxBufferedPackets); } + } + + if (m_PlayerPrefab != null && m_PlayerPrefab.GetComponent() == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkManager - playerPrefab must have a NetworkIdentity."); } + m_PlayerPrefab = null; + } + + if (m_ConnectionConfig != null && m_ConnectionConfig.MinUpdateTimeout <= 0) + { + if (LogFilter.logError) { Debug.LogError("NetworkManager MinUpdateTimeout cannot be zero or less. The value will be reset to 1 millisecond"); } + m_ConnectionConfig.MinUpdateTimeout = 1; + } + + if (m_GlobalConfig != null) + { + if (m_GlobalConfig.ThreadAwakeTimeout <= 0) + { + if (LogFilter.logError) { Debug.LogError("NetworkManager ThreadAwakeTimeout cannot be zero or less. The value will be reset to 1 millisecond"); } + m_GlobalConfig.ThreadAwakeTimeout = 1; + } + } + } + + internal void RegisterServerMessages() + { + NetworkServer.RegisterHandler(MsgType.Connect, OnServerConnectInternal); + NetworkServer.RegisterHandler(MsgType.Disconnect, OnServerDisconnectInternal); + NetworkServer.RegisterHandler(MsgType.Ready, OnServerReadyMessageInternal); + NetworkServer.RegisterHandler(MsgType.AddPlayer, OnServerAddPlayerMessageInternal); + NetworkServer.RegisterHandler(MsgType.RemovePlayer, OnServerRemovePlayerMessageInternal); + NetworkServer.RegisterHandler(MsgType.Error, OnServerErrorInternal); + } + + /// + /// This sets up a NetworkMigrationManager object to work with this NetworkManager. + /// The NetworkManager will automatically call functions on the migration manager, such as NetworkMigrationManager.LostHostOnClient when network events happen. + /// + /// The migration manager object to use with the NetworkManager. + public void SetupMigrationManager(NetworkMigrationManager man) + { + m_MigrationManager = man; + } + + public bool StartServer(ConnectionConfig config, int maxConnections) + { + return StartServer(null, config, maxConnections); + } + + /// + /// This starts a new server. + /// This uses the networkPort property as the listen port. + /// + /// //This is a script that creates a Toggle that you enable to start the Server. + /// //Attach this script to an empty GameObject + /// //Create a Toggle GameObject by going to Create>UI>Toggle. + /// //Click on your empty GameObject. + /// //Click and drag the Toggle GameObject from the Hierarchy to the Toggle section in the Inspector window. + /// + /// using UnityEngine; + /// using UnityEngine.UI; + /// using UnityEngine.Networking; + /// + /// //This makes the GameObject a NetworkManager GameObject + /// public class Example : NetworkManager + /// { + /// public Toggle m_Toggle; + /// Text m_ToggleText; + /// + /// void Start() + /// { + /// //Fetch the Text of the Toggle to allow you to change it later + /// m_ToggleText = m_Toggle.GetComponentInChildren<Text>(); + /// OnOff(false); + /// } + /// + /// //Connect this function to the Toggle to start and stop the Server + /// public void OnOff(bool change) + /// { + /// //Detect when the Toggle returns false + /// if (change == false) + /// { + /// //Stop the Server + /// StopServer(); + /// //Change the text of the Toggle + /// m_ToggleText.text = "Connect Server"; + /// } + /// //Detect when the Toggle returns true + /// if (change == true) + /// { + /// //Start the Server + /// StartServer(); + /// //Change the Toggle Text + /// m_ToggleText.text = "Disconnect Server"; + /// } + /// } + /// + /// //Detect when the Server starts and output the status + /// public override void OnStartServer() + /// { + /// //Output that the Server has started + /// Debug.Log("Server Started!"); + /// } + /// + /// //Detect when the Server stops + /// public override void OnStopServer() + /// { + /// //Output that the Server has stopped + /// Debug.Log("Server Stopped!"); + /// } + /// } + /// + /// + /// True is the server was started. + public bool StartServer() + { + return StartServer(null); + } + + public bool StartServer(MatchInfo info) + { + return StartServer(info, null, -1); + } + + bool StartServer(MatchInfo info, ConnectionConfig config, int maxConnections) + { + InitializeSingleton(); + + OnStartServer(); + + if (m_RunInBackground) + Application.runInBackground = true; + + NetworkCRC.scriptCRCCheck = scriptCRCCheck; + NetworkServer.useWebSockets = m_UseWebSockets; + + if (m_GlobalConfig != null) + { + NetworkManager.activeTransport.Init(m_GlobalConfig); + } + + // passing a config overrides setting the connectionConfig property + if (m_CustomConfig && m_ConnectionConfig != null && config == null) + { + m_ConnectionConfig.Channels.Clear(); + for (int channelId = 0; channelId < m_Channels.Count; channelId++) + { + m_ConnectionConfig.AddChannel(m_Channels[channelId]); + } + NetworkServer.Configure(m_ConnectionConfig, m_MaxConnections); + } + + if (config != null) + { + NetworkServer.Configure(config, maxConnections); + } + + if (info != null) + { + if (!NetworkServer.Listen(info, m_NetworkPort)) + { + if (LogFilter.logError) { Debug.LogError("StartServer listen failed."); } + return false; + } + } + else + { + if (m_ServerBindToIP && !string.IsNullOrEmpty(m_ServerBindAddress)) + { + if (!NetworkServer.Listen(m_ServerBindAddress, m_NetworkPort)) + { + if (LogFilter.logError) { Debug.LogError("StartServer listen on " + m_ServerBindAddress + " failed."); } + return false; + } + } + else + { + if (!NetworkServer.Listen(m_NetworkPort)) + { + if (LogFilter.logError) { Debug.LogError("StartServer listen failed."); } + return false; + } + } + } + + // this must be after Listen(), since that registers the default message handlers + RegisterServerMessages(); + + if (LogFilter.logDebug) { Debug.Log("NetworkManager StartServer port:" + m_NetworkPort); } + isNetworkActive = true; + + // Only change scene if the requested online scene is not blank, and is not already loaded + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (!string.IsNullOrEmpty(m_OnlineScene) && m_OnlineScene != loadedSceneName && m_OnlineScene != m_OfflineScene) + { + ServerChangeScene(m_OnlineScene); + } + else + { + NetworkServer.SpawnObjects(); + } + return true; + } + + internal void RegisterClientMessages(NetworkClient client) + { + client.RegisterHandler(MsgType.Connect, OnClientConnectInternal); + client.RegisterHandler(MsgType.Disconnect, OnClientDisconnectInternal); + client.RegisterHandler(MsgType.NotReady, OnClientNotReadyMessageInternal); + client.RegisterHandler(MsgType.Error, OnClientErrorInternal); + client.RegisterHandler(MsgType.Scene, OnClientSceneInternal); + + if (m_PlayerPrefab != null) + { + ClientScene.RegisterPrefab(m_PlayerPrefab); + } + for (int i = 0; i < m_SpawnPrefabs.Count; i++) + { + var prefab = m_SpawnPrefabs[i]; + if (prefab != null) + { + ClientScene.RegisterPrefab(prefab); + } + } + } + + /// + /// This allows the NetworkManager to use a client object created externally to the NetworkManager instead of using StartClient(). + /// The StartClient() function creates a client object, but this is not always what is desired. UseExternalClient allows a NetworkClient object to be created by other code and used with the NetworkManager. + /// The client object will have the standard NetworkManager message handlers registered on it. + /// + /// The NetworkClient object to use. + public void UseExternalClient(NetworkClient externalClient) + { + if (m_RunInBackground) + Application.runInBackground = true; + + if (externalClient != null) + { + client = externalClient; + isNetworkActive = true; + RegisterClientMessages(client); + OnStartClient(client); + } + else + { + OnStopClient(); + + // this should stop any game-related systems, but not close the connection + ClientScene.DestroyAllClientObjects(); + ClientScene.HandleClientDisconnect(client.connection); + client = null; + if (!string.IsNullOrEmpty(m_OfflineScene)) + { + ClientChangeScene(m_OfflineScene, false); + } + } + s_Address = m_NetworkAddress; + } + + public NetworkClient StartClient(MatchInfo info, ConnectionConfig config, int hostPort) + { + InitializeSingleton(); + + matchInfo = info; + if (m_RunInBackground) + Application.runInBackground = true; + + isNetworkActive = true; + + if (m_GlobalConfig != null) + { + NetworkManager.activeTransport.Init(m_GlobalConfig); + } + + client = new NetworkClient(); + client.hostPort = hostPort; + + if (config != null) + { + if ((config.UsePlatformSpecificProtocols) && (UnityEngine.Application.platform != RuntimePlatform.PS4)) + throw new ArgumentOutOfRangeException("Platform specific protocols are not supported on this platform"); + + client.Configure(config, 1); + } + else + { + if (m_CustomConfig && m_ConnectionConfig != null) + { + m_ConnectionConfig.Channels.Clear(); + for (int i = 0; i < m_Channels.Count; i++) + { + m_ConnectionConfig.AddChannel(m_Channels[i]); + } + if ((m_ConnectionConfig.UsePlatformSpecificProtocols) && (UnityEngine.Application.platform != RuntimePlatform.PS4)) + throw new ArgumentOutOfRangeException("Platform specific protocols are not supported on this platform"); + client.Configure(m_ConnectionConfig, m_MaxConnections); + } + } + + RegisterClientMessages(client); + if (matchInfo != null) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager StartClient match: " + matchInfo); } + client.Connect(matchInfo); + } + else if (m_EndPoint != null) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager StartClient using provided SecureTunnel"); } + client.Connect(m_EndPoint); + } + else + { + if (string.IsNullOrEmpty(m_NetworkAddress)) + { + if (LogFilter.logError) { Debug.LogError("Must set the Network Address field in the manager"); } + return null; + } + if (LogFilter.logDebug) { Debug.Log("NetworkManager StartClient address:" + m_NetworkAddress + " port:" + m_NetworkPort); } + + if (m_UseSimulator) + { + client.ConnectWithSimulator(m_NetworkAddress, m_NetworkPort, m_SimulatedLatency, m_PacketLossPercentage); + } + else + { + client.Connect(m_NetworkAddress, m_NetworkPort); + } + } + + if (m_MigrationManager != null) + { + m_MigrationManager.Initialize(client, matchInfo); + } + + OnStartClient(client); + s_Address = m_NetworkAddress; + return client; + } + + public NetworkClient StartClient(MatchInfo matchInfo) + { + return StartClient(matchInfo, null); + } + + /// + /// This starts a network client. It uses the networkAddress and networkPort properties as the address to connect to. + /// This makes the newly created client connect to the server immediately. + /// + /// The client object created. + public NetworkClient StartClient() + { + return StartClient(null, null); + } + + public NetworkClient StartClient(MatchInfo info, ConnectionConfig config) + { + return StartClient(info, config, 0); + } + + public virtual NetworkClient StartHost(ConnectionConfig config, int maxConnections) + { + OnStartHost(); + if (StartServer(null, config, maxConnections)) + { + var client = ConnectLocalClient(); + OnServerConnect(client.connection); + OnStartClient(client); + return client; + } + return null; + } + + public virtual NetworkClient StartHost(MatchInfo info) + { + OnStartHost(); + matchInfo = info; + if (StartServer(info)) + { + var client = ConnectLocalClient(); + OnStartClient(client); + return client; + } + return null; + } + + /// + /// This starts a network "host" - a server and client in the same application. + /// The client returned from StartHost() is a special "local" client that communicates to the in-process server using a message queue instead of the real network. But in almost all other cases, it can be treated as a normal client. + /// + /// The client object created - this is a "local client". + public virtual NetworkClient StartHost() + { + OnStartHost(); + if (StartServer()) + { + var localClient = ConnectLocalClient(); + OnStartClient(localClient); + return localClient; + } + return null; + } + + NetworkClient ConnectLocalClient() + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager StartHost port:" + m_NetworkPort); } + m_NetworkAddress = "localhost"; + client = ClientScene.ConnectLocalServer(); + RegisterClientMessages(client); + + if (m_MigrationManager != null) + { + m_MigrationManager.Initialize(client, matchInfo); + } + return client; + } + + /// + /// This stops both the client and the server that the manager is using. + /// + public void StopHost() + { + var serverWasActive = NetworkServer.active; + OnStopHost(); + + StopServer(); + StopClient(); + + if (m_MigrationManager != null) + { + if (serverWasActive) + { + m_MigrationManager.LostHostOnHost(); + } + } + } + + /// + /// Stops the server that the manager is using. + /// + public void StopServer() + { + if (!NetworkServer.active) + return; + + OnStopServer(); + + if (LogFilter.logDebug) { Debug.Log("NetworkManager StopServer"); } + isNetworkActive = false; + NetworkServer.Shutdown(); + StopMatchMaker(); + if (!string.IsNullOrEmpty(m_OfflineScene)) + { + ServerChangeScene(m_OfflineScene); + } + CleanupNetworkIdentities(); + } + + /// + /// Stops the client that the manager is using. + /// + public void StopClient() + { + OnStopClient(); + + if (LogFilter.logDebug) { Debug.Log("NetworkManager StopClient"); } + isNetworkActive = false; + if (client != null) + { + // only shutdown this client, not ALL clients. + client.Disconnect(); + client.Shutdown(); + client = null; + } + StopMatchMaker(); + + ClientScene.DestroyAllClientObjects(); + if (!string.IsNullOrEmpty(m_OfflineScene)) + { + ClientChangeScene(m_OfflineScene, false); + } + CleanupNetworkIdentities(); + } + + /// + /// This causes the server to switch scenes and sets the networkSceneName. + /// Clients that connect to this server will automatically switch to this scene. This is called autmatically if onlineScene or offlineScene are set, but it can be called from user code to switch scenes again while the game is in progress. This automatically sets clients to be not-ready. The clients must call NetworkClient.Ready() again to participate in the new scene. + /// + /// The name of the scene to change to. The server will change scene immediately, and a message will be sent to connected clients to ask them to change scene also. + public virtual void ServerChangeScene(string newSceneName) + { + if (string.IsNullOrEmpty(newSceneName)) + { + if (LogFilter.logError) { Debug.LogError("ServerChangeScene empty scene name"); } + return; + } + + if (LogFilter.logDebug) { Debug.Log("ServerChangeScene " + newSceneName); } + NetworkServer.SetAllClientsNotReady(); + networkSceneName = newSceneName; + + s_LoadingSceneAsync = SceneManager.LoadSceneAsync(newSceneName); + + StringMessage msg = new StringMessage(networkSceneName); + NetworkServer.SendToAll(MsgType.Scene, msg); + + s_StartPositionIndex = 0; + s_StartPositions.Clear(); + } + + void CleanupNetworkIdentities() + { + foreach (NetworkIdentity netId in Resources.FindObjectsOfTypeAll()) + { + netId.MarkForReset(); + } + } + + internal void ClientChangeScene(string newSceneName, bool forceReload) + { + if (string.IsNullOrEmpty(newSceneName)) + { + if (LogFilter.logError) { Debug.LogError("ClientChangeScene empty scene name"); } + return; + } + + if (LogFilter.logDebug) { Debug.Log("ClientChangeScene newSceneName:" + newSceneName + " networkSceneName:" + networkSceneName); } + + + if (newSceneName == networkSceneName) + { + if (m_MigrationManager != null) + { + // special case for rejoining a match after host migration + FinishLoadScene(); + return; + } + + if (!forceReload) + { + FinishLoadScene(); + return; + } + } + + s_LoadingSceneAsync = SceneManager.LoadSceneAsync(newSceneName); + networkSceneName = newSceneName; + } + + void FinishLoadScene() + { + // NOTE: this cannot use NetworkClient.allClients[0] - that client may be for a completely different purpose. + + if (client != null) + { + if (s_ClientReadyConnection != null) + { + m_ClientLoadedScene = true; + OnClientConnect(s_ClientReadyConnection); + s_ClientReadyConnection = null; + } + } + else + { + if (LogFilter.logDev) { Debug.Log("FinishLoadScene client is null"); } + } + + if (NetworkServer.active) + { + NetworkServer.SpawnObjects(); + OnServerSceneChanged(networkSceneName); + } + + if (IsClientConnected() && client != null) + { + RegisterClientMessages(client); + OnClientSceneChanged(client.connection); + } + } + + internal static void UpdateScene() + { +#if UNITY_EDITOR + // In the editor, reloading scripts in play mode causes a Mono Domain Reload. + // This gets the transport layer (C++) and HLAPI (C#) out of sync. + // This check below detects that problem and shuts down the transport layer to bring both systems back in sync. + if (singleton == null && s_PendingSingleton != null && s_DomainReload) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkManager detected a script reload in the editor. This has caused the network to be shut down."); } + + s_DomainReload = false; + s_PendingSingleton.InitializeSingleton(); + + // destroy network objects + var uvs = FindObjectsOfType(); + foreach (var uv in uvs) + { + GameObject.Destroy(uv.gameObject); + } + + singleton.StopHost(); + + NetworkManager.activeTransport.Shutdown(); + } +#endif + if (singleton == null) + return; + + if (s_LoadingSceneAsync == null) + return; + + if (!s_LoadingSceneAsync.isDone) + return; + + if (LogFilter.logDebug) { Debug.Log("ClientChangeScene done readyCon:" + s_ClientReadyConnection); } + singleton.FinishLoadScene(); + s_LoadingSceneAsync.allowSceneActivation = true; + s_LoadingSceneAsync = null; + } + + void OnDestroy() + { + if (LogFilter.logDev) { Debug.Log("NetworkManager destroyed"); } + } + + /// + /// Registers the transform of a game object as a player spawn location. + /// This is done automatically by NetworkStartPosition components, but can be done manually from user script code. + /// + /// Transform to register. + static public void RegisterStartPosition(Transform start) + { + if (LogFilter.logDebug) { Debug.Log("RegisterStartPosition: (" + start.gameObject.name + ") " + start.position); } + s_StartPositions.Add(start); + } + + /// + /// Unregisters the transform of a game object as a player spawn location. + /// This is done automatically by the NetworkStartPosition component, but can be done manually from user code. + /// + /// + static public void UnRegisterStartPosition(Transform start) + { + if (LogFilter.logDebug) { Debug.Log("UnRegisterStartPosition: (" + start.gameObject.name + ") " + start.position); } + s_StartPositions.Remove(start); + } + + /// + /// This checks if the NetworkManager has a client and that it is connected to a server. + /// This is more specific than NetworkClient.isActive, which will be true if there are any clients active, rather than just the NetworkManager's client. + /// + /// True if the NetworkManagers client is connected to a server. + public bool IsClientConnected() + { + return client != null && client.isConnected; + } + + /// + /// Shuts down the NetworkManager completely and destroy the singleton. + /// This is required if a new NetworkManager instance needs to be created after the original one was destroyed. The example below has a reference to the GameObject with the NetworkManager on it and destroys the instance before calling Shutdown() and switching scenes. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class SwitchToEmptyScene : MonoBehaviour + /// { + /// public GameObject NetworkManagerGameObject; + /// + /// void OnGUI() + /// { + /// if (GUI.Button(new Rect(10, 10, 200, 20), "Switch")) + /// { + /// Destroy(NetworkManagerGameObject); + /// NetworkManager.Shutdown(); + /// Application.LoadLevel("empty"); + /// } + /// } + /// } + /// + /// This cleanup allows a new scene with a new NetworkManager to be loaded. + /// + // this is the only way to clear the singleton, so another instance can be created. + static public void Shutdown() + { + if (singleton == null) + return; + + s_StartPositions.Clear(); + s_StartPositionIndex = 0; + s_ClientReadyConnection = null; + + singleton.StopHost(); + singleton = null; + } + + // ----------------------------- Server Internal Message Handlers -------------------------------- + + internal void OnServerConnectInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnServerConnectInternal"); } + + netMsg.conn.SetMaxDelay(m_MaxDelay); + + if (m_MaxBufferedPackets != ChannelBuffer.MaxBufferedPackets) + { + for (int channelId = 0; channelId < NetworkServer.numChannels; channelId++) + { + netMsg.conn.SetChannelOption(channelId, ChannelOption.MaxPendingBuffers, m_MaxBufferedPackets); + } + } + + if (!m_AllowFragmentation) + { + for (int channelId = 0; channelId < NetworkServer.numChannels; channelId++) + { + netMsg.conn.SetChannelOption(channelId, ChannelOption.AllowFragmentation, 0); + } + } + + if (networkSceneName != "" && networkSceneName != m_OfflineScene) + { + StringMessage msg = new StringMessage(networkSceneName); + netMsg.conn.Send(MsgType.Scene, msg); + } + + if (m_MigrationManager != null) + { + m_MigrationManager.SendPeerInfo(); + } + OnServerConnect(netMsg.conn); + } + + internal void OnServerDisconnectInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnServerDisconnectInternal"); } + + if (m_MigrationManager != null) + { + m_MigrationManager.SendPeerInfo(); + } + OnServerDisconnect(netMsg.conn); + } + + internal void OnServerReadyMessageInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnServerReadyMessageInternal"); } + + OnServerReady(netMsg.conn); + } + + internal void OnServerAddPlayerMessageInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnServerAddPlayerMessageInternal"); } + + netMsg.ReadMessage(s_AddPlayerMessage); + + if (s_AddPlayerMessage.msgSize != 0) + { + var reader = new NetworkReader(s_AddPlayerMessage.msgData); + OnServerAddPlayer(netMsg.conn, s_AddPlayerMessage.playerControllerId, reader); + } + else + { + OnServerAddPlayer(netMsg.conn, s_AddPlayerMessage.playerControllerId); + } + + if (m_MigrationManager != null) + { + m_MigrationManager.SendPeerInfo(); + } + } + + internal void OnServerRemovePlayerMessageInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnServerRemovePlayerMessageInternal"); } + + netMsg.ReadMessage(s_RemovePlayerMessage); + + PlayerController player; + netMsg.conn.GetPlayerController(s_RemovePlayerMessage.playerControllerId, out player); + OnServerRemovePlayer(netMsg.conn, player); + netMsg.conn.RemovePlayerController(s_RemovePlayerMessage.playerControllerId); + + if (m_MigrationManager != null) + { + m_MigrationManager.SendPeerInfo(); + } + } + + internal void OnServerErrorInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnServerErrorInternal"); } + + netMsg.ReadMessage(s_ErrorMessage); + OnServerError(netMsg.conn, s_ErrorMessage.errorCode); + } + + // ----------------------------- Client Internal Message Handlers -------------------------------- + + internal void OnClientConnectInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnClientConnectInternal"); } + + netMsg.conn.SetMaxDelay(m_MaxDelay); + + string loadedSceneName = SceneManager.GetSceneAt(0).name; + if (string.IsNullOrEmpty(m_OnlineScene) || (m_OnlineScene == m_OfflineScene) || (loadedSceneName == m_OnlineScene)) + { + m_ClientLoadedScene = false; + OnClientConnect(netMsg.conn); + } + else + { + // will wait for scene id to come from the server. + s_ClientReadyConnection = netMsg.conn; + } + } + + internal void OnClientDisconnectInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnClientDisconnectInternal"); } + + if (m_MigrationManager != null) + { + if (m_MigrationManager.LostHostOnClient(netMsg.conn)) + { + // should OnClientDisconnect be called? + return; + } + } + + if (!string.IsNullOrEmpty(m_OfflineScene)) + { + ClientChangeScene(m_OfflineScene, false); + } + + // If we have a valid connection here drop the client in the matchmaker before shutting down below + if (matchMaker != null && matchInfo != null && matchInfo.networkId != NetworkID.Invalid && matchInfo.nodeId != NodeID.Invalid) + { + matchMaker.DropConnection(matchInfo.networkId, matchInfo.nodeId, matchInfo.domain, OnDropConnection); + } + + OnClientDisconnect(netMsg.conn); + } + + internal void OnClientNotReadyMessageInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnClientNotReadyMessageInternal"); } + + ClientScene.SetNotReady(); + OnClientNotReady(netMsg.conn); + + // NOTE: s_ClientReadyConnection is not set here! don't want OnClientConnect to be invoked again after scene changes. + } + + internal void OnClientErrorInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnClientErrorInternal"); } + + netMsg.ReadMessage(s_ErrorMessage); + OnClientError(netMsg.conn, s_ErrorMessage.errorCode); + } + + internal void OnClientSceneInternal(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager:OnClientSceneInternal"); } + + string newSceneName = netMsg.reader.ReadString(); + + if (IsClientConnected() && !NetworkServer.active) + { + ClientChangeScene(newSceneName, true); + } + } + + // ----------------------------- Server System Callbacks -------------------------------- + + /// + /// Called on the server when a new client connects. + /// Unity calls this on the Server when a Client connects to the Server. Use an override to tell the NetworkManager what to do when a client connects to the server. + /// + /// //Attach this script to a GameObject and add a NetworkHUD component to the GameObject. + /// //Create a Text GameObject (Create>UI>Text) and attach it in the Text field in the Inspector. + /// //This script changes Text on the screen when a client connects to the server + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.UI; + /// + /// public class OnServerConnectExample : NetworkManager + /// { + /// //Assign a Text component in the GameObject's Inspector + /// public Text m_Text; + /// + /// //Detect when a client connects to the Server + /// public override void OnServerConnect(NetworkConnection connection) + /// { + /// //Change the text to show the connection and the client's ID + /// m_Text.text = "Client " + connection.connectionId + " Connected!"; + /// } + /// } + /// + /// + /// Connection from client. + public virtual void OnServerConnect(NetworkConnection conn) + { + } + + /// + /// Called on the server when a client disconnects. + /// This is called on the Server when a Client disconnects from the Server. Use an override to decide what should happen when a disconnection is detected. + /// + /// //This script outputs a message when a client connects or disconnects from the server + /// //Attach this script to your GameObject. + /// //Attach a NetworkManagerHUD to your by clicking Add Component in the Inspector window of the GameObject. Then go to Network>NetworkManagerHUD. + /// //Create a Text GameObject and attach it to the Text field in the Inspector. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.UI; + /// + /// public class Example : NetworkManager + /// { + /// //Assign a Text component in the GameObject's Inspector + /// public Text m_Text; + /// + /// //Detect when a client connects to the Server + /// public override void OnServerConnect(NetworkConnection connection) + /// { + /// //Change the text to show the connection + /// m_Text.text = "Client " + connection.connectionId + " Connected!"; + /// } + /// + /// //Detect when a client disconnects from the Server + /// public override void OnServerDisconnect(NetworkConnection connection) + /// { + /// //Change the text to show the loss of connection + /// m_Text.text = "Client " + connection.connectionId + "Connection Lost!"; + /// } + /// } + /// + /// + /// Connection from client. + public virtual void OnServerDisconnect(NetworkConnection conn) + { + NetworkServer.DestroyPlayersForConnection(conn); + if (conn.lastError != NetworkError.Ok) + { + if (LogFilter.logError) { Debug.LogError("ServerDisconnected due to error: " + conn.lastError); } + } + } + + /// + /// Called on the server when a client is ready. + /// The default implementation of this function calls NetworkServer.SetClientReady() to continue the network setup process. + /// + /// Connection from client. + public virtual void OnServerReady(NetworkConnection conn) + { + if (conn.playerControllers.Count == 0) + { + // this is now allowed (was not for a while) + if (LogFilter.logDebug) { Debug.Log("Ready with no player object"); } + } + NetworkServer.SetClientReady(conn); + } + + /// + /// Called on the server when a client adds a new player with ClientScene.AddPlayer. + /// The default implementation for this function creates a new player object from the playerPrefab. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.Networking.NetworkSystem; + /// + /// class MyManager : NetworkManager + /// { + /// public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId, NetworkReader extraMessageReader) + /// { + /// if (extraMessageReader != null) + /// { + /// var s = extraMessageReader.ReadMessage<StringMessage>(); + /// Debug.Log("my name is " + s.value); + /// } + /// OnServerAddPlayer(conn, playerControllerId, extraMessageReader); + /// } + /// } + /// + /// + /// Connection from client. + /// Id of the new player. + /// An extra message object passed for the new player. + public virtual void OnServerAddPlayer(NetworkConnection conn, short playerControllerId, NetworkReader extraMessageReader) + { + OnServerAddPlayerInternal(conn, playerControllerId); + } + + public virtual void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) + { + OnServerAddPlayerInternal(conn, playerControllerId); + } + + void OnServerAddPlayerInternal(NetworkConnection conn, short playerControllerId) + { + if (m_PlayerPrefab == null) + { + if (LogFilter.logError) { Debug.LogError("The PlayerPrefab is empty on the NetworkManager. Please setup a PlayerPrefab object."); } + return; + } + + if (m_PlayerPrefab.GetComponent() == null) + { + if (LogFilter.logError) { Debug.LogError("The PlayerPrefab does not have a NetworkIdentity. Please add a NetworkIdentity to the player prefab."); } + return; + } + + if (playerControllerId < conn.playerControllers.Count && conn.playerControllers[playerControllerId].IsValid && conn.playerControllers[playerControllerId].gameObject != null) + { + if (LogFilter.logError) { Debug.LogError("There is already a player at that playerControllerId for this connections."); } + return; + } + + GameObject player; + Transform startPos = GetStartPosition(); + if (startPos != null) + { + player = (GameObject)Instantiate(m_PlayerPrefab, startPos.position, startPos.rotation); + } + else + { + player = (GameObject)Instantiate(m_PlayerPrefab, Vector3.zero, Quaternion.identity); + } + + NetworkServer.AddPlayerForConnection(conn, player, playerControllerId); + } + + /// + /// This finds a spawn position based on NetworkStartPosition objects in the scene. + /// This is used by the default implementation of OnServerAddPlayer. + /// + /// Returns the transform to spawn a player at, or null. + public Transform GetStartPosition() + { + // first remove any dead transforms + if (s_StartPositions.Count > 0) + { + for (int i = s_StartPositions.Count - 1; i >= 0; i--) + { + if (s_StartPositions[i] == null) + s_StartPositions.RemoveAt(i); + } + } + + if (m_PlayerSpawnMethod == PlayerSpawnMethod.Random && s_StartPositions.Count > 0) + { + // try to spawn at a random start location + int index = Random.Range(0, s_StartPositions.Count); + return s_StartPositions[index]; + } + if (m_PlayerSpawnMethod == PlayerSpawnMethod.RoundRobin && s_StartPositions.Count > 0) + { + if (s_StartPositionIndex >= s_StartPositions.Count) + { + s_StartPositionIndex = 0; + } + + Transform startPos = s_StartPositions[s_StartPositionIndex]; + s_StartPositionIndex += 1; + return startPos; + } + return null; + } + + /// + /// Called on the server when a client removes a player. + /// The default implementation of this function destroys the corresponding player object. + /// + /// The connection to remove the player from. + /// The player controller to remove. + public virtual void OnServerRemovePlayer(NetworkConnection conn, PlayerController player) + { + if (player.gameObject != null) + { + NetworkServer.Destroy(player.gameObject); + } + } + + /// + /// Called on the server when a network error occurs for a client connection. + /// + /// Connection from client. + /// Error code. + public virtual void OnServerError(NetworkConnection conn, int errorCode) + { + } + + /// + /// Called on the server when a scene is completed loaded, when the scene load was initiated by the server with ServerChangeScene(). + /// + /// The name of the new scene. + public virtual void OnServerSceneChanged(string sceneName) + { + } + + // ----------------------------- Client System Callbacks -------------------------------- + + /// + /// Called on the client when connected to a server. + /// The default implementation of this function sets the client as ready and adds a player. Override the function to dictate what happens when the client connects. + /// + /// //Attach this script to a GameObject + /// //Create a Text GameObject(Create>UI>Text) and attach it to the Text field in the Inspector window + /// //This script changes the Text depending on if a client connects or disconnects to the server + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.UI; + /// + /// public class Example : NetworkManager + /// { + /// //Assign a Text component in the GameObject's Inspector + /// public Text m_ClientText; + /// + /// //Detect when a client connects to the Server + /// public override void OnClientConnect(NetworkConnection connection) + /// { + /// //Change the text to show the connection on the client side + /// m_ClientText.text = " " + connection.connectionId + " Connected!"; + /// } + /// + /// //Detect when a client connects to the Server + /// public override void OnClientDisconnect(NetworkConnection connection) + /// { + /// //Change the text to show the connection loss on the client side + /// m_ClientText.text = "Connection" + connection.connectionId + " Lost!"; + /// } + /// } + /// + /// + /// Connection to the server. + public virtual void OnClientConnect(NetworkConnection conn) + { + if (!clientLoadedScene) + { + // Ready/AddPlayer is usually triggered by a scene load completing. if no scene was loaded, then Ready/AddPlayer it here instead. + ClientScene.Ready(conn); + if (m_AutoCreatePlayer) + { + ClientScene.AddPlayer(0); + } + } + } + + /// + /// Called on clients when disconnected from a server. + /// This is called on the client when it disconnects from the server. Override this function to decide what happens when the client disconnects. + /// + /// //Attach this script to a GameObject + /// //Create a Text GameObject(Create>UI>Text) and attach it to the Text field in the Inspector window + /// //This script changes the Text depending on if a client connects or disconnects to the server + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.UI; + /// + /// public class OnClientConnectExample : NetworkManager + /// { + /// //Assign a Text component in the GameObject's Inspector + /// public Text m_ClientText; + /// + /// //Detect when a client connects to the Server + /// public override void OnClientConnect(NetworkConnection connection) + /// { + /// //Change the text to show the connection on the client side + /// m_ClientText.text = " " + connection.connectionId + " Connected!"; + /// } + /// + /// //Detect when a client connects to the Server + /// public override void OnClientDisconnect(NetworkConnection connection) + /// { + /// //Change the text to show the connection loss on the client side + /// m_ClientText.text = "Connection" + connection.connectionId + " Lost!"; + /// } + /// } + /// + /// + /// Connection to the server. + public virtual void OnClientDisconnect(NetworkConnection conn) + { + StopClient(); + if (conn.lastError != NetworkError.Ok) + { + if (LogFilter.logError) { Debug.LogError("ClientDisconnected due to error: " + conn.lastError); } + } + } + + /// + /// Called on clients when a network error occurs. + /// + /// Connection to a server. + /// Error code. + public virtual void OnClientError(NetworkConnection conn, int errorCode) + { + } + + /// + /// Called on clients when a servers tells the client it is no longer ready. + /// This is commonly used when switching scenes. + /// + /// Connection to a server. + public virtual void OnClientNotReady(NetworkConnection conn) + { + } + + /// + /// Called on clients when a scene has completed loaded, when the scene load was initiated by the server. + /// Scene changes can cause player objects to be destroyed. The default implementation of OnClientSceneChanged in the NetworkManager is to add a player object for the connection if no player object exists. + /// + /// The network connection that the scene change message arrived on. + public virtual void OnClientSceneChanged(NetworkConnection conn) + { + // always become ready. + ClientScene.Ready(conn); + + if (!m_AutoCreatePlayer) + { + return; + } + + bool addPlayer = (ClientScene.localPlayers.Count == 0); + bool foundPlayer = false; + for (int i = 0; i < ClientScene.localPlayers.Count; i++) + { + if (ClientScene.localPlayers[i].gameObject != null) + { + foundPlayer = true; + break; + } + } + if (!foundPlayer) + { + // there are players, but their game objects have all been deleted + addPlayer = true; + } + if (addPlayer) + { + ClientScene.AddPlayer(0); + } + } + + // ----------------------------- Matchmaker -------------------------------- + + /// + /// This starts MatchMaker for the NetworkManager. + /// This uses the matchHost and matchPort properties as the address of the MatchMaker service to connect to. Please call SetMatchHost prior to calling this function if you are not using the default MatchMaker address. + /// + public void StartMatchMaker() + { + if (LogFilter.logDebug) { Debug.Log("NetworkManager StartMatchMaker"); } + SetMatchHost(m_MatchHost, m_MatchPort, m_MatchPort == 443); + } + + /// + /// Stops the MatchMaker that the NetworkManager is using. + /// This should be called after a match is complete and before starting or joining a new match. + /// + public void StopMatchMaker() + { + // If we have a valid connection here drop the client in the matchmaker before shutting down below + if (matchMaker != null && matchInfo != null && matchInfo.networkId != NetworkID.Invalid && matchInfo.nodeId != NodeID.Invalid) + { + matchMaker.DropConnection(matchInfo.networkId, matchInfo.nodeId, matchInfo.domain, OnDropConnection); + } + + if (matchMaker != null) + { + Destroy(matchMaker); + matchMaker = null; + } + matchInfo = null; + matches = null; + } + + /// + /// This sets the address of the MatchMaker service. + /// The default address for the MatchMaker is mm.unet.unity3d.com That will connect a client to the nearest datacenter geographically. However because data centers are siloed from each other, players will only see matches occurring inside the data center they are currently connected to. If a player of your game is traveling to another part of the world, for instance, they may interact with a different set of players that are in that data center. You can override this behavior by specifying a particular data center. Keep in mind generally as distance grows so does latency, which is why we run data centers spread out over the world. + /// To connect to a specific data center use one of the following addresses: + /// United States: us1-mm.unet.unity3d.com Europe: eu1-mm.unet.unity3d.com Singapore: ap1-mm.unet.unity3d.com. + /// + /// Hostname of MatchMaker service. + /// Port of MatchMaker service. + /// Protocol used by MatchMaker service. + public void SetMatchHost(string newHost, int port, bool https) + { + if (matchMaker == null) + { + matchMaker = gameObject.AddComponent(); + } + if (newHost == "127.0.0.1") + { + newHost = "localhost"; + } + string prefix = "http://"; + if (https) + { + prefix = "https://"; + } + + if (newHost.StartsWith("http://")) + { + newHost = newHost.Replace("http://", ""); + } + if (newHost.StartsWith("https://")) + { + newHost = newHost.Replace("https://", ""); + } + + m_MatchHost = newHost; + m_MatchPort = port; + + string fullURI = prefix + m_MatchHost + ":" + m_MatchPort; + if (LogFilter.logDebug) { Debug.Log("SetMatchHost:" + fullURI); } + matchMaker.baseUri = new Uri(fullURI); + } + + //------------------------------ Start & Stop callbacks ----------------------------------- + + // Since there are multiple versions of StartServer, StartClient and StartHost, to reliably customize + // their functionality, users would need override all the versions. Instead these callbacks are invoked + // from all versions, so users only need to implement this one case. + + /// + /// This hook is invoked when a host is started. + /// StartHost has multiple signatures, but they all cause this hook to be called. + /// + public virtual void OnStartHost() + { + } + + /// + /// This hook is invoked when a server is started - including when a host is started. + /// StartServer has multiple signatures, but they all cause this hook to be called. + /// + public virtual void OnStartServer() + { + } + + /// + /// This is a hook that is invoked when the client is started. + /// StartClient has multiple signatures, but they all cause this hook to be called. + /// + /// The NetworkClient object that was started. + public virtual void OnStartClient(NetworkClient client) + { + } + + /// + /// This hook is called when a server is stopped - including when a host is stopped. + /// + public virtual void OnStopServer() + { + } + + /// + /// This hook is called when a client is stopped. + /// + public virtual void OnStopClient() + { + } + + /// + /// This hook is called when a host is stopped. + /// + public virtual void OnStopHost() + { + } + + //------------------------------ Matchmaker callbacks ----------------------------------- + + /// + /// Callback that happens when a NetworkMatch.CreateMatch request has been processed on the server. + /// + /// Indicates if the request succeeded. + /// A text description for the error if success is false. + /// The information about the newly created match. + public virtual void OnMatchCreate(bool success, string extendedInfo, MatchInfo matchInfo) + { + if (LogFilter.logDebug) { Debug.LogFormat("NetworkManager OnMatchCreate Success:{0}, ExtendedInfo:{1}, matchInfo:{2}", success, extendedInfo, matchInfo); } + + if (success) + StartHost(matchInfo); + } + + /// + /// Callback that happens when a NetworkMatch.ListMatches request has been processed on the server. + /// + /// Indicates if the request succeeded. + /// A text description for the error if success is false. + /// A list of matches corresponding to the filters set in the initial list request. + public virtual void OnMatchList(bool success, string extendedInfo, List matchList) + { + if (LogFilter.logDebug) { Debug.LogFormat("NetworkManager OnMatchList Success:{0}, ExtendedInfo:{1}, matchList.Count:{2}", success, extendedInfo, matchList.Count); } + + matches = matchList; + } + + /// + /// Callback that happens when a NetworkMatch.JoinMatch request has been processed on the server. + /// + /// Indicates if the request succeeded. + /// A text description for the error if success is false. + /// The info for the newly joined match. + public virtual void OnMatchJoined(bool success, string extendedInfo, MatchInfo matchInfo) + { + if (LogFilter.logDebug) { Debug.LogFormat("NetworkManager OnMatchJoined Success:{0}, ExtendedInfo:{1}, matchInfo:{2}", success, extendedInfo, matchInfo); } + + if (success) + StartClient(matchInfo); + } + + /// + /// Callback that happens when a NetworkMatch.DestroyMatch request has been processed on the server. /// + /// Indicates if the request succeeded. + /// A text description for the error if success is false. + public virtual void OnDestroyMatch(bool success, string extendedInfo) + { + if (LogFilter.logDebug) { Debug.LogFormat("NetworkManager OnDestroyMatch Success:{0}, ExtendedInfo:{1}", success, extendedInfo); } + } + + /// + /// Callback that happens when a NetworkMatch.DropConnection match request has been processed on the server. + /// + /// Indicates if the request succeeded. + /// A text description for the error if success is false. + public virtual void OnDropConnection(bool success, string extendedInfo) + { + if (LogFilter.logDebug) { Debug.LogFormat("NetworkManager OnDropConnection Success:{0}, ExtendedInfo:{1}", success, extendedInfo); } + } + + /// + /// Callback that happens when a NetworkMatch.SetMatchAttributes has been processed on the server. + /// + /// Indicates if the request succeeded. + /// A text description for the error if success is false. + public virtual void OnSetMatchAttributes(bool success, string extendedInfo) + { + if (LogFilter.logDebug) { Debug.LogFormat("NetworkManager OnSetMatchAttributes Success:{0}, ExtendedInfo:{1}", success, extendedInfo); } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManager.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManager.cs.meta new file mode 100644 index 00000000..fa35ff3a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 10c2fd873b12541b392f10ecc4846574 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManagerHUD.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManagerHUD.cs new file mode 100644 index 00000000..9f404a29 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManagerHUD.cs @@ -0,0 +1,288 @@ +using System; +using System.ComponentModel; + +namespace UnityEngine.Networking +{ + /// + /// An extension for the NetworkManager that displays a default HUD for controlling the network state of the game. + /// This component also shows useful internal state for the networking system in the inspector window of the editor. It allows users to view connections, networked objects, message handlers, and packet statistics. This information can be helpful when debugging networked games. + /// + [AddComponentMenu("Network/NetworkManagerHUD")] + [RequireComponent(typeof(NetworkManager))] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkManagerHUD : MonoBehaviour + { + /// + /// The NetworkManager associated with this HUD. + /// + public NetworkManager manager; + /// + /// Whether to show the default control HUD at runtime. + /// + [SerializeField] public bool showGUI = true; + /// + /// The horizontal offset in pixels to draw the HUD runtime GUI at. + /// + [SerializeField] public int offsetX; + /// + /// The vertical offset in pixels to draw the HUD runtime GUI at. + /// + [SerializeField] public int offsetY; + + // Runtime variable + bool m_ShowServer; + + void Awake() + { + manager = GetComponent(); + } + + void Update() + { + if (!showGUI) + return; + + if (!manager.IsClientConnected() && !NetworkServer.active && manager.matchMaker == null) + { + if (UnityEngine.Application.platform != RuntimePlatform.WebGLPlayer) + { + if (Input.GetKeyDown(KeyCode.S)) + { + manager.StartServer(); + } + if (Input.GetKeyDown(KeyCode.H)) + { + manager.StartHost(); + } + } + if (Input.GetKeyDown(KeyCode.C)) + { + manager.StartClient(); + } + } + if (NetworkServer.active) + { + if (manager.IsClientConnected()) + { + if (Input.GetKeyDown(KeyCode.X)) + { + manager.StopHost(); + } + } + else + { + if (Input.GetKeyDown(KeyCode.X)) + { + manager.StopServer(); + } + } + } + } + + void OnGUI() + { + if (!showGUI) + return; + + int xpos = 10 + offsetX; + int ypos = 40 + offsetY; + const int spacing = 24; + + bool noConnection = (manager.client == null || manager.client.connection == null || + manager.client.connection.connectionId == -1); + + if (!manager.IsClientConnected() && !NetworkServer.active && manager.matchMaker == null) + { + if (noConnection) + { + if (UnityEngine.Application.platform != RuntimePlatform.WebGLPlayer) + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "LAN Host(H)")) + { + manager.StartHost(); + } + ypos += spacing; + } + + if (GUI.Button(new Rect(xpos, ypos, 105, 20), "LAN Client(C)")) + { + manager.StartClient(); + } + + manager.networkAddress = GUI.TextField(new Rect(xpos + 100, ypos, 95, 20), manager.networkAddress); + ypos += spacing; + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + // cant be a server in webgl build + GUI.Box(new Rect(xpos, ypos, 200, 25), "( WebGL cannot be server )"); + ypos += spacing; + } + else + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "LAN Server Only(S)")) + { + manager.StartServer(); + } + ypos += spacing; + } + } + else + { + GUI.Label(new Rect(xpos, ypos, 200, 20), "Connecting to " + manager.networkAddress + ":" + manager.networkPort + ".."); + ypos += spacing; + + + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Cancel Connection Attempt")) + { + manager.StopClient(); + } + } + } + else + { + if (NetworkServer.active) + { + string serverMsg = "Server: port=" + manager.networkPort; + if (manager.useWebSockets) + { + serverMsg += " (Using WebSockets)"; + } + GUI.Label(new Rect(xpos, ypos, 300, 20), serverMsg); + ypos += spacing; + } + if (manager.IsClientConnected()) + { + GUI.Label(new Rect(xpos, ypos, 300, 20), "Client: address=" + manager.networkAddress + " port=" + manager.networkPort); + ypos += spacing; + } + } + + if (manager.IsClientConnected() && !ClientScene.ready) + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Client Ready")) + { + ClientScene.Ready(manager.client.connection); + + if (ClientScene.localPlayers.Count == 0) + { + ClientScene.AddPlayer(0); + } + } + ypos += spacing; + } + + if (NetworkServer.active || manager.IsClientConnected()) + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Stop (X)")) + { + manager.StopHost(); + } + ypos += spacing; + } + + if (!NetworkServer.active && !manager.IsClientConnected() && noConnection) + { + ypos += 10; + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + GUI.Box(new Rect(xpos - 5, ypos, 220, 25), "(WebGL cannot use Match Maker)"); + return; + } + + if (manager.matchMaker == null) + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Enable Match Maker (M)")) + { + manager.StartMatchMaker(); + } + ypos += spacing; + } + else + { + if (manager.matchInfo == null) + { + if (manager.matches == null) + { + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Create Internet Match")) + { + manager.matchMaker.CreateMatch(manager.matchName, manager.matchSize, true, "", "", "", 0, 0, manager.OnMatchCreate); + } + ypos += spacing; + + GUI.Label(new Rect(xpos, ypos, 100, 20), "Room Name:"); + manager.matchName = GUI.TextField(new Rect(xpos + 100, ypos, 100, 20), manager.matchName); + ypos += spacing; + + ypos += 10; + + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Find Internet Match")) + { + manager.matchMaker.ListMatches(0, 20, "", false, 0, 0, manager.OnMatchList); + } + ypos += spacing; + } + else + { + for (int i = 0; i < manager.matches.Count; i++) + { + var match = manager.matches[i]; + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Join Match:" + match.name)) + { + manager.matchName = match.name; + manager.matchMaker.JoinMatch(match.networkId, "", "", "", 0, 0, manager.OnMatchJoined); + } + ypos += spacing; + } + + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Back to Match Menu")) + { + manager.matches = null; + } + ypos += spacing; + } + } + + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Change MM server")) + { + m_ShowServer = !m_ShowServer; + } + if (m_ShowServer) + { + ypos += spacing; + if (GUI.Button(new Rect(xpos, ypos, 100, 20), "Local")) + { + manager.SetMatchHost("localhost", 1337, false); + m_ShowServer = false; + } + ypos += spacing; + if (GUI.Button(new Rect(xpos, ypos, 100, 20), "Internet")) + { + manager.SetMatchHost("mm.unet.unity3d.com", 443, true); + m_ShowServer = false; + } + ypos += spacing; + if (GUI.Button(new Rect(xpos, ypos, 100, 20), "Staging")) + { + manager.SetMatchHost("staging-mm.unet.unity3d.com", 443, true); + m_ShowServer = false; + } + } + + ypos += spacing; + + GUI.Label(new Rect(xpos, ypos, 300, 20), "MM Uri: " + manager.matchMaker.baseUri); + ypos += spacing; + + if (GUI.Button(new Rect(xpos, ypos, 200, 20), "Disable Match Maker")) + { + manager.StopMatchMaker(); + } + ypos += spacing; + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManagerHUD.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManagerHUD.cs.meta new file mode 100644 index 00000000..0badc858 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkManagerHUD.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4394a3eef724546f896557197e2d6c44 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMessageHandlers.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMessageHandlers.cs new file mode 100644 index 00000000..60e8e117 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMessageHandlers.cs @@ -0,0 +1,79 @@ +#if ENABLE_UNET +using System; +using System.Collections.Generic; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + internal class NetworkMessageHandlers + { + Dictionary m_MsgHandlers = new Dictionary(); + + internal void RegisterHandlerSafe(short msgType, NetworkMessageDelegate handler) + { + if (handler == null) + { + if (LogFilter.logError) { Debug.LogError("RegisterHandlerSafe id:" + msgType + " handler is null"); } + return; + } + + if (LogFilter.logDebug) { Debug.Log("RegisterHandlerSafe id:" + msgType + " handler:" + handler.GetMethodName()); } + if (m_MsgHandlers.ContainsKey(msgType)) + { + //if (LogFilter.logError) { Debug.LogError("RegisterHandlerSafe id:" + msgType + " handler:" + handler.GetMethodName() + " conflict"); } + return; + } + m_MsgHandlers.Add(msgType, handler); + } + + public void RegisterHandler(short msgType, NetworkMessageDelegate handler) + { + if (handler == null) + { + if (LogFilter.logError) { Debug.LogError("RegisterHandler id:" + msgType + " handler is null"); } + return; + } + + if (msgType <= MsgType.InternalHighest) + { + if (LogFilter.logError) { Debug.LogError("RegisterHandler: Cannot replace system message handler " + msgType); } + return; + } + + if (m_MsgHandlers.ContainsKey(msgType)) + { + if (LogFilter.logDebug) { Debug.Log("RegisterHandler replacing " + msgType); } + + m_MsgHandlers.Remove(msgType); + } + if (LogFilter.logDebug) { Debug.Log("RegisterHandler id:" + msgType + " handler:" + handler.GetMethodName()); } + m_MsgHandlers.Add(msgType, handler); + } + + public void UnregisterHandler(short msgType) + { + m_MsgHandlers.Remove(msgType); + } + + internal NetworkMessageDelegate GetHandler(short msgType) + { + if (m_MsgHandlers.ContainsKey(msgType)) + { + return m_MsgHandlers[msgType]; + } + return null; + } + + internal Dictionary GetHandlers() + { + return m_MsgHandlers; + } + + internal void ClearMessageHandlers() + { + m_MsgHandlers.Clear(); + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMessageHandlers.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMessageHandlers.cs.meta new file mode 100644 index 00000000..ebe703b8 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMessageHandlers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d5945752582884f7fb1bb2cdba62b738 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMigrationManager.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMigrationManager.cs new file mode 100644 index 00000000..88c2b814 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMigrationManager.cs @@ -0,0 +1,1145 @@ + +using System; +using System.Collections.Generic; +using UnityEngine.Networking.Match; +using UnityEngine.Networking.NetworkSystem; +using UnityEngine.Networking.Types; + +namespace UnityEngine.Networking +{ + /// + /// A component that manages the process of a new host taking over a game when the old host is lost. This is referred to as "host migration". The migration manager sends information about each peer in the game to all the clients, and when the host is lost because of a crash or network outage, the clients are able to choose a new host, and continue the game. + /// The old host is able to rejoin the new game on the new host. + /// The state of SyncVars and SyncLists on all objects with NetworkIdentities in the scene is maintained during a host migration. This also applies to custom serialized data for objects. + /// All of the player objects in the game are disabled when the host is lost. Then, when the other clients rejoin the new game on the new host, the corresponding players for those clients are re-enabled on the host, and respawned on the other clients. No player state data is lost during a host migration. + /// This class provides a simple default UI for controlling the behaviour when the host is lost. The UI can be disabled with the showGUI property. There are a number of virtual functions that can be implemented to customize the behaviour of host migration. + /// Note that only data that is available to clients will be preserved during a host migration. If there is data that is only on the server, then it will not be available to the client that becomes the new host. This means data on the host that is not in SyncVars or SyncLists will not be available after a host migration. + /// The callback function OnStartServer is invoked for all networked objects when the client becomes a new host. + /// On the new host, the NetworkMigrationManager uses the function NetworkServer.BecomeNewHost() to construct a networked server scene from the state in the current ClientScene. + /// The peers in a game with host migration enabled are identified by their connectionId on the server. When a client reconnects to the new host of a game, this connectionId is passed to the new host so that it can match this client with the client that was connected to the old host. This Id is set on the ClientScene as the "reconnectId". + /// The old host of the game, the one that crashed or lost its network connection, can also reconnect to the new game as a client. This client uses the special ReconnectId of ClientScene.ReconnectIdHost (which is zero). + /// + [AddComponentMenu("Network/NetworkMigrationManager")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkMigrationManager : MonoBehaviour + { + /// + /// An enumeration of how to handle scene changes when the connection to the host is lost. + /// + public enum SceneChangeOption + { + /// + /// The client should stay in the online scene. + /// + StayInOnlineScene, + /// + /// The client should return to the offline scene. + /// + SwitchToOfflineScene + } + + [SerializeField] + bool m_HostMigration = true; + + [SerializeField] + bool m_ShowGUI = true; + + [SerializeField] + int m_OffsetX = 10; + + [SerializeField] + int m_OffsetY = 300; + + NetworkClient m_Client; + bool m_WaitingToBecomeNewHost; + bool m_WaitingReconnectToNewHost; + bool m_DisconnectedFromHost; + bool m_HostWasShutdown; + + MatchInfo m_MatchInfo; + int m_OldServerConnectionId = -1; + string m_NewHostAddress; + + PeerInfoMessage m_NewHostInfo = new PeerInfoMessage(); + PeerListMessage m_PeerListMessage = new PeerListMessage(); + + PeerInfoMessage[] m_Peers; + + /// + /// Information about a player object from another peer. + /// + // There can be multiple pending players for a connectionId, distinguished by oldNetId/playerControllerId + public struct PendingPlayerInfo + { + /// + /// The networkId of the player object. + /// + public NetworkInstanceId netId; + /// + /// The playerControllerId of the player GameObject. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public short playerControllerId; + /// + /// The gameObject for the player. + /// + public GameObject obj; + } + + /// + /// The player objects for connections to the old host. + /// This is used when clients reconnect to the new host. + /// + public struct ConnectionPendingPlayers + { + /// + /// The list of players for a connection. + /// + public List players; + } + Dictionary m_PendingPlayers = new Dictionary(); + + void AddPendingPlayer(GameObject obj, int connectionId, NetworkInstanceId netId, short playerControllerId) + { + if (!m_PendingPlayers.ContainsKey(connectionId)) + { + var pending = new ConnectionPendingPlayers(); + pending.players = new List(); + m_PendingPlayers[connectionId] = pending; + } + PendingPlayerInfo info = new PendingPlayerInfo(); + info.netId = netId; + info.playerControllerId = playerControllerId; + info.obj = obj; + m_PendingPlayers[connectionId].players.Add(info); + } + + GameObject FindPendingPlayer(int connectionId, NetworkInstanceId netId, short playerControllerId) + { + if (m_PendingPlayers.ContainsKey(connectionId)) + { + for (int i = 0; i < m_PendingPlayers[connectionId].players.Count; i++) + { + var info = m_PendingPlayers[connectionId].players[i]; + if (info.netId == netId && info.playerControllerId == playerControllerId) + { + return info.obj; + } + } + } + return null; + } + + void RemovePendingPlayer(int connectionId) + { + m_PendingPlayers.Remove(connectionId); + } + + /// + /// Controls whether host migration is active. + /// If this is not true, then SendPeerInfo() will not send peer information to clients. + /// + public bool hostMigration + { + get { return m_HostMigration; } + set { m_HostMigration = value; } + } + + /// + /// Flag to toggle display of the default UI. + /// + public bool showGUI + { + get { return m_ShowGUI; } + set { m_ShowGUI = value; } + } + + /// + /// The X offset in pixels of the migration manager default GUI. + /// + public int offsetX + { + get { return m_OffsetX; } + set { m_OffsetX = value; } + } + + /// + /// The Y offset in pixels of the migration manager default GUI. + /// + public int offsetY + { + get { return m_OffsetY; } + set { m_OffsetY = value; } + } + + /// + /// The client instance that is being used to connect to the host. + /// This is populated by the Initialize() method. It will be set automatically by the NetworkManager if one is being used. + /// + public NetworkClient client + { + get { return m_Client; } + } + + /// + /// True if this is a client that was disconnected from the host, and was chosen as the new host. + /// + public bool waitingToBecomeNewHost + { + get { return m_WaitingToBecomeNewHost; } + set { m_WaitingToBecomeNewHost = value; } + } + + /// + /// True if this is a client that was disconnected from the host and is now waiting to reconnect to the new host. + /// + public bool waitingReconnectToNewHost + { + get { return m_WaitingReconnectToNewHost; } + set { m_WaitingReconnectToNewHost = value; } + } + + /// + /// True is this is a client that has been disconnected from a host. + /// + public bool disconnectedFromHost + { + get { return m_DisconnectedFromHost; } + } + + /// + /// True if this was the host and the host has been shut down. + /// + public bool hostWasShutdown + { + get { return m_HostWasShutdown; } + } + + /// + /// Information about the match. This may be null if there is no match. + /// + public MatchInfo matchInfo + { + get { return m_MatchInfo; } + } + + /// + /// The connectionId that this client was assign on the old host. + /// This is the Id that will be set on the ClientScene as the ReconnectId. This Id will be used to identify the client when it connects to the new host. + /// + public int oldServerConnectionId + { + get { return m_OldServerConnectionId; } + } + + /// + /// The IP address of the new host to connect to. + /// The FindNewHost utility function will set this address. Methods of choosing the new host that are implemented by users should also set this address. + /// The default UI button to "Reconnect to New Host" uses this address. + /// + public string newHostAddress + { + get { return m_NewHostAddress; } + set { m_NewHostAddress = value; } + } + + /// + /// The set of peers involved in the game. This includes the host and this client. + /// This is populated on clients when they recieve a MsgType.NetworkInfo message from the host. That message is sent when SendPeerInfo() is called on the host. + /// + public PeerInfoMessage[] peers + { + get { return m_Peers; } + } + + /// + /// The player objects that have been disabled, and are waiting for their corresponding clients to reconnect. + /// There may be multiple pending player GameObjects for each peer. Each will have a different playerControllerId. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public Dictionary pendingPlayers + { + get { return m_PendingPlayers; } + } + + void Start() + { + Reset(ClientScene.ReconnectIdInvalid); + } + + /// + /// Resets the migration manager, and sets the ClientScene's ReconnectId. + /// + /// The connectionId for the ClientScene to use when reconnecting. + public void Reset(int reconnectId) + { + m_OldServerConnectionId = -1; + m_WaitingToBecomeNewHost = false; + m_WaitingReconnectToNewHost = false; + m_DisconnectedFromHost = false; + m_HostWasShutdown = false; + ClientScene.SetReconnectId(reconnectId, m_Peers); + + if (NetworkManager.singleton != null) + { + NetworkManager.singleton.SetupMigrationManager(this); + } + } + + internal void AssignAuthorityCallback(NetworkConnection conn, NetworkIdentity uv, bool authorityState) + { + var msg = new PeerAuthorityMessage(); + msg.connectionId = conn.connectionId; + msg.netId = uv.netId; + msg.authorityState = authorityState; + + if (LogFilter.logDebug) { Debug.Log("AssignAuthorityCallback send for netId" + uv.netId); } + + for (int i = 0; i < NetworkServer.connections.Count; i++) + { + var c = NetworkServer.connections[i]; + if (c != null) + { + c.Send(MsgType.PeerClientAuthority, msg); + } + } + } + + /// + /// Used to initialize the migration manager with client and match information. + /// This is called automatically by the NetworkManager from within StartClient() if a NetworkManager is being used with the migration manager. + /// + /// The NetworkClient being used to connect to the host. + /// Information about the match being used. This may be null if there is no match. + public void Initialize(NetworkClient newClient, MatchInfo newMatchInfo) + { + if (LogFilter.logDev) { Debug.Log("NetworkMigrationManager initialize"); } + + m_Client = newClient; + m_MatchInfo = newMatchInfo; + newClient.RegisterHandlerSafe(MsgType.NetworkInfo, OnPeerInfo); + newClient.RegisterHandlerSafe(MsgType.PeerClientAuthority, OnPeerClientAuthority); + + NetworkIdentity.clientAuthorityCallback = AssignAuthorityCallback; + } + + /// + /// This causes objects for known players to be disabled. + /// These objects are added to the pendingPlayers list, and will be re-enabled when their clients reconnect. + /// This happens when the connection to the host of the game is lost. + /// + public void DisablePlayerObjects() + { + if (LogFilter.logDev) { Debug.Log("NetworkMigrationManager DisablePlayerObjects"); } + + if (m_Peers == null) + return; + + for (int peerId = 0; peerId < m_Peers.Length; peerId++) + { + var peer = m_Peers[peerId]; + if (peer.playerIds != null) + { + for (int i = 0; i < peer.playerIds.Length; i++) + { + var info = peer.playerIds[i]; + if (LogFilter.logDev) { Debug.Log("DisablePlayerObjects disable player for " + peer.address + " netId:" + info.netId + " control:" + info.playerControllerId); } + + GameObject playerObj = ClientScene.FindLocalObject(info.netId); + if (playerObj != null) + { + playerObj.SetActive(false); + + AddPendingPlayer(playerObj, peer.connectionId, info.netId, info.playerControllerId); + } + else + { + if (LogFilter.logWarn) { Debug.LogWarning("DisablePlayerObjects didnt find player Conn:" + peer.connectionId + " NetId:" + info.netId); } + } + } + } + } + } + + /// + /// This sends the set of peers in the game to all the peers in the game. + /// This is called automatically by the NetworkManager if one is active. It happens when clients connect to and disconnect from the server, and when players are added and removed from clients. The function SendPeers() udpates all clients with the information about which client owns which objects. It is automatically called when players are added and removed via the NetworkManager, but there is no hook in the NetworkManager when non-player client authority objects are added and removed. SendPeerInfo() is NOT called automatically. It is up to user code to call SendPeerInfo() when they want to update the set of client-owned objects. + /// + public void SendPeerInfo() + { + if (!m_HostMigration) + return; + + var listMsg = new PeerListMessage(); + var addresses = new List(); + + for (int i = 0; i < NetworkServer.connections.Count; i++) + { + var conn = NetworkServer.connections[i]; + if (conn != null) + { + var peerInfo = new PeerInfoMessage(); + + string address; + int port; + NetworkID networkId; + NodeID node; + byte error2; + NetworkManager.activeTransport.GetConnectionInfo(NetworkServer.serverHostId, conn.connectionId, out address, out port, out networkId, out node, out error2); + + peerInfo.connectionId = conn.connectionId; + peerInfo.port = port; + if (i == 0) + { + peerInfo.port = NetworkServer.listenPort; + peerInfo.isHost = true; + peerInfo.address = ""; + } + else + { + peerInfo.address = address; + peerInfo.isHost = false; + } + var playerIds = new List(); + for (int pid = 0; pid < conn.playerControllers.Count; pid++) + { + var player = conn.playerControllers[pid]; + if (player != null && player.unetView != null) + { + PeerInfoPlayer info; + info.netId = player.unetView.netId; + info.playerControllerId = player.unetView.playerControllerId; + playerIds.Add(info); + } + } + + if (conn.clientOwnedObjects != null) + { + foreach (var netId in conn.clientOwnedObjects) + { + var obj = NetworkServer.FindLocalObject(netId); + if (obj == null) + continue; + + var objUV = obj.GetComponent(); + if (objUV.playerControllerId != -1) + { + // already added players + continue; + } + + PeerInfoPlayer info; + info.netId = netId; + info.playerControllerId = -1; + playerIds.Add(info); + } + } + if (playerIds.Count > 0) + { + peerInfo.playerIds = playerIds.ToArray(); + } + addresses.Add(peerInfo); + } + } + + listMsg.peers = addresses.ToArray(); + + // (re)send all peers to all peers (including the new one) + for (int i = 0; i < NetworkServer.connections.Count; i++) + { + var conn = NetworkServer.connections[i]; + if (conn != null) + { + listMsg.oldServerConnectionId = conn.connectionId; + conn.Send(MsgType.NetworkInfo, listMsg); + } + } + } + + // received on both host and clients + void OnPeerClientAuthority(NetworkMessage netMsg) + { + var msg = netMsg.ReadMessage(); + + if (LogFilter.logDebug) { Debug.Log("OnPeerClientAuthority for netId:" + msg.netId); } + + if (m_Peers == null) + { + // havent received peers yet. just ignore this. the peer list will contain this data. + return; + } + + // find the peer for connId + for (int peerId = 0; peerId < m_Peers.Length; peerId++) + { + var p = m_Peers[peerId]; + if (p.connectionId == msg.connectionId) + { + if (p.playerIds == null) + { + p.playerIds = new PeerInfoPlayer[0]; + } + + if (msg.authorityState) + { + for (int i = 0; i < p.playerIds.Length; i++) + { + if (p.playerIds[i].netId == msg.netId) + { + // already in list + return; + } + } + var newPlayerId = new PeerInfoPlayer(); + newPlayerId.netId = msg.netId; + newPlayerId.playerControllerId = -1; + + var pl = new List(p.playerIds); + pl.Add(newPlayerId); + p.playerIds = pl.ToArray(); + } + else + { + for (int i = 0; i < p.playerIds.Length; i++) + { + if (p.playerIds[i].netId == msg.netId) + { + var pl = new List(p.playerIds); + pl.RemoveAt(i); + p.playerIds = pl.ToArray(); + break; + } + } + } + } + } + + var foundObj = ClientScene.FindLocalObject(msg.netId); + OnAuthorityUpdated(foundObj, msg.connectionId, msg.authorityState); + } + + // recieved on both host and clients + void OnPeerInfo(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("OnPeerInfo"); } + + netMsg.ReadMessage(m_PeerListMessage); + m_Peers = m_PeerListMessage.peers; + m_OldServerConnectionId = m_PeerListMessage.oldServerConnectionId; + + for (int i = 0; i < m_Peers.Length; i++) + { + if (LogFilter.logDebug) { Debug.Log("peer conn " + m_Peers[i].connectionId + " your conn " + m_PeerListMessage.oldServerConnectionId); } + + if (m_Peers[i].connectionId == m_PeerListMessage.oldServerConnectionId) + { + m_Peers[i].isYou = true; + break; + } + } + OnPeersUpdated(m_PeerListMessage); + } + + void OnServerReconnectPlayerMessage(NetworkMessage netMsg) + { + var msg = netMsg.ReadMessage(); + + if (LogFilter.logDev) { Debug.Log("OnReconnectMessage: connId=" + msg.oldConnectionId + " playerControllerId:" + msg.playerControllerId + " netId:" + msg.netId); } + + var playerObject = FindPendingPlayer(msg.oldConnectionId, msg.netId, msg.playerControllerId); + if (playerObject == null) + { + if (LogFilter.logError) { Debug.LogError("OnReconnectMessage connId=" + msg.oldConnectionId + " player null for netId:" + msg.netId + " msg.playerControllerId:" + msg.playerControllerId); } + return; + } + + if (playerObject.activeSelf) + { + if (LogFilter.logError) { Debug.LogError("OnReconnectMessage connId=" + msg.oldConnectionId + " player already active?"); } + return; + } + + if (LogFilter.logDebug) { Debug.Log("OnReconnectMessage: player=" + playerObject); } + + + NetworkReader extraDataReader = null; + if (msg.msgSize != 0) + { + extraDataReader = new NetworkReader(msg.msgData); + } + + if (msg.playerControllerId != -1) + { + if (extraDataReader == null) + { + OnServerReconnectPlayer(netMsg.conn, playerObject, msg.oldConnectionId, msg.playerControllerId); + } + else + { + OnServerReconnectPlayer(netMsg.conn, playerObject, msg.oldConnectionId, msg.playerControllerId, extraDataReader); + } + } + else + { + OnServerReconnectObject(netMsg.conn, playerObject, msg.oldConnectionId); + } + } + + /// + /// This re-establishes a non-player object with client authority with a client that is reconnected. It is similar to NetworkServer.SpawnWithClientAuthority(). + /// This is called by the default implementation of OnServerReconnectObject. + /// + /// The connection of the new client. + /// The object with client authority that is being reconnected. + /// This client's connectionId on the old host. + /// True if the object was reconnected. + // call this on the server to re-setup an object for a new connection + public bool ReconnectObjectForConnection(NetworkConnection newConnection, GameObject oldObject, int oldConnectionId) + { + if (!NetworkServer.active) + { + if (LogFilter.logError) { Debug.LogError("ReconnectObjectForConnection must have active server"); } + return false; + } + + if (LogFilter.logDebug) { Debug.Log("ReconnectObjectForConnection: oldConnId=" + oldConnectionId + " obj=" + oldObject + " conn:" + newConnection); } + + if (!m_PendingPlayers.ContainsKey(oldConnectionId)) + { + if (LogFilter.logError) { Debug.LogError("ReconnectObjectForConnection oldConnId=" + oldConnectionId + " not found."); } + return false; + } + + oldObject.SetActive(true); + oldObject.GetComponent().SetNetworkInstanceId(new NetworkInstanceId(0)); + + if (!NetworkServer.SpawnWithClientAuthority(oldObject, newConnection)) + { + if (LogFilter.logError) { Debug.LogError("ReconnectObjectForConnection oldConnId=" + oldConnectionId + " SpawnWithClientAuthority failed."); } + return false; + } + + return true; + } + + /// + /// This re-establishes a player object with a client that is reconnected. It is similar to NetworkServer.AddPlayerForConnection(). The player game object will become the player object for the new connection. + /// This is called by the default implementation of OnServerReconnectPlayer. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// class MyMigrationManager : NetworkMigrationManager + /// { + /// protected override void OnServerReconnectPlayer(NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId) + /// { + /// Debug.Log("Reconnecting oldPlayer:" + oldPlayer); + /// ReconnectPlayerForConnection(newConnection, oldPlayer, oldConnectionId, playerControllerId); + /// } + /// } + /// + /// + /// The connection of the new client. + /// The player object. + /// This client's connectionId on the old host. + /// The playerControllerId of the player that is rejoining. + /// True if able to re-add this player. + // call this on the server to re-setup a reconnecting player for a new connection + public bool ReconnectPlayerForConnection(NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId) + { + if (!NetworkServer.active) + { + if (LogFilter.logError) { Debug.LogError("ReconnectPlayerForConnection must have active server"); } + return false; + } + + if (LogFilter.logDebug) { Debug.Log("ReconnectPlayerForConnection: oldConnId=" + oldConnectionId + " player=" + oldPlayer + " conn:" + newConnection); } + + if (!m_PendingPlayers.ContainsKey(oldConnectionId)) + { + if (LogFilter.logError) { Debug.LogError("ReconnectPlayerForConnection oldConnId=" + oldConnectionId + " not found."); } + return false; + } + + oldPlayer.SetActive(true); + + // this ensures the observers are rebuilt for the player object + NetworkServer.Spawn(oldPlayer); + + if (!NetworkServer.AddPlayerForConnection(newConnection, oldPlayer, playerControllerId)) + { + if (LogFilter.logError) { Debug.LogError("ReconnectPlayerForConnection oldConnId=" + oldConnectionId + " AddPlayerForConnection failed."); } + return false; + } + + //NOTE. cannot remove the pending player here - could be more owned objects to come in later messages. + + if (NetworkServer.localClientActive) + { + SendPeerInfo(); + } + + return true; + } + + /// + /// This should be called on a client when it has lost its connection to the host. + /// This will caus the virtual function OnClientDisconnectedFromHost to be invoked. This is called automatically by the NetworkManager if one is in use. + /// + /// The connection of the client that was connected to the host. + /// True if the client should stay in the on-line scene. + // called by NetworkManager on clients when connection to host is lost. + // return true to stay in online scene + public bool LostHostOnClient(NetworkConnection conn) + { + if (LogFilter.logDebug) { Debug.Log("NetworkMigrationManager client OnDisconnectedFromHost"); } + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + if (LogFilter.logError) { Debug.LogError("LostHostOnClient: Host migration not supported on WebGL"); } + return false; + } + + if (m_Client == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkMigrationManager LostHostOnHost client was never initialized."); } + return false; + } + + if (!m_HostMigration) + { + if (LogFilter.logError) { Debug.LogError("NetworkMigrationManager LostHostOnHost migration not enabled."); } + return false; + } + + m_DisconnectedFromHost = true; + DisablePlayerObjects(); + + + byte error; + NetworkManager.activeTransport.Disconnect(m_Client.hostId, m_Client.connection.connectionId, out error); + + if (m_OldServerConnectionId != -1) + { + // only call this if we actually connected + SceneChangeOption sceneOption; + OnClientDisconnectedFromHost(conn, out sceneOption); + return sceneOption == SceneChangeOption.StayInOnlineScene; + } + + // never entered the online scene + return false; + } + + /// + /// This should be called on a host when it has has been shutdown. + /// This causes the virtual function OnServerHostShutdown to be invoked. This is called automatically by the NetworkManager if one is in use. + /// + // called by NetworkManager on host when host is closed + public void LostHostOnHost() + { + if (LogFilter.logDebug) { Debug.Log("NetworkMigrationManager LostHostOnHost"); } + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + if (LogFilter.logError) { Debug.LogError("LostHostOnHost: Host migration not supported on WebGL"); } + return; + } + + OnServerHostShutdown(); + + if (m_Peers == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkMigrationManager LostHostOnHost no peers"); } + return; + } + + if (m_Peers.Length != 1) + { + // there was another player that could become the host + m_HostWasShutdown = true; + } + } + + /// + /// This causes a client that has been disconnected from the host to become the new host of the game. + /// This starts a server, initializes it with the state of the existing networked objects, and starts a local client so that this client becomes a host. The old NetworkClient instance that was connected to the old host is destroyed. + /// This will cause OnStartServer to be called on networked objects in the scene. + /// Any player objects for this peer will automatically be re-added through the local client that was created. + /// + /// The network port to listen on. + /// True if able to become the new host. + public bool BecomeNewHost(int port) + { + if (LogFilter.logDebug) { Debug.Log("NetworkMigrationManager BecomeNewHost " + m_MatchInfo); } + + NetworkServer.RegisterHandler(MsgType.ReconnectPlayer, OnServerReconnectPlayerMessage); + + var newClient = NetworkServer.BecomeHost(m_Client, port, m_MatchInfo, oldServerConnectionId, peers); + if (newClient != null) + { + if (NetworkManager.singleton != null) + { + NetworkManager.singleton.RegisterServerMessages(); + NetworkManager.singleton.UseExternalClient(newClient); + } + else + { + Debug.LogWarning("MigrationManager BecomeNewHost - No NetworkManager."); + } + + newClient.RegisterHandlerSafe(MsgType.NetworkInfo, OnPeerInfo); + + RemovePendingPlayer(m_OldServerConnectionId); + Reset(ClientScene.ReconnectIdInvalid); + SendPeerInfo(); + return true; + } + else + { + if (LogFilter.logError) { Debug.LogError("NetworkServer.BecomeHost failed"); } + return false; + } + } + + // ----------------------------- Callbacks --------------------------------------- + + /// + /// A virtual function that is called when the client is disconnected from the host. + /// The sceneChange parameter allows the game to choose to stay in the current scene, or switch to the offline scene. + /// + /// The connection to the old host. + /// How to handle scene changes. + // called on client after the connection to host is lost. controls whether to switch scenes + protected virtual void OnClientDisconnectedFromHost(NetworkConnection conn, out SceneChangeOption sceneChange) + { + sceneChange = SceneChangeOption.StayInOnlineScene; + } + + /// + /// A virtual function that is called when the host is shutdown. + /// Calling NetworkManager.StopHost() will cause this function to be invoked if there is an active NetworkMigrationManager. Using the Stop Host button of the NetworkManagerHUD will cause this to be called. + /// + // called on host after the host is lost. host MUST change scenes + protected virtual void OnServerHostShutdown() + { + } + + /// + /// A virtual function that is called on the new host when a client from the old host reconnects to the new host. + /// The base class version of this function calls ReconnectPlayerForConnection() to hookup the new client. + /// ReconnectPlayerForConnection does not have to be called from within this function, it can be done asynchronously. + /// + /// The connection of the new client. + /// The player object associated with this client. + /// The connectionId of this client on the old host. + /// The playerControllerId of the player that is re-joining. + // called on new host (server) when a client from the old host re-connects a player + protected virtual void OnServerReconnectPlayer(NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId) + { + ReconnectPlayerForConnection(newConnection, oldPlayer, oldConnectionId, playerControllerId); + } + + /// + /// A virtual function that is called on the new host when a client from the old host reconnects to the new host. + /// The base class version of this function calls ReconnectPlayerForConnection() to hookup the new client. + /// ReconnectPlayerForConnection does not have to be called from within this function, it can be done asynchronously. + /// + /// The connection of the new client. + /// The player object associated with this client. + /// The connectionId of this client on the old host. + /// The playerControllerId of the player that is re-joining. + /// Additional message data (optional). + // called on new host (server) when a client from the old host re-connects a player + protected virtual void OnServerReconnectPlayer(NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId, NetworkReader extraMessageReader) + { + // extraMessageReader is not used in the default version, but it is available for custom versions to use + ReconnectPlayerForConnection(newConnection, oldPlayer, oldConnectionId, playerControllerId); + } + + /// + /// A virtual function that is called for non-player objects with client authority on the new host when a client from the old host reconnects to the new host. + /// The base class version of this function calls ReconnectObjectForConnection() to hookup the object for the new client. + /// + /// The connection of the new client. + /// The object with authority that is being reconnected. + /// The connectionId of this client on the old host. + // called on new host (server) when a client from the old host re-connects an object with authority + protected virtual void OnServerReconnectObject(NetworkConnection newConnection, GameObject oldObject, int oldConnectionId) + { + ReconnectObjectForConnection(newConnection, oldObject, oldConnectionId); + } + + /// + /// A virtual function that is called when the set of peers in the game changes. + /// This happens when a new client connects to the host, a client disconnects from the host, and when players are added and removed from clients. + /// The list of peers is stored in the member variable peers on the migration manager. This is used when the connection to the host is lost, to choose the new host and to re-add player objects. + /// + /// The set of peers in the game. + // called on both host and client when the set of peers is updated + protected virtual void OnPeersUpdated(PeerListMessage peers) + { + if (LogFilter.logDev) { Debug.Log("NetworkMigrationManager NumPeers " + peers.peers.Length); } + } + + /// + /// A virtual function that is called when the authority of a non-player object changes. + /// This is called on the host and on clients when the AssignClientAuthority, RemoveClientAuthority and NetworkServer.SpawnWithClientAuthority are used. + /// + /// The game object whose authority has changed. + /// The id of the connection whose authority changed for this object. + /// The new authority state for the object. + // called on both host and client when authority changes on a non-player object + protected virtual void OnAuthorityUpdated(GameObject go, int connectionId, bool authorityState) + { + if (LogFilter.logDev) { Debug.Log("NetworkMigrationManager OnAuthorityUpdated for " + go + " conn:" + connectionId + " state:" + authorityState); } + } + + /// + /// This is a utility function to pick one of the peers in the game as the new host. + /// This function implements the default host-choosing strategy of picking the peer with the lowest connectionId on the server. + /// Applications are not required to use this function to choose the new host. They can use any method they want. The choice does not have to be made synchronously, so it is possible to communicate with an external service to choose the new host. + /// However, the default UI of the NetworkMigrationManager calls into this function. + /// + /// Information about the new host, including the IP address. + /// True if this client is to be the new host. + /// True if able to pick a new host. + // utility function called by the default UI on client after connection to host was lost, to pick a new host. + public virtual bool FindNewHost(out NetworkSystem.PeerInfoMessage newHostInfo, out bool youAreNewHost) + { + if (m_Peers == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkMigrationManager FindLowestHost no peers"); } + newHostInfo = null; + youAreNewHost = false; + return false; + } + + if (LogFilter.logDev) { Debug.Log("NetworkMigrationManager FindLowestHost"); } + + const int k_FakeConnectionId = 50000; + + newHostInfo = new PeerInfoMessage(); + newHostInfo.connectionId = k_FakeConnectionId; + newHostInfo.address = ""; + newHostInfo.port = 0; + + int yourConnectionId = -1; + youAreNewHost = false; + + for (int peerId = 0; peerId < m_Peers.Length; peerId++) + { + var peer = m_Peers[peerId]; + if (peer.connectionId == 0) + { + continue; + } + + if (peer.isHost) + { + continue; + } + + if (peer.isYou) + { + yourConnectionId = peer.connectionId; + } + + if (peer.connectionId < newHostInfo.connectionId) + { + newHostInfo = peer; + } + } + if (newHostInfo.connectionId == k_FakeConnectionId) + { + return false; + } + if (newHostInfo.connectionId == yourConnectionId) + { + youAreNewHost = true; + } + + if (LogFilter.logDev) { Debug.Log("FindNewHost new host is " + newHostInfo.address); } + return true; + } + + // ----------------------------- GUI --------------------------------------- + + void OnGUIHost() + { + int ypos = m_OffsetY; + const int spacing = 25; + + GUI.Label(new Rect(m_OffsetX, ypos, 200, 40), "Host Was Shutdown ID(" + m_OldServerConnectionId + ")"); + ypos += spacing; + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + GUI.Label(new Rect(m_OffsetX, ypos, 200, 40), "Host Migration not supported for WebGL"); + return; + } + + if (m_WaitingReconnectToNewHost) + { + if (GUI.Button(new Rect(m_OffsetX, ypos, 200, 20), "Reconnect as Client")) + { + Reset(ClientScene.ReconnectIdHost); + + if (NetworkManager.singleton != null) + { + NetworkManager.singleton.networkAddress = GUI.TextField(new Rect(m_OffsetX + 100, ypos, 95, 20), NetworkManager.singleton.networkAddress); + NetworkManager.singleton.StartClient(); + } + else + { + Debug.LogWarning("MigrationManager Old Host Reconnect - No NetworkManager."); + } + } + ypos += spacing; + } + else + { + if (GUI.Button(new Rect(m_OffsetX, ypos, 200, 20), "Pick New Host")) + { + bool youAreNewHost; + if (FindNewHost(out m_NewHostInfo, out youAreNewHost)) + { + m_NewHostAddress = m_NewHostInfo.address; + if (youAreNewHost) + { + // you cannot be the new host.. you were the old host..? + Debug.LogWarning("MigrationManager FindNewHost - new host is self?"); + } + else + { + m_WaitingReconnectToNewHost = true; + } + } + } + ypos += spacing; + } + + if (GUI.Button(new Rect(m_OffsetX, ypos, 200, 20), "Leave Game")) + { + if (NetworkManager.singleton != null) + { + NetworkManager.singleton.SetupMigrationManager(null); + NetworkManager.singleton.StopHost(); + } + else + { + Debug.LogWarning("MigrationManager Old Host LeaveGame - No NetworkManager."); + } + Reset(ClientScene.ReconnectIdInvalid); + } + ypos += spacing; + } + + void OnGUIClient() + { + int ypos = m_OffsetY; + const int spacing = 25; + + GUI.Label(new Rect(m_OffsetX, ypos, 200, 40), "Lost Connection To Host ID(" + m_OldServerConnectionId + ")"); + ypos += spacing; + + if (UnityEngine.Application.platform == RuntimePlatform.WebGLPlayer) + { + GUI.Label(new Rect(m_OffsetX, ypos, 200, 40), "Host Migration not supported for WebGL"); + return; + } + + if (m_WaitingToBecomeNewHost) + { + GUI.Label(new Rect(m_OffsetX, ypos, 200, 40), "You are the new host"); + ypos += spacing; + + if (GUI.Button(new Rect(m_OffsetX, ypos, 200, 20), "Start As Host")) + { + if (NetworkManager.singleton != null) + { + BecomeNewHost(NetworkManager.singleton.networkPort); + } + else + { + Debug.LogWarning("MigrationManager Client BecomeNewHost - No NetworkManager."); + } + } + ypos += spacing; + } + else if (m_WaitingReconnectToNewHost) + { + GUI.Label(new Rect(m_OffsetX, ypos, 200, 40), "New host is " + m_NewHostAddress); + ypos += spacing; + + if (GUI.Button(new Rect(m_OffsetX, ypos, 200, 20), "Reconnect To New Host")) + { + Reset(m_OldServerConnectionId); + + if (NetworkManager.singleton != null) + { + NetworkManager.singleton.networkAddress = m_NewHostAddress; + NetworkManager.singleton.client.ReconnectToNewHost(m_NewHostAddress, NetworkManager.singleton.networkPort); + } + else + { + Debug.LogWarning("MigrationManager Client reconnect - No NetworkManager."); + } + } + ypos += spacing; + } + else + { + if (GUI.Button(new Rect(m_OffsetX, ypos, 200, 20), "Pick New Host")) + { + bool youAreNewHost; + if (FindNewHost(out m_NewHostInfo, out youAreNewHost)) + { + m_NewHostAddress = m_NewHostInfo.address; + if (youAreNewHost) + { + m_WaitingToBecomeNewHost = true; + } + else + { + m_WaitingReconnectToNewHost = true; + } + } + } + ypos += spacing; + } + + if (GUI.Button(new Rect(m_OffsetX, ypos, 200, 20), "Leave Game")) + { + if (NetworkManager.singleton != null) + { + NetworkManager.singleton.SetupMigrationManager(null); + NetworkManager.singleton.StopHost(); + } + else + { + Debug.LogWarning("MigrationManager Client LeaveGame - No NetworkManager."); + } + Reset(ClientScene.ReconnectIdInvalid); + } + ypos += spacing; + } + + void OnGUI() + { + if (!m_ShowGUI) + return; + + if (m_HostWasShutdown) + { + OnGUIHost(); + return; + } + + if (m_DisconnectedFromHost && m_OldServerConnectionId != -1) + { + OnGUIClient(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMigrationManager.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMigrationManager.cs.meta new file mode 100644 index 00000000..ee2f05d0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkMigrationManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 854a8e8a1e471481592c966837cced6b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkProximityChecker.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkProximityChecker.cs new file mode 100644 index 00000000..dfa1dc64 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkProximityChecker.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEngine.Networking +{ + /// + /// Component that controls visibility of networked objects for players. + /// Any object with this component on it will not be visible to players more than a (configurable) distance away. + /// + [AddComponentMenu("Network/NetworkProximityChecker")] + [RequireComponent(typeof(NetworkIdentity))] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkProximityChecker : NetworkBehaviour + { + /// + /// Enumeration of methods to use to check proximity. + /// + public enum CheckMethod + { + /// + /// Use 3D physics to determine proximity. + /// + Physics3D, + /// + /// Use 2D physics to determine proximity. + /// + Physics2D + }; + + /// + /// The maximim range that objects will be visible at. + /// + [TooltipAttribute("The maximum range that objects will be visible at.")] + public int visRange = 10; + + /// + /// How often (in seconds) that this object should update the set of players that can see it. + /// + [TooltipAttribute("How often (in seconds) that this object should update the set of players that can see it.")] + public float visUpdateInterval = 1.0f; // in seconds + + /// + /// Which method to use for checking proximity of players. + /// + [TooltipAttribute("Which method to use for checking proximity of players.\n\nPhysics3D uses 3D physics to determine proximity.\n\nPhysics2D uses 2D physics to determine proximity.")] + public CheckMethod checkMethod = CheckMethod.Physics3D; + + /// + /// Flag to force this object to be hidden for players. + /// If this object is a player object, it will not be hidden for that player. + /// + [TooltipAttribute("Enable to force this object to be hidden from players.")] + public bool forceHidden = false; + + float m_VisUpdateTime; + + void Update() + { + if (!NetworkServer.active) + return; + + if (Time.time - m_VisUpdateTime > visUpdateInterval) + { + GetComponent().RebuildObservers(false); + m_VisUpdateTime = Time.time; + } + } + + // called when a new player enters + public override bool OnCheckObserver(NetworkConnection newObserver) + { + if (forceHidden) + return false; + + // this cant use newObserver.playerControllers[0]. must iterate to find a valid player. + GameObject player = null; + for (int i = 0; i < newObserver.playerControllers.Count; i++) + { + var p = newObserver.playerControllers[i]; + if (p != null && p.gameObject != null) + { + player = p.gameObject; + break; + } + } + if (player == null) + return false; + + var pos = player.transform.position; + return (pos - transform.position).magnitude < visRange; + } + + public override bool OnRebuildObservers(HashSet observers, bool initial) + { + if (forceHidden) + { + // ensure player can still see themself + var uv = GetComponent(); + if (uv.connectionToClient != null) + { + observers.Add(uv.connectionToClient); + } + return true; + } + + // find players within range + switch (checkMethod) + { + case CheckMethod.Physics3D: + { + var hits = Physics.OverlapSphere(transform.position, visRange); + for (int i = 0; i < hits.Length; i++) + { + var hit = hits[i]; + // (if an object has a connectionToClient, it is a player) + var uv = hit.GetComponent(); + if (uv != null && uv.connectionToClient != null) + { + observers.Add(uv.connectionToClient); + } + } + return true; + } + + case CheckMethod.Physics2D: + { + var hits = Physics2D.OverlapCircleAll(transform.position, visRange); + for (int i = 0; i < hits.Length; i++) + { + var hit = hits[i]; + // (if an object has a connectionToClient, it is a player) + var uv = hit.GetComponent(); + if (uv != null && uv.connectionToClient != null) + { + observers.Add(uv.connectionToClient); + } + } + return true; + } + } + return false; + } + + // called hiding and showing objects on the host + public override void OnSetLocalVisibility(bool vis) + { + SetVis(gameObject, vis); + } + + static void SetVis(GameObject go, bool vis) + { + foreach (var r in go.GetComponents()) + { + r.enabled = vis; + } + for (int i = 0; i < go.transform.childCount; i++) + { + var t = go.transform.GetChild(i); + SetVis(t.gameObject, vis); + } + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkProximityChecker.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkProximityChecker.cs.meta new file mode 100644 index 00000000..3c7f04d6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkProximityChecker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 34cbc4338826545c59fcd11978e87f06 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkReader.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkReader.cs new file mode 100644 index 00000000..61c30d36 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkReader.cs @@ -0,0 +1,740 @@ +using System; +using System.Text; +using UnityEngine; + +namespace UnityEngine.Networking +{ + /// + /// General purpose serializer for UNET (for reading byte arrays). + /// This class works with NetworkWriter and is used for serializing data for UNet commands, RPC calls, events and low level messages. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// // Writing data to a NetworkWriter and then + /// // Converting this to a NetworkReader. + /// void Start() + /// { + /// // The data you add to your writer must be prefixed with a message type. + /// // This is in the form of a short. + /// short myMsgType = 143; + /// NetworkWriter writer = new NetworkWriter(); + /// // You start the message in your writer by passing in the message type. + /// // This is a short meaning that it will take up 2 bytes at the start of + /// // your message. + /// writer.StartMessage(myMsgType); + /// // You can now begin your message. In this case we will just use strings. + /// writer.Write("Test data 1"); + /// writer.Write("Test data 2"); + /// writer.Write("Test data 3"); + /// // Make sure to end your message with FinishMessage() + /// writer.FinishMessage(); + /// // You can now access the data in your writer. ToArray() returns a copy + /// // of the bytes that the writer is using and AsArray() returns the + /// // internal array of bytes, not a copy. + /// byte[] writerData = writer.ToArray(); + /// CreateNetworkReader(writerData); + /// } + /// + /// void CreateNetworkReader(byte[] data) + /// { + /// // We will create the NetworkReader using the data from our previous + /// // NetworkWriter. + /// NetworkReader networkReader = new NetworkReader(data); + /// // The first two bytes in the buffer represent the size + /// // of the message. This is equal to the NetworkReader.Length + /// // minus the size of the prefix. + /// byte[] readerMsgSizeData = networkReader.ReadBytes(2); + /// short readerMsgSize = (short)((readerMsgSizeData[1] << 8) + readerMsgSizeData[0]); + /// Debug.Log(readerMsgSize); + /// // The message type added in NetworkWriter.StartMessage + /// // is to be read now. It is a short and so consists of + /// // two bytes. It is the second two bytes on the buffer. + /// byte[] readerMsgTypeData = networkReader.ReadBytes(2); + /// short readerMsgType = (short)((readerMsgTypeData[1] << 8) + readerMsgTypeData[0]); + /// Debug.Log(readerMsgType); + /// // If all of your data is of the same type (in this case the + /// // data on our buffer is comprised of only strings) you can + /// // read all the data from the buffer using a loop like so. + /// while (networkReader.Position < networkReader.Length) + /// { + /// Debug.Log(networkReader.ReadString()); + /// } + /// } + /// } + /// + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkReader + { + NetBuffer m_buf; + + const int k_MaxStringLength = 1024 * 32; + const int k_InitialStringBufferSize = 1024; + static byte[] s_StringReaderBuffer; + static Encoding s_Encoding; + + /// + /// Creates a new NetworkReader object. + /// + public NetworkReader() + { + m_buf = new NetBuffer(); + Initialize(); + } + + /// + /// Creates a new NetworkReader object. + /// + /// A buffer to construct the reader with, this buffer is NOT copied. + public NetworkReader(NetworkWriter writer) + { + m_buf = new NetBuffer(writer.AsArray()); + Initialize(); + } + + public NetworkReader(byte[] buffer) + { + m_buf = new NetBuffer(buffer); + Initialize(); + } + + static void Initialize() + { + if (s_Encoding == null) + { + s_StringReaderBuffer = new byte[k_InitialStringBufferSize]; + s_Encoding = new UTF8Encoding(); + } + } + + /// + /// The current position within the buffer. + /// See NetworkReader for a code example. + /// + public uint Position { get { return m_buf.Position; } } + /// + /// The current length of the buffer. + /// See NetworkReader for a code example. + /// + public int Length { get { return m_buf.Length; } } + + /// + /// Sets the current position of the reader's stream to the start of the stream. + /// + public void SeekZero() + { + m_buf.SeekZero(); + } + + internal void Replace(byte[] buffer) + { + m_buf.Replace(buffer); + } + + // http://sqlite.org/src4/doc/trunk/www/varint.wiki + // NOTE: big endian. + + /// + /// Reads a 32-bit variable-length-encoded value. + /// + /// The 32 bit value read. + public UInt32 ReadPackedUInt32() + { + byte a0 = ReadByte(); + if (a0 < 241) + { + return a0; + } + byte a1 = ReadByte(); + if (a0 >= 241 && a0 <= 248) + { + return (UInt32)(240 + 256 * (a0 - 241) + a1); + } + byte a2 = ReadByte(); + if (a0 == 249) + { + return (UInt32)(2288 + 256 * a1 + a2); + } + byte a3 = ReadByte(); + if (a0 == 250) + { + return a1 + (((UInt32)a2) << 8) + (((UInt32)a3) << 16); + } + byte a4 = ReadByte(); + if (a0 >= 251) + { + return a1 + (((UInt32)a2) << 8) + (((UInt32)a3) << 16) + (((UInt32)a4) << 24); + } + throw new IndexOutOfRangeException("ReadPackedUInt32() failure: " + a0); + } + + /// + /// Reads a 64-bit variable-length-encoded value. + /// + /// The 64 bit value read. + public UInt64 ReadPackedUInt64() + { + byte a0 = ReadByte(); + if (a0 < 241) + { + return a0; + } + byte a1 = ReadByte(); + if (a0 >= 241 && a0 <= 248) + { + return 240 + 256 * (a0 - ((UInt64)241)) + a1; + } + byte a2 = ReadByte(); + if (a0 == 249) + { + return 2288 + (((UInt64)256) * a1) + a2; + } + byte a3 = ReadByte(); + if (a0 == 250) + { + return a1 + (((UInt64)a2) << 8) + (((UInt64)a3) << 16); + } + byte a4 = ReadByte(); + if (a0 == 251) + { + return a1 + (((UInt64)a2) << 8) + (((UInt64)a3) << 16) + (((UInt64)a4) << 24); + } + + + byte a5 = ReadByte(); + if (a0 == 252) + { + return a1 + (((UInt64)a2) << 8) + (((UInt64)a3) << 16) + (((UInt64)a4) << 24) + (((UInt64)a5) << 32); + } + + + byte a6 = ReadByte(); + if (a0 == 253) + { + return a1 + (((UInt64)a2) << 8) + (((UInt64)a3) << 16) + (((UInt64)a4) << 24) + (((UInt64)a5) << 32) + (((UInt64)a6) << 40); + } + + + byte a7 = ReadByte(); + if (a0 == 254) + { + return a1 + (((UInt64)a2) << 8) + (((UInt64)a3) << 16) + (((UInt64)a4) << 24) + (((UInt64)a5) << 32) + (((UInt64)a6) << 40) + (((UInt64)a7) << 48); + } + + + byte a8 = ReadByte(); + if (a0 == 255) + { + return a1 + (((UInt64)a2) << 8) + (((UInt64)a3) << 16) + (((UInt64)a4) << 24) + (((UInt64)a5) << 32) + (((UInt64)a6) << 40) + (((UInt64)a7) << 48) + (((UInt64)a8) << 56); + } + throw new IndexOutOfRangeException("ReadPackedUInt64() failure: " + a0); + } + + /// + /// Reads a NetworkInstanceId from the stream. + /// + /// The NetworkInstanceId read. + public NetworkInstanceId ReadNetworkId() + { + return new NetworkInstanceId(ReadPackedUInt32()); + } + + /// + /// Reads a NetworkSceneId from the stream. + /// + /// The NetworkSceneId read. + public NetworkSceneId ReadSceneId() + { + return new NetworkSceneId(ReadPackedUInt32()); + } + + /// + /// Reads a byte from the stream. + /// + /// The value read. + public byte ReadByte() + { + return m_buf.ReadByte(); + } + + /// + /// Reads a signed byte from the stream. + /// + /// Value read + public sbyte ReadSByte() + { + return (sbyte)m_buf.ReadByte(); + } + + /// + /// Reads a signed 16 bit integer from the stream. + /// + /// Value read + public short ReadInt16() + { + ushort value = 0; + value |= m_buf.ReadByte(); + value |= (ushort)(m_buf.ReadByte() << 8); + return (short)value; + } + + /// + /// Reads an unsigned 16 bit integer from the stream. + /// + /// Value read + public ushort ReadUInt16() + { + ushort value = 0; + value |= m_buf.ReadByte(); + value |= (ushort)(m_buf.ReadByte() << 8); + return value; + } + + /// + /// Reads a signed 32bit integer from the stream. + /// + /// Value read + public int ReadInt32() + { + uint value = 0; + value |= m_buf.ReadByte(); + value |= (uint)(m_buf.ReadByte() << 8); + value |= (uint)(m_buf.ReadByte() << 16); + value |= (uint)(m_buf.ReadByte() << 24); + return (int)value; + } + + /// + /// Reads an unsigned 32 bit integer from the stream. + /// + /// Value read + public uint ReadUInt32() + { + uint value = 0; + value |= m_buf.ReadByte(); + value |= (uint)(m_buf.ReadByte() << 8); + value |= (uint)(m_buf.ReadByte() << 16); + value |= (uint)(m_buf.ReadByte() << 24); + return value; + } + + /// + /// Reads a signed 64 bit integer from the stream. + /// + /// Value read + public long ReadInt64() + { + ulong value = 0; + + ulong other = m_buf.ReadByte(); + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 8; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 16; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 24; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 32; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 40; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 48; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 56; + value |= other; + + return (long)value; + } + + /// + /// Reads an unsigned 64 bit integer from the stream. + /// + /// Value read + public ulong ReadUInt64() + { + ulong value = 0; + ulong other = m_buf.ReadByte(); + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 8; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 16; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 24; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 32; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 40; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 48; + value |= other; + + other = ((ulong)m_buf.ReadByte()) << 56; + value |= other; + return value; + } + + /// + /// Reads a decimal from the stream. + /// + /// Value read + public decimal ReadDecimal() + { + Int32[] bits = new Int32[4]; + + bits[0] = ReadInt32(); + bits[1] = ReadInt32(); + bits[2] = ReadInt32(); + bits[3] = ReadInt32(); + + return new decimal(bits); + } + + /// + /// Reads a float from the stream. + /// + /// Value read + public float ReadSingle() + { + uint value = ReadUInt32(); + return FloatConversion.ToSingle(value); + } + + /// + /// Reads a double from the stream. + /// + /// Value read + public double ReadDouble() + { + ulong value = ReadUInt64(); + return FloatConversion.ToDouble(value); + } + + /// + /// Reads a string from the stream. (max of 32k bytes). + /// See NetworkReader for a code example. + /// + /// Value read. + public string ReadString() + { + UInt16 numBytes = ReadUInt16(); + if (numBytes == 0) + return ""; + + if (numBytes >= k_MaxStringLength) + { + throw new IndexOutOfRangeException("ReadString() too long: " + numBytes); + } + + while (numBytes > s_StringReaderBuffer.Length) + { + s_StringReaderBuffer = new byte[s_StringReaderBuffer.Length * 2]; + } + + m_buf.ReadBytes(s_StringReaderBuffer, numBytes); + + char[] chars = s_Encoding.GetChars(s_StringReaderBuffer, 0, numBytes); + return new string(chars); + } + + /// + /// Reads a char from the stream. + /// + /// Value read. + public char ReadChar() + { + return (char)m_buf.ReadByte(); + } + + /// + /// Reads a boolean from the stream. + /// + /// The value read. + public bool ReadBoolean() + { + int value = m_buf.ReadByte(); + return value == 1; + } + + /// + /// Reads a number of bytes from the stream. + /// See NetworkReader for a code example. + /// + /// Number of bytes to read. + /// Bytes read. (this is a copy). + public byte[] ReadBytes(int count) + { + if (count < 0) + { + throw new IndexOutOfRangeException("NetworkReader ReadBytes " + count); + } + //TODO: Allocation! + byte[] value = new byte[count]; + m_buf.ReadBytes(value, (uint)count); + return value; + } + + /// + /// This read a 16-bit byte count and a array of bytes of that size from the stream. + /// The format used by this function is the same as NetworkWriter.WriteBytesAndSize(). + /// + /// The bytes read from the stream. + public byte[] ReadBytesAndSize() + { + ushort sz = ReadUInt16(); + if (sz == 0) + return new byte[0]; + + return ReadBytes(sz); + } + + /// + /// Reads a Unity Vector2 object. + /// + /// The vector read from the stream. + public Vector2 ReadVector2() + { + return new Vector2(ReadSingle(), ReadSingle()); + } + + /// + /// Reads a Unity Vector3 objects. + /// + /// The vector read from the stream. + public Vector3 ReadVector3() + { + return new Vector3(ReadSingle(), ReadSingle(), ReadSingle()); + } + + /// + /// Reads a Unity Vector4 object. + /// + /// The vector read from the stream + public Vector4 ReadVector4() + { + return new Vector4(ReadSingle(), ReadSingle(), ReadSingle(), ReadSingle()); + } + + /// + /// Reads a unity Color objects. + /// + /// The color read from the stream. + public Color ReadColor() + { + return new Color(ReadSingle(), ReadSingle(), ReadSingle(), ReadSingle()); + } + + /// + /// Reads a unity color32 objects. + /// + /// The color read from the stream. + public Color32 ReadColor32() + { + return new Color32(ReadByte(), ReadByte(), ReadByte(), ReadByte()); + } + + /// + /// Reads a Unity Quaternion object. + /// + /// The quaternion read from the stream. + public Quaternion ReadQuaternion() + { + return new Quaternion(ReadSingle(), ReadSingle(), ReadSingle(), ReadSingle()); + } + + /// + /// Reads a Unity Rect object. + /// + /// The rect read from the stream. + public Rect ReadRect() + { + return new Rect(ReadSingle(), ReadSingle(), ReadSingle(), ReadSingle()); + } + + /// + /// Reads a unity Plane object. + /// + /// The plane read from the stream. + public Plane ReadPlane() + { + return new Plane(ReadVector3(), ReadSingle()); + } + + /// + /// Reads a Unity Ray object. + /// + /// The ray read from the stream. + public Ray ReadRay() + { + return new Ray(ReadVector3(), ReadVector3()); + } + + /// + /// Reads a unity Matrix4x4 object. + /// + /// The matrix read from the stream. + public Matrix4x4 ReadMatrix4x4() + { + Matrix4x4 m = new Matrix4x4(); + m.m00 = ReadSingle(); + m.m01 = ReadSingle(); + m.m02 = ReadSingle(); + m.m03 = ReadSingle(); + m.m10 = ReadSingle(); + m.m11 = ReadSingle(); + m.m12 = ReadSingle(); + m.m13 = ReadSingle(); + m.m20 = ReadSingle(); + m.m21 = ReadSingle(); + m.m22 = ReadSingle(); + m.m23 = ReadSingle(); + m.m30 = ReadSingle(); + m.m31 = ReadSingle(); + m.m32 = ReadSingle(); + m.m33 = ReadSingle(); + return m; + } + + /// + /// Reads a NetworkHash128 assetId. + /// + /// The assetId object read from the stream. + public NetworkHash128 ReadNetworkHash128() + { + NetworkHash128 hash; + hash.i0 = ReadByte(); + hash.i1 = ReadByte(); + hash.i2 = ReadByte(); + hash.i3 = ReadByte(); + hash.i4 = ReadByte(); + hash.i5 = ReadByte(); + hash.i6 = ReadByte(); + hash.i7 = ReadByte(); + hash.i8 = ReadByte(); + hash.i9 = ReadByte(); + hash.i10 = ReadByte(); + hash.i11 = ReadByte(); + hash.i12 = ReadByte(); + hash.i13 = ReadByte(); + hash.i14 = ReadByte(); + hash.i15 = ReadByte(); + return hash; + } + + /// + /// Reads a reference to a Transform from the stream. + /// The game object of this Transform must have a NetworkIdentity. + /// + /// The transform object read. + public Transform ReadTransform() + { + NetworkInstanceId netId = ReadNetworkId(); + if (netId.IsEmpty()) + { + return null; + } + GameObject go = ClientScene.FindLocalObject(netId); + if (go == null) + { + if (LogFilter.logDebug) { Debug.Log("ReadTransform netId:" + netId); } + return null; + } + + return go.transform; + } + + /// + /// Reads a reference to a GameObject from the stream. + /// + /// The GameObject referenced. + public GameObject ReadGameObject() + { + NetworkInstanceId netId = ReadNetworkId(); + if (netId.IsEmpty()) + { + return null; + } + + GameObject go; + if (NetworkServer.active) + { + go = NetworkServer.FindLocalObject(netId); + } + else + { + go = ClientScene.FindLocalObject(netId); + } + if (go == null) + { + if (LogFilter.logDebug) { Debug.Log("ReadGameObject netId:" + netId + "go: null"); } + } + + return go; + } + + /// + /// Reads a reference to a NetworkIdentity from the stream. + /// + /// The NetworkIdentity object read. + public NetworkIdentity ReadNetworkIdentity() + { + NetworkInstanceId netId = ReadNetworkId(); + if (netId.IsEmpty()) + { + return null; + } + GameObject go; + if (NetworkServer.active) + { + go = NetworkServer.FindLocalObject(netId); + } + else + { + go = ClientScene.FindLocalObject(netId); + } + if (go == null) + { + if (LogFilter.logDebug) { Debug.Log("ReadNetworkIdentity netId:" + netId + "go: null"); } + return null; + } + + return go.GetComponent(); + } + + /// + /// Returns a string representation of the reader's buffer. + /// + /// Buffer contents. + public override string ToString() + { + return m_buf.ToString(); + } + + /// + /// This is a utility function to read a typed network message from the stream. + /// + /// The type of the Network Message, must be derived from MessageBase. + /// + public TMsg ReadMessage() where TMsg : MessageBase, new() + { + var msg = new TMsg(); + msg.Deserialize(this); + return msg; + } + }; +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkReader.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkReader.cs.meta new file mode 100644 index 00000000..a8da8aba --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkReader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f0c52b7da912e4eb98a970a8f6b3d379 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkScene.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkScene.cs new file mode 100644 index 00000000..5ddd06f9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkScene.cs @@ -0,0 +1,289 @@ +#if ENABLE_UNET +using System; +using System.Collections.Generic; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + // This is an internal class to allow the client and server to share scene-related functionality. + // This code (mostly) used to be in ClientScene. + internal class NetworkScene + { + // localObjects is NOT static. For the Host, even though there is one scene and gameObjects are + // shared with the localClient, the set of active objects for each must be separate to prevent + // out-of-order object initialization problems. + Dictionary m_LocalObjects = new Dictionary(); + + static Dictionary s_GuidToPrefab = new Dictionary(); + static Dictionary s_SpawnHandlers = new Dictionary(); + static Dictionary s_UnspawnHandlers = new Dictionary(); + + internal Dictionary localObjects { get { return m_LocalObjects; }} + + static internal Dictionary guidToPrefab { get { return s_GuidToPrefab; }} + static internal Dictionary spawnHandlers { get { return s_SpawnHandlers; }} + static internal Dictionary unspawnHandlers { get { return s_UnspawnHandlers; }} + + internal void Shutdown() + { + ClearLocalObjects(); + ClearSpawners(); + } + + internal void SetLocalObject(NetworkInstanceId netId, GameObject obj, bool isClient, bool isServer) + { + if (LogFilter.logDev) { Debug.Log("SetLocalObject " + netId + " " + obj); } + + if (obj == null) + { + m_LocalObjects[netId] = null; + return; + } + + NetworkIdentity foundNetworkIdentity = null; + if (m_LocalObjects.ContainsKey(netId)) + { + foundNetworkIdentity = m_LocalObjects[netId]; + } + + if (foundNetworkIdentity == null) + { + foundNetworkIdentity = obj.GetComponent(); + m_LocalObjects[netId] = foundNetworkIdentity; + } + + foundNetworkIdentity.UpdateClientServer(isClient, isServer); + } + + // this lets the client take an instance ID from the server and find + // the local object that it corresponds too. This is temporary until + // object references can be serialized transparently. + internal GameObject FindLocalObject(NetworkInstanceId netId) + { + if (m_LocalObjects.ContainsKey(netId)) + { + var uv = m_LocalObjects[netId]; + if (uv != null) + { + return uv.gameObject; + } + } + return null; + } + + internal bool GetNetworkIdentity(NetworkInstanceId netId, out NetworkIdentity uv) + { + if (m_LocalObjects.ContainsKey(netId) && m_LocalObjects[netId] != null) + { + uv = m_LocalObjects[netId]; + return true; + } + uv = null; + return false; + } + + internal bool RemoveLocalObject(NetworkInstanceId netId) + { + return m_LocalObjects.Remove(netId); + } + + internal bool RemoveLocalObjectAndDestroy(NetworkInstanceId netId) + { + if (m_LocalObjects.ContainsKey(netId)) + { + NetworkIdentity localObject = m_LocalObjects[netId]; + Object.Destroy(localObject.gameObject); + return m_LocalObjects.Remove(netId); + } + return false; + } + + internal void ClearLocalObjects() + { + m_LocalObjects.Clear(); + } + + static internal void RegisterPrefab(GameObject prefab, NetworkHash128 newAssetId) + { + NetworkIdentity view = prefab.GetComponent(); + if (view) + { + view.SetDynamicAssetId(newAssetId); + + if (LogFilter.logDebug) { Debug.Log("Registering prefab '" + prefab.name + "' as asset:" + view.assetId); } + s_GuidToPrefab[view.assetId] = prefab; + } + else + { + if (LogFilter.logError) { Debug.LogError("Could not register '" + prefab.name + "' since it contains no NetworkIdentity component"); } + } + } + + static internal void RegisterPrefab(GameObject prefab) + { + NetworkIdentity view = prefab.GetComponent(); + if (view) + { + if (LogFilter.logDebug) { Debug.Log("Registering prefab '" + prefab.name + "' as asset:" + view.assetId); } + s_GuidToPrefab[view.assetId] = prefab; + + var uvs = prefab.GetComponentsInChildren(); + if (uvs.Length > 1) + { + if (LogFilter.logWarn) + { + Debug.LogWarning("The prefab '" + prefab.name + + "' has multiple NetworkIdentity components. There can only be one NetworkIdentity on a prefab, and it must be on the root object."); + } + } + } + else + { + if (LogFilter.logError) { Debug.LogError("Could not register '" + prefab.name + "' since it contains no NetworkIdentity component"); } + } + } + + static internal bool GetPrefab(NetworkHash128 assetId, out GameObject prefab) + { + if (!assetId.IsValid()) + { + prefab = null; + return false; + } + if (s_GuidToPrefab.ContainsKey(assetId) && s_GuidToPrefab[assetId] != null) + { + prefab = s_GuidToPrefab[assetId]; + return true; + } + prefab = null; + return false; + } + + static internal void ClearSpawners() + { + s_GuidToPrefab.Clear(); + s_SpawnHandlers.Clear(); + s_UnspawnHandlers.Clear(); + } + + static public void UnregisterSpawnHandler(NetworkHash128 assetId) + { + s_SpawnHandlers.Remove(assetId); + s_UnspawnHandlers.Remove(assetId); + } + + static internal void RegisterSpawnHandler(NetworkHash128 assetId, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler) + { + if (spawnHandler == null || unspawnHandler == null) + { + if (LogFilter.logError) { Debug.LogError("RegisterSpawnHandler custom spawn function null for " + assetId); } + return; + } + + if (LogFilter.logDebug) { Debug.Log("RegisterSpawnHandler asset '" + assetId + "' " + spawnHandler.GetMethodName() + "/" + unspawnHandler.GetMethodName()); } + + s_SpawnHandlers[assetId] = spawnHandler; + s_UnspawnHandlers[assetId] = unspawnHandler; + } + + static internal void UnregisterPrefab(GameObject prefab) + { + NetworkIdentity identity = prefab.GetComponent(); + if (identity == null) + { + if (LogFilter.logError) { Debug.LogError("Could not unregister '" + prefab.name + "' since it contains no NetworkIdentity component"); } + return; + } + s_SpawnHandlers.Remove(identity.assetId); + s_UnspawnHandlers.Remove(identity.assetId); + } + + static internal void RegisterPrefab(GameObject prefab, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler) + { + NetworkIdentity identity = prefab.GetComponent(); + if (identity == null) + { + if (LogFilter.logError) { Debug.LogError("Could not register '" + prefab.name + "' since it contains no NetworkIdentity component"); } + return; + } + + if (spawnHandler == null || unspawnHandler == null) + { + if (LogFilter.logError) { Debug.LogError("RegisterPrefab custom spawn function null for " + identity.assetId); } + return; + } + + if (!identity.assetId.IsValid()) + { + if (LogFilter.logError) { Debug.LogError("RegisterPrefab game object " + prefab.name + " has no prefab. Use RegisterSpawnHandler() instead?"); } + return; + } + + if (LogFilter.logDebug) { Debug.Log("Registering custom prefab '" + prefab.name + "' as asset:" + identity.assetId + " " + spawnHandler.GetMethodName() + "/" + unspawnHandler.GetMethodName()); } + + s_SpawnHandlers[identity.assetId] = spawnHandler; + s_UnspawnHandlers[identity.assetId] = unspawnHandler; + } + + static internal bool GetSpawnHandler(NetworkHash128 assetId, out SpawnDelegate handler) + { + if (s_SpawnHandlers.ContainsKey(assetId)) + { + handler = s_SpawnHandlers[assetId]; + return true; + } + handler = null; + return false; + } + + static internal bool InvokeUnSpawnHandler(NetworkHash128 assetId, GameObject obj) + { + if (s_UnspawnHandlers.ContainsKey(assetId) && s_UnspawnHandlers[assetId] != null) + { + UnSpawnDelegate handler = s_UnspawnHandlers[assetId]; + handler(obj); + return true; + } + return false; + } + + internal void DestroyAllClientObjects() + { + foreach (var netId in m_LocalObjects.Keys) + { + NetworkIdentity uv = m_LocalObjects[netId]; + + if (uv != null && uv.gameObject != null) + { + if (!InvokeUnSpawnHandler(uv.assetId, uv.gameObject)) + { + if (uv.sceneId.IsEmpty()) + { + Object.Destroy(uv.gameObject); + } + else + { + uv.MarkForReset(); + uv.gameObject.SetActive(false); + } + } + } + } + ClearLocalObjects(); + } + + internal void DumpAllClientObjects() + { + foreach (var netId in m_LocalObjects.Keys) + { + NetworkIdentity uv = m_LocalObjects[netId]; + if (uv != null) + Debug.Log("ID:" + netId + " OBJ:" + uv.gameObject + " AS:" + uv.assetId); + else + Debug.Log("ID:" + netId + " OBJ: null"); + } + } + } +} +#pragma warning restore 618 +#endif //ENABLE_UNET diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkScene.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkScene.cs.meta new file mode 100644 index 00000000..f1b9dab9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkScene.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79dbcc15fedbe4deda488fe34d18f230 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkSceneId.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkSceneId.cs new file mode 100644 index 00000000..5903e245 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkSceneId.cs @@ -0,0 +1,68 @@ +using System; + +namespace UnityEngine.Networking +{ + /// + /// This is used to identify networked objects in a scene. These values are allocated in the editor and are persistent for the lifetime of the object in the scene. + /// + [Serializable] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public struct NetworkSceneId : IEquatable + { + public NetworkSceneId(uint value) + { + m_Value = value; + } + + [SerializeField] + uint m_Value; + + /// + /// Returns true if the value is zero. Non-scene objects - ones which are spawned at runtime will have a sceneId of zero. + /// + /// True if zero. + public bool IsEmpty() + { + return m_Value == 0; + } + + public override int GetHashCode() + { + return (int)m_Value; + } + + public override bool Equals(object obj) + { + return obj is NetworkSceneId && Equals((NetworkSceneId)obj); + } + + public bool Equals(NetworkSceneId other) + { + return this == other; + } + + public static bool operator==(NetworkSceneId c1, NetworkSceneId c2) + { + return c1.m_Value == c2.m_Value; + } + + public static bool operator!=(NetworkSceneId c1, NetworkSceneId c2) + { + return c1.m_Value != c2.m_Value; + } + + /// + /// Returns a string like SceneId:value. + /// + /// String representation of this object. + public override string ToString() + { + return m_Value.ToString(); + } + + /// + /// The internal value for this object. + /// + public uint Value { get { return m_Value; } } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkSceneId.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkSceneId.cs.meta new file mode 100644 index 00000000..a8edbe20 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkSceneId.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 13b8bd95920c64019967e9b84dba5381 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServer.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServer.cs new file mode 100644 index 00000000..d9bd90bf --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServer.cs @@ -0,0 +1,2588 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using UnityEngine.Networking.Match; +using UnityEngine.Networking.NetworkSystem; +using UnityEngine.Networking.Types; +using UnityEngineInternal; + +namespace UnityEngine.Networking +{ + /// + /// The NetworkServer uses a NetworkServerSimple for basic network functionality and adds more game-like functionality. + /// NetworkServer handles remote connections from remote clients via a NetworkServerSimple instance, and also has a local connection for a local client. + /// The NetworkServer is a singleton. It has static convenience functions such as NetworkServer.SendToAll() and NetworkServer.Spawn() which automatically use the singleton instance. + /// The NetworkManager uses the NetworkServer, but it can be used without the NetworkManager. + /// The set of networked objects that have been spawned is managed by NetworkServer. Objects are spawned with NetworkServer.Spawn() which adds them to this set, and makes them be created on clients. Spawned objects are removed automatically when they are destroyed, or than they can be removed from the spawned set by calling NetworkServer.UnSpawn() - this does not destroy the object. + /// There are a number of internal messages used by NetworkServer, these are setup when NetworkServer.Listen() is called. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public sealed class NetworkServer + { + static bool s_Active; + static volatile NetworkServer s_Instance; + static object s_Sync = new Object(); + static bool m_DontListen; + bool m_LocalClientActive; + + // only used for localConnection accessor + List m_LocalConnectionsFakeList = new List(); + ULocalConnectionToClient m_LocalConnection = null; + + NetworkScene m_NetworkScene; + HashSet m_ExternalConnections; + ServerSimpleWrapper m_SimpleServerSimple; + + float m_MaxDelay = 0.1f; + HashSet m_RemoveList; + int m_RemoveListCount; + const int k_RemoveListInterval = 100; + + // this is cached here for easy access when checking the size of state update packets in NetworkIdentity + static internal ushort maxPacketSize; + + // static message objects to avoid runtime-allocations + static RemovePlayerMessage s_RemovePlayerMessage = new RemovePlayerMessage(); + + /// + /// A list of local connections on the server. + /// + static public List localConnections { get { return instance.m_LocalConnectionsFakeList; } } + + /// + /// The port that the server is listening on. + /// + static public int listenPort { get { return instance.m_SimpleServerSimple.listenPort; } } + /// + /// The transport layer hostId used by this server. + /// + static public int serverHostId { get { return instance.m_SimpleServerSimple.serverHostId; } } + /// + /// A list of all the current connections from clients. + /// The connections in the list are at the index of their connectionId. There may be nulls in this list for disconnected clients. + /// + static public ReadOnlyCollection connections { get { return instance.m_SimpleServerSimple.connections; } } + /// + /// Dictionary of the message handlers registered with the server. + /// The key to the dictionary is the message Id. + /// + static public Dictionary handlers { get { return instance.m_SimpleServerSimple.handlers; } } + /// + /// The host topology that the server is using. + /// This is read-only once the server is started. + /// + static public HostTopology hostTopology { get { return instance.m_SimpleServerSimple.hostTopology; }} + /// + /// This is a dictionary of networked objects that have been spawned on the server. + /// The key to the dictionary is NetworkIdentity netId. + /// + public static Dictionary objects { get { return instance.m_NetworkScene.localObjects; } } + + [Obsolete("Moved to NetworkMigrationManager")] + public static bool sendPeerInfo { get { return false; } set {} } + /// + /// If you enable this, the server will not listen for incoming connections on the regular network port. + /// This can be used if the game is running in host mode and does not want external players to be able to connect - making it like a single-player game. Also this can be useful when using AddExternalConnection(). + /// + public static bool dontListen { get { return m_DontListen; } set { m_DontListen = value; } } + /// + /// This makes the server listen for WebSockets connections instead of normal transport layer connections. + /// This allows WebGL clients to connect to this server. Note that WebGL clients cannot listen for WebSocket connections, they can only make outgoing WebSockets connections. + /// + public static bool useWebSockets { get { return instance.m_SimpleServerSimple.useWebSockets; } set { instance.m_SimpleServerSimple.useWebSockets = value; } } + + internal static NetworkServer instance + { + get + { + if (s_Instance == null) + { + lock (s_Sync) + { + if (s_Instance == null) + { + s_Instance = new NetworkServer(); + } + } + } + return s_Instance; + } + } + /// + /// Checks if the server has been started. + /// This will be true after NetworkServer.Listen() has been called. + /// + public static bool active { get { return s_Active; } } + /// + /// True is a local client is currently active on the server. + /// This will be true for "Hosts" on hosted server games. + /// + public static bool localClientActive { get { return instance.m_LocalClientActive; } } + /// + /// The number of channels the network is configure with. + /// + public static int numChannels { get { return instance.m_SimpleServerSimple.hostTopology.DefaultConfig.ChannelCount; } } + + /// + /// The maximum delay before sending packets on connections. + /// In seconds. The default of 0.01 seconds means packets will be delayed at most by 10 milliseconds. Setting this to zero will disable HLAPI connection buffering. + /// + public static float maxDelay { get { return instance.m_MaxDelay; } set { instance.InternalSetMaxDelay(value); } } + + /// + /// The class to be used when creating new network connections. + /// This can be set with SetNetworkConnectionClass. This allows custom classes that do special processing of data from the transport layer to be used with the NetworkServer. + /// See NetworkConnection.TransportSend and NetworkConnection.TransportReceive for details. + /// + static public Type networkConnectionClass + { + get { return instance.m_SimpleServerSimple.networkConnectionClass; } + } + + /// + /// This sets the class used when creating new network connections. + /// The class must be derived from NetworkConnection. + /// + /// + static public void SetNetworkConnectionClass() where T : NetworkConnection + { + instance.m_SimpleServerSimple.SetNetworkConnectionClass(); + } + + NetworkServer() + { + NetworkManager.activeTransport.Init(); + if (LogFilter.logDev) { Debug.Log("NetworkServer Created version " + Version.Current); } + m_RemoveList = new HashSet(); + m_ExternalConnections = new HashSet(); + m_NetworkScene = new NetworkScene(); + m_SimpleServerSimple = new ServerSimpleWrapper(this); + } + + /// + /// This configures the transport layer settings for the server. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : MonoBehaviour + /// { + /// void StartServer() + /// { + /// ConnectionConfig config = new ConnectionConfig(); + /// config.AddChannel(QosType.ReliableSequenced); + /// config.AddChannel(QosType.UnreliableSequenced); + /// config.PacketSize = 500; + /// NetworkServer.Configure(config, 10); + /// NetworkServer.Listen(7070); + /// } + /// } + /// + /// + /// Transport layer confuration object. + /// The maximum number of client connections to allow. + /// True if successfully configured. + static public bool Configure(ConnectionConfig config, int maxConnections) + { + return instance.m_SimpleServerSimple.Configure(config, maxConnections); + } + + /// + /// This configures the transport layer settings for the server. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : MonoBehaviour + /// { + /// void StartServer() + /// { + /// ConnectionConfig config = new ConnectionConfig(); + /// config.AddChannel(QosType.ReliableSequenced); + /// config.AddChannel(QosType.UnreliableSequenced); + /// config.PacketSize = 500; + /// NetworkServer.Configure(config, 10); + /// NetworkServer.Listen(7070); + /// } + /// } + /// + /// + /// Transport layer topology object to use. + /// True if successfully configured. + static public bool Configure(HostTopology topology) + { + return instance.m_SimpleServerSimple.Configure(topology); + } + + /// + /// Reset the NetworkServer singleton. + /// + public static void Reset() + { +#if UNITY_EDITOR + Profiler.ResetAll(); +#endif + NetworkManager.activeTransport.Shutdown(); + NetworkManager.activeTransport.Init(); + + s_Instance = null; + s_Active = false; + } + + /// + /// This shuts down the server and disconnects all clients. + /// + public static void Shutdown() + { + if (s_Instance != null) + { + s_Instance.InternalDisconnectAll(); + + if (m_DontListen) + { + // was never started, so dont stop + } + else + { + s_Instance.m_SimpleServerSimple.Stop(); + } + + s_Instance = null; + } + m_DontListen = false; + s_Active = false; + } + + static public bool Listen(MatchInfo matchInfo, int listenPort) + { + if (!matchInfo.usingRelay) + return instance.InternalListen(null, listenPort); + + instance.InternalListenRelay(matchInfo.address, matchInfo.port, matchInfo.networkId, Utility.GetSourceID(), matchInfo.nodeId); + return true; + } + + internal void RegisterMessageHandlers() + { + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.Ready, OnClientReadyMessage); + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.Command, OnCommandMessage); + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.LocalPlayerTransform, NetworkTransform.HandleTransform); + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.LocalChildTransform, NetworkTransformChild.HandleChildTransform); + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.RemovePlayer, OnRemovePlayerMessage); + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.Animation, NetworkAnimator.OnAnimationServerMessage); + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.AnimationParameters, NetworkAnimator.OnAnimationParametersServerMessage); + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.AnimationTrigger, NetworkAnimator.OnAnimationTriggerServerMessage); + m_SimpleServerSimple.RegisterHandlerSafe(MsgType.Fragment, NetworkConnection.OnFragment); + + // also setup max packet size. + maxPacketSize = hostTopology.DefaultConfig.PacketSize; + } + + /// + /// Starts a server using a Relay server. This is the manual way of using the Relay server, as the regular NetworkServer.Connect() will automatically use the Relay server if a match exists. + /// + /// Relay server IP Address. + /// Relay server port. + /// GUID of the network to create. + /// This server's sourceId. + /// The node to join the network with. + static public void ListenRelay(string relayIp, int relayPort, NetworkID netGuid, SourceID sourceId, NodeID nodeId) + { + instance.InternalListenRelay(relayIp, relayPort, netGuid, sourceId, nodeId); + } + + void InternalListenRelay(string relayIp, int relayPort, NetworkID netGuid, SourceID sourceId, NodeID nodeId) + { + m_SimpleServerSimple.ListenRelay(relayIp, relayPort, netGuid, sourceId, nodeId); + s_Active = true; + RegisterMessageHandlers(); + } + + /// + /// Start the server on the given port number. Note that if a match has been created, this will listen using the Relay server instead of a local socket. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Manager : MonoBehaviour + /// { + /// bool isAtStartup = true; + /// + /// void Update() + /// { + /// if (Input.GetKeyDown(KeyCode.S) && isAtStartup) + /// { + /// NetworkServer.Listen(4444); + /// NetworkServer.RegisterHandler(MsgType.Ready, OnPlayerReadyMessage); + /// isAtStartup = false; + /// } + /// } + /// + /// public void OnPlayerReadyMessage(NetworkMessage netMsg) + /// { + /// // TODO: create player and call PlayerIsReady() + /// } + /// } + /// + /// + /// Listen port number. + /// True if listen succeeded. + static public bool Listen(int serverPort) + { + return instance.InternalListen(null, serverPort); + } + + /// + /// Start the server on the given port number. Note that if a match has been created, this will listen using the Relay server instead of a local socket. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Manager : MonoBehaviour + /// { + /// bool isAtStartup = true; + /// + /// void Update() + /// { + /// if (Input.GetKeyDown(KeyCode.S) && isAtStartup) + /// { + /// NetworkServer.Listen(4444); + /// NetworkServer.RegisterHandler(MsgType.Ready, OnPlayerReadyMessage); + /// isAtStartup = false; + /// } + /// } + /// + /// public void OnPlayerReadyMessage(NetworkMessage netMsg) + /// { + /// // TODO: create player and call PlayerIsReady() + /// } + /// } + /// + /// + /// The IP address to bind to (optional). + /// Listen port number. + /// True if listen succeeded. + static public bool Listen(string ipAddress, int serverPort) + { + return instance.InternalListen(ipAddress, serverPort); + } + + internal bool InternalListen(string ipAddress, int serverPort) + { + if (m_DontListen) + { + // dont start simpleServer - this mode uses external connections instead + m_SimpleServerSimple.Initialize(); + } + else + { + if (!m_SimpleServerSimple.Listen(ipAddress, serverPort)) + return false; + } + + maxPacketSize = hostTopology.DefaultConfig.PacketSize; + s_Active = true; + RegisterMessageHandlers(); + return true; + } + + /// + /// This allows a client that has been disconnected from a server, to become the host of a new version of the game. + /// + /// The client that was connected to the old host. + /// The port to listen on. + /// Match information (may be null). + /// + /// + /// + static public NetworkClient BecomeHost(NetworkClient oldClient, int port, MatchInfo matchInfo, int oldConnectionId, PeerInfoMessage[] peers) + { + return instance.BecomeHostInternal(oldClient, port, matchInfo, oldConnectionId, peers); + } + + internal NetworkClient BecomeHostInternal(NetworkClient oldClient, int port, MatchInfo matchInfo, int oldConnectionId, PeerInfoMessage[] peers) + { + if (s_Active) + { + if (LogFilter.logError) { Debug.LogError("BecomeHost already a server."); } + return null; + } + + if (!NetworkClient.active) + { + if (LogFilter.logError) { Debug.LogError("BecomeHost NetworkClient not active."); } + return null; + } + + // setup a server + + NetworkServer.Configure(hostTopology); + + if (matchInfo == null) + { + if (LogFilter.logDev) { Debug.Log("BecomeHost Listen on " + port); } + + if (!NetworkServer.Listen(port)) + { + if (LogFilter.logError) { Debug.LogError("BecomeHost bind failed."); } + return null; + } + } + else + { + if (LogFilter.logDev) { Debug.Log("BecomeHost match:" + matchInfo.networkId); } + NetworkServer.ListenRelay(matchInfo.address, matchInfo.port, matchInfo.networkId, Utility.GetSourceID(), matchInfo.nodeId); + } + + // setup server objects + foreach (var uv in ClientScene.objects.Values) + { + if (uv == null || uv.gameObject == null) + continue; + + NetworkIdentity.AddNetworkId(uv.netId.Value); + + //NOTE: have to pass false to isServer here so that onStartServer sets object up properly. + m_NetworkScene.SetLocalObject(uv.netId, uv.gameObject, false, false); + uv.OnStartServer(true); + } + + // reset the client peer info(?) + + if (LogFilter.logDev) { Debug.Log("NetworkServer BecomeHost done. oldConnectionId:" + oldConnectionId); } + RegisterMessageHandlers(); + + if (!NetworkClient.RemoveClient(oldClient)) + { + if (LogFilter.logError) { Debug.LogError("BecomeHost failed to remove client"); } + } + + if (LogFilter.logDev) { Debug.Log("BecomeHost localClient ready"); } + + // make a localclient for me + var newLocalClient = ClientScene.ReconnectLocalServer(); + ClientScene.Ready(newLocalClient.connection); + + // cause local players and objects to be reconnected + ClientScene.SetReconnectId(oldConnectionId, peers); + ClientScene.AddPlayer(ClientScene.readyConnection, 0); + + return newLocalClient; + } + + void InternalSetMaxDelay(float seconds) + { + // set on existing connections + for (int i = 0; i < connections.Count; i++) + { + NetworkConnection conn = connections[i]; + if (conn != null) + conn.SetMaxDelay(seconds); + } + + // save for future connections + m_MaxDelay = seconds; + } + + // called by LocalClient to add itself. dont call directly. + internal int AddLocalClient(LocalClient localClient) + { + if (m_LocalConnectionsFakeList.Count != 0) + { + Debug.LogError("Local Connection already exists"); + return -1; + } + + m_LocalConnection = new ULocalConnectionToClient(localClient); + m_LocalConnection.connectionId = 0; + m_SimpleServerSimple.SetConnectionAtIndex(m_LocalConnection); + + // this is for backwards compatibility with localConnections property + m_LocalConnectionsFakeList.Add(m_LocalConnection); + + m_LocalConnection.InvokeHandlerNoData(MsgType.Connect); + + return 0; + } + + internal void RemoveLocalClient(NetworkConnection localClientConnection) + { + for (int i = 0; i < m_LocalConnectionsFakeList.Count; ++i) + { + if (m_LocalConnectionsFakeList[i].connectionId == localClientConnection.connectionId) + { + m_LocalConnectionsFakeList.RemoveAt(i); + break; + } + } + + if (m_LocalConnection != null) + { + m_LocalConnection.Disconnect(); + m_LocalConnection.Dispose(); + m_LocalConnection = null; + } + m_LocalClientActive = false; + m_SimpleServerSimple.RemoveConnectionAtIndex(0); + } + + internal void SetLocalObjectOnServer(NetworkInstanceId netId, GameObject obj) + { + if (LogFilter.logDev) { Debug.Log("SetLocalObjectOnServer " + netId + " " + obj); } + + m_NetworkScene.SetLocalObject(netId, obj, false, true); + } + + internal void ActivateLocalClientScene() + { + if (m_LocalClientActive) + return; + + // ClientScene for a local connection is becoming active. any spawned objects need to be started as client objects + m_LocalClientActive = true; + foreach (var uv in objects.Values) + { + if (!uv.isClient) + { + if (LogFilter.logDev) { Debug.Log("ActivateClientScene " + uv.netId + " " + uv.gameObject); } + + ClientScene.SetLocalObject(uv.netId, uv.gameObject); + uv.OnStartClient(); + } + } + } + + /// + /// Send a message structure with the given type number to all connected clients. + /// This applies to clients that are ready and not-ready. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class MyMessageTypes + /// { + /// public static short MSG_LOGIN_RESPONSE = 1000; + /// public static short MSG_SCORE = 1005; + /// }; + /// + /// public class MyScoreMessage : MessageBase + /// { + /// public int score; + /// public Vector3 scorePos; + /// } + /// + /// class GameServer + /// { + /// void SendScore(int score, Vector3 scorePos) + /// { + /// MyScoreMessage msg = new MyScoreMessage(); + /// msg.score = score; + /// msg.scorePos = scorePos; + /// NetworkServer.SendToAll(MyMessageTypes.MSG_SCORE, msg); + /// } + /// } + /// + /// + /// Message type. + /// Message structure. + /// Message type. + /// + static public bool SendToAll(short msgType, MessageBase msg) + { + if (LogFilter.logDev) { Debug.Log("Server.SendToAll msgType:" + msgType); } + + bool result = true; + + // remote connections + for (int i = 0; i < connections.Count; i++) + { + NetworkConnection conn = connections[i]; + if (conn != null) + result &= conn.Send(msgType, msg); + } + + return result; + } + + // this is like SendToReady - but it doesn't check the ready flag on the connection. + // this is used for ObjectDestroy messages. + static bool SendToObservers(GameObject contextObj, short msgType, MessageBase msg) + { + if (LogFilter.logDev) { Debug.Log("Server.SendToObservers id:" + msgType); } + + bool result = true; + var uv = contextObj.GetComponent(); + if (uv == null || uv.observers == null) + return false; + + int count = uv.observers.Count; + for (int i = 0; i < count; i++) + { + var conn = uv.observers[i]; + result &= conn.Send(msgType, msg); + } + return result; + } + + /// + /// Send a message structure with the given type number to only clients which are ready. + /// See Networking.NetworkClient.Ready. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ReadyMsgTypes + /// { + /// public static short MSG_LOGIN_RESPONSE = 1000; + /// public static short MSG_SCORE = 1005; + /// }; + /// + /// public class ReadyScoreMessage : MessageBase + /// { + /// public int score; + /// public Vector3 scorePos; + /// } + /// + /// class GameServer + /// { + /// public GameObject gameObject; + /// + /// void SendScore(int score, Vector3 scorePos) + /// { + /// ReadyScoreMessage msg = new ReadyScoreMessage(); + /// msg.score = score; + /// msg.scorePos = scorePos; + /// NetworkServer.SendToReady(gameObject, ReadyMsgTypes.MSG_SCORE, msg); + /// } + /// } + /// + /// + /// + /// Message type. + /// Message structure. + /// Success if message is sent. + static public bool SendToReady(GameObject contextObj, short msgType, MessageBase msg) + { + if (LogFilter.logDev) { Debug.Log("Server.SendToReady id:" + msgType); } + + if (contextObj == null) + { + for (int i = 0; i < connections.Count; i++) + { + NetworkConnection conn = connections[i]; + if (conn != null && conn.isReady) + { + conn.Send(msgType, msg); + } + } + return true; + } + + bool result = true; + var uv = contextObj.GetComponent(); + if (uv == null || uv.observers == null) + return false; + + int count = uv.observers.Count; + for (int i = 0; i < count; i++) + { + var conn = uv.observers[i]; + if (!conn.isReady) + continue; + + result &= conn.Send(msgType, msg); + } + return result; + } + + /// + /// Sends the contents of a NetworkWriter object to the ready players. + /// + /// + /// The writer object to send. + /// The QoS channel to send the data on. + static public void SendWriterToReady(GameObject contextObj, NetworkWriter writer, int channelId) + { + if (writer.AsArraySegment().Count > short.MaxValue) + { + throw new UnityException("NetworkWriter used buffer is too big!"); + } + SendBytesToReady(contextObj, writer.AsArraySegment().Array, writer.AsArraySegment().Count, channelId); + } + + /// + /// This sends an array of bytes to all ready players. + /// This bypasses the usual serialization and message structures, allowing raw bytes to be send to all ready players. The contents will be processed as a message on the client of the player, so it must be structured properly. + /// + /// + /// Array of bytes to send. + /// Size of array. + /// Transport layer channel id to send bytes on. + static public void SendBytesToReady(GameObject contextObj, byte[] buffer, int numBytes, int channelId) + { + if (contextObj == null) + { + // no context.. send to all ready connections + bool success = true; + for (int i = 0; i < connections.Count; i++) + { + NetworkConnection conn = connections[i]; + if (conn != null && conn.isReady) + { + if (!conn.SendBytes(buffer, numBytes, channelId)) + { + success = false; + } + } + } + if (!success) + { + if (LogFilter.logWarn) { Debug.LogWarning("SendBytesToReady failed"); } + } + return; + } + + var uv = contextObj.GetComponent(); + try + { + bool success = true; + int count = uv.observers.Count; + for (int i = 0; i < count; i++) + { + var conn = uv.observers[i]; + if (!conn.isReady) + continue; + + if (!conn.SendBytes(buffer, numBytes, channelId)) + { + success = false; + } + } + if (!success) + { + if (LogFilter.logWarn) { Debug.LogWarning("SendBytesToReady failed for " + contextObj); } + } + } + catch (NullReferenceException) + { + // observers may be null if object has not been spawned + if (LogFilter.logWarn) { Debug.LogWarning("SendBytesToReady object " + contextObj + " has not been spawned"); } + } + } + + /// + /// This sends an array of bytes to a specific player. + /// This bypasses the usual serialization and message structures, allowing raw bytes to be send to a player. The contents will be processed as a message on the client of the player, so it must be structured properly. + /// + /// The player to send the bytes to. + /// Array of bytes to send. + /// Size of array. + /// Transport layer channel id to send bytes on. + public static void SendBytesToPlayer(GameObject player, byte[] buffer, int numBytes, int channelId) + { + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn == null) + continue; + + for (int j = 0; j < conn.playerControllers.Count; j++) + { + if (conn.playerControllers[j].IsValid && conn.playerControllers[j].gameObject == player) + { + conn.SendBytes(buffer, numBytes, channelId); + break; + } + } + } + } + + /// + /// Send given message structure as an unreliable message to all connected clients. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class UnreliableMsgTypes + /// { + /// public static short MSG_LOGIN_RESPONSE = 1000; + /// public static short MSG_SCORE = 1005; + /// }; + /// + /// public class UnreliableScoreMessage : MessageBase + /// { + /// public int score; + /// public Vector3 scorePos; + /// } + /// + /// class GameServer + /// { + /// void SendScore(int score, Vector3 scorePos) + /// { + /// UnreliableScoreMessage msg = new UnreliableScoreMessage(); + /// msg.score = score; + /// msg.scorePos = scorePos; + /// NetworkServer.SendUnreliableToAll(UnreliableMsgTypes.MSG_SCORE, msg); + /// } + /// } + /// + /// + /// Message type. + /// Message structure. + /// Success if message is sent. + static public bool SendUnreliableToAll(short msgType, MessageBase msg) + { + if (LogFilter.logDev) { Debug.Log("Server.SendUnreliableToAll msgType:" + msgType); } + + bool result = true; + for (int i = 0; i < connections.Count; i++) + { + NetworkConnection conn = connections[i]; + if (conn != null) + result &= conn.SendUnreliable(msgType, msg); + } + return result; + } + + /// + /// Send given message structure as an unreliable message only to ready clients. + /// See Networking.NetworkClient.Ready. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class UnreliableMessageTypes + /// { + /// public static short MSG_LOGIN_RESPONSE = 1000; + /// public static short MSG_SCORE = 1005; + /// }; + /// + /// public class UnreliableMessage : MessageBase + /// { + /// public int score; + /// public Vector3 scorePos; + /// } + /// + /// class GameServer + /// { + /// public GameObject gameObject; + /// + /// void SendScore(int score, Vector3 scorePos) + /// { + /// UnreliableMessage msg = new UnreliableMessage(); + /// msg.score = score; + /// msg.scorePos = scorePos; + /// NetworkServer.SendUnreliableToReady(gameObject, UnreliableMessageTypes.MSG_SCORE, msg); + /// } + /// } + /// + /// + /// + /// Message type. + /// Message structure. + /// Success if message is sent. + static public bool SendUnreliableToReady(GameObject contextObj, short msgType, MessageBase msg) + { + if (LogFilter.logDev) { Debug.Log("Server.SendUnreliableToReady id:" + msgType); } + + if (contextObj == null) + { + // no context.. send to all ready connections + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null && conn.isReady) + { + conn.SendUnreliable(msgType, msg); + } + } + return true; + } + + bool result = true; + var uv = contextObj.GetComponent(); + int count = uv.observers.Count; + for (int i = 0; i < count; i++) + { + var conn = uv.observers[i]; + if (!conn.isReady) + continue; + + result &= conn.SendUnreliable(msgType, msg); + } + return result; + } + + /// + /// Sends a network message to all connected clients on a specified transport layer QoS channel. + /// + /// The message id. + /// The message to send. + /// The transport layer channel to use. + /// True if the message was sent. + static public bool SendByChannelToAll(short msgType, MessageBase msg, int channelId) + { + if (LogFilter.logDev) { Debug.Log("Server.SendByChannelToAll id:" + msgType); } + + bool result = true; + + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null) + result &= conn.SendByChannel(msgType, msg, channelId); + } + return result; + } + + /// + /// Sends a network message to all connected clients that are "ready" on a specified transport layer QoS channel. + /// + /// An object to use for context when calculating object visibility. If null, then the message is sent to all ready clients. + /// The message id. + /// The message to send. + /// The transport layer channel to send on. + /// True if the message was sent. + static public bool SendByChannelToReady(GameObject contextObj, short msgType, MessageBase msg, int channelId) + { + if (LogFilter.logDev) { Debug.Log("Server.SendByChannelToReady msgType:" + msgType); } + + if (contextObj == null) + { + // no context.. send to all ready connections + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null && conn.isReady) + { + conn.SendByChannel(msgType, msg, channelId); + } + } + return true; + } + + bool result = true; + var uv = contextObj.GetComponent(); + int count = uv.observers.Count; + for (int i = 0; i < count; i++) + { + var conn = uv.observers[i]; + if (!conn.isReady) + continue; + + result &= conn.SendByChannel(msgType, msg, channelId); + } + return result; + } + + /// + /// Disconnect all currently connected clients. + /// This can only be called on the server. Clients will receive the Disconnect message. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : MonoBehaviour + /// { + /// enum GameState + /// { + /// kInit, + /// kStart + /// } + /// GameState state; + /// + /// public void Update() + /// { + /// if (state != GameState.kInit) + /// { + /// if (Input.GetKey(KeyCode.Escape)) + /// { + /// Debug.Log("Disconnecting all!"); + /// NetworkServer.DisconnectAll(); + /// Application.LoadLevel("empty"); + /// state = GameState.kStart; + /// } + /// } + /// } + /// } + /// + /// + static public void DisconnectAll() + { + instance.InternalDisconnectAll(); + } + + internal void InternalDisconnectAll() + { + m_SimpleServerSimple.DisconnectAllConnections(); + + if (m_LocalConnection != null) + { + m_LocalConnection.Disconnect(); + m_LocalConnection.Dispose(); + m_LocalConnection = null; + } + + m_LocalClientActive = false; + } + + // The user should never need to pump the update loop manually + internal static void Update() + { + if (s_Instance != null) + s_Instance.InternalUpdate(); + } + + void UpdateServerObjects() + { + foreach (var uv in objects.Values) + { + try + { + uv.UNetUpdate(); + } + catch (NullReferenceException) + { + //ignore nulls here.. they will be cleaned up by CheckForNullObjects below + } + catch (MissingReferenceException) + { + //ignore missing ref here.. they will be cleaned up by CheckForNullObjects below + } + } + + // check for nulls in this list every N updates. doing it every frame is expensive and unneccessary + if (m_RemoveListCount++ % k_RemoveListInterval == 0) + CheckForNullObjects(); + } + + void CheckForNullObjects() + { + // cant iterate through Values here, since we need the keys of null objects to add to remove list. + foreach (var k in objects.Keys) + { + var uv = objects[k]; + if (uv == null || uv.gameObject == null) + { + m_RemoveList.Add(k); + } + } + if (m_RemoveList.Count > 0) + { + foreach (var remove in m_RemoveList) + { + objects.Remove(remove); + } + m_RemoveList.Clear(); + } + } + + internal void InternalUpdate() + { + m_SimpleServerSimple.Update(); + + if (m_DontListen) + { + m_SimpleServerSimple.UpdateConnections(); + } + + UpdateServerObjects(); + } + + void OnConnected(NetworkConnection conn) + { + if (LogFilter.logDebug) { Debug.Log("Server accepted client:" + conn.connectionId); } + + // add player info + conn.SetMaxDelay(m_MaxDelay); + + conn.InvokeHandlerNoData(MsgType.Connect); + + SendCrc(conn); + } + + void OnDisconnected(NetworkConnection conn) + { + conn.InvokeHandlerNoData(MsgType.Disconnect); + + for (int i = 0; i < conn.playerControllers.Count; i++) + { + if (conn.playerControllers[i].gameObject != null) + { + //NOTE: should there be default behaviour here to destroy the associated player? + if (LogFilter.logWarn) { Debug.LogWarning("Player not destroyed when connection disconnected."); } + } + } + + if (LogFilter.logDebug) { Debug.Log("Server lost client:" + conn.connectionId); } + conn.RemoveObservers(); + conn.Dispose(); + } + + void OnData(NetworkConnection conn, int receivedSize, int channelId) + { +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.LLAPIMsg); +#endif + conn.TransportReceive(m_SimpleServerSimple.messageBuffer, receivedSize, channelId); + } + + private void GenerateConnectError(int error) + { + if (LogFilter.logError) { Debug.LogError("UNet Server Connect Error: " + error); } + GenerateError(null, error); + } + + private void GenerateDataError(NetworkConnection conn, int error) + { + NetworkError dataError = (NetworkError)error; + if (LogFilter.logError) { Debug.LogError("UNet Server Data Error: " + dataError); } + GenerateError(conn, error); + } + + private void GenerateDisconnectError(NetworkConnection conn, int error) + { + NetworkError disconnectError = (NetworkError)error; + if (LogFilter.logError) { Debug.LogError("UNet Server Disconnect Error: " + disconnectError + " conn:[" + conn + "]:" + conn.connectionId); } + GenerateError(conn, error); + } + + private void GenerateError(NetworkConnection conn, int error) + { + if (handlers.ContainsKey(MsgType.Error)) + { + ErrorMessage msg = new ErrorMessage(); + msg.errorCode = error; + + // write the message to a local buffer + NetworkWriter writer = new NetworkWriter(); + msg.Serialize(writer); + + // pass a reader (attached to local buffer) to handler + NetworkReader reader = new NetworkReader(writer); + conn.InvokeHandler(MsgType.Error, reader, 0); + } + } + + /// + /// Register a handler for a particular message type. + /// There are several system message types which you can add handlers for. You can also add your own message types. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class MyServer : NetworkManager + /// { + /// void Start() + /// { + /// Debug.Log("Registering server callbacks"); + /// NetworkServer.RegisterHandler(MsgType.Connect, OnConnected); + /// } + /// + /// void OnConnected(NetworkMessage netMsg) + /// { + /// Debug.Log("Client connected"); + /// } + /// } + /// + /// The system message types are listed below: + /// + /// class MsgType + /// { + /// public const short ObjectDestroy = 1; + /// public const short Rpc = 2; + /// public const short ObjectSpawn = 3; + /// public const short Owner = 4; + /// public const short Command = 5; + /// public const short LocalPlayerTransform = 6; + /// public const short SyncEvent = 7; + /// public const short UpdateVars = 8; + /// public const short SyncList = 9; + /// public const short ObjectSpawnScene = 10; + /// public const short NetworkInfo = 11; + /// public const short SpawnFinished = 12; + /// public const short ObjectHide = 13; + /// public const short CRC = 14; + /// public const short LocalClientAuthority = 15; + /// } + /// + ///Most of these messages are for internal use only. Users should not define message ids in this range. + /// + /// Message type number. + /// Function handler which will be invoked for when this message type is received. + static public void RegisterHandler(short msgType, NetworkMessageDelegate handler) + { + instance.m_SimpleServerSimple.RegisterHandler(msgType, handler); + } + + /// + /// Unregisters a handler for a particular message type. + /// + /// The message type to remove the handler for. + static public void UnregisterHandler(short msgType) + { + instance.m_SimpleServerSimple.UnregisterHandler(msgType); + } + + /// + /// Clear all registered callback handlers. + /// + static public void ClearHandlers() + { + instance.m_SimpleServerSimple.ClearHandlers(); + } + + /// + /// Clears all registered spawn prefab and spawn handler functions for this server. + /// + static public void ClearSpawners() + { + NetworkScene.ClearSpawners(); + } + + /// + /// Get outbound network statistics for the client. + /// + /// Number of messages sent so far (including collated messages send through buffer). + /// Number of messages sent through buffer. + /// Number of bytes sent so far. + /// Number of messages buffered for sending per second. + static public void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) + { + numMsgs = 0; + numBufferedMsgs = 0; + numBytes = 0; + lastBufferedPerSecond = 0; + + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null) + { + int snumMsgs; + int snumBufferedMsgs; + int snumBytes; + int slastBufferedPerSecond; + + conn.GetStatsOut(out snumMsgs, out snumBufferedMsgs, out snumBytes, out slastBufferedPerSecond); + + numMsgs += snumMsgs; + numBufferedMsgs += snumBufferedMsgs; + numBytes += snumBytes; + lastBufferedPerSecond += slastBufferedPerSecond; + } + } + } + + /// + /// Get inbound network statistics for the server. + /// + /// Number of messages received so far. + /// Number of bytes received so far. + static public void GetStatsIn(out int numMsgs, out int numBytes) + { + numMsgs = 0; + numBytes = 0; + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null) + { + int cnumMsgs; + int cnumBytes; + + conn.GetStatsIn(out cnumMsgs, out cnumBytes); + + numMsgs += cnumMsgs; + numBytes += cnumBytes; + } + } + } + + /// + /// Send a message to the client which owns the given player object instance. + /// This function is not very efficient. It is better to send a message directly on the connection object of the player - which can be obtained from the "connectionToClient" member variable on NetworkBehaviour components. + /// + /// The players game object. + /// Message type. + /// Message struct. + // send this message to the player only + static public void SendToClientOfPlayer(GameObject player, short msgType, MessageBase msg) + { + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null) + { + for (int j = 0; j < conn.playerControllers.Count; j++) + { + if (conn.playerControllers[j].IsValid && conn.playerControllers[j].gameObject == player) + { + conn.Send(msgType, msg); + return; + } + } + } + } + + if (LogFilter.logError) { Debug.LogError("Failed to send message to player object '" + player.name + ", not found in connection list"); } + } + + /// + /// Send a message to the client which owns the given connection ID. + /// It accepts the connection ID as a parameter as well as a message and MsgType. Remember to set the client up for receiving the messages by using NetworkClient.RegisterHandler. Also, for user messages you must use a MsgType with a higher ID number than MsgType.Highest. + /// + /// //The code shows how to set up a message, the MsgType and how to get the connectionID. + /// //It also shows how to send the message to the client, as well as receive it. + /// //Attach this script to a GameObject + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.Networking.NetworkSystem; + /// + /// //Create a class for the message you send to the Client + /// public class RegisterHostMessage : MessageBase + /// { + /// public string m_Name; + /// public string m_Comment; + /// } + /// + /// public class Example : NetworkManager + /// { + /// RegisterHostMessage m_Message; + /// //This is the Message Type you want to send to the Client. User messages must be above the Highest Message Type. + /// public const short m_MessageType = MsgType.Highest + 1; + /// + /// //Detect when a client connects to the Server + /// public override void OnServerConnect(NetworkConnection connection) + /// { + /// //Change the message to read the Player's connection ID and a comment + /// EditMessage("Player " + connection.connectionId, "Hi there."); + /// //Send the new message to the Client using the Server + /// NetworkServer.SendToClient(connection.connectionId, m_MessageType, m_Message); + /// } + /// + /// //On the Client's side, detect when it connects to a Server + /// public override void OnClientConnect(NetworkConnection connection) + /// { + /// //Register and receive the message on the Client's side + /// client.RegisterHandler(m_MessageType, ReceiveMessage); + /// } + /// + /// //Use this to edit the message to read what you want + /// void EditMessage(string myName, string myComment) + /// { + /// m_Message = new RegisterHostMessage(); + /// //Change the message name and comment to be the ones you set + /// m_Message.m_Name = myName; + /// m_Message.m_Comment = myComment; + /// } + /// + /// //Use this to receive the message from the Server on the Client's side + /// public void ReceiveMessage(NetworkMessage networkMessage) + /// { + /// //Read the message that comes in + /// RegisterHostMessage hostMessage = networkMessage.ReadMessage<RegisterHostMessage>(); + /// //Store the name and comment as variables + /// string receivedName = hostMessage.m_Name; + /// string receivedComment = hostMessage.m_Comment; + /// //Output the Player name and comment + /// Debug.Log("Player Name : " + receivedName); + /// Debug.Log("Player Comment : " + receivedComment); + /// } + /// } + /// + /// + /// Client connection ID. + /// Message struct to send. + /// Message type. + static public void SendToClient(int connectionId, short msgType, MessageBase msg) + { + if (connectionId < connections.Count) + { + var conn = connections[connectionId]; + if (conn != null) + { + conn.Send(msgType, msg); + return; + } + } + if (LogFilter.logError) { Debug.LogError("Failed to send message to connection ID '" + connectionId + ", not found in connection list"); } + } + + static public bool ReplacePlayerForConnection(NetworkConnection conn, GameObject player, short playerControllerId, NetworkHash128 assetId) + { + NetworkIdentity id; + if (GetNetworkIdentity(player, out id)) + { + id.SetDynamicAssetId(assetId); + } + return instance.InternalReplacePlayerForConnection(conn, player, playerControllerId); + } + + /// + /// This replaces the player object for a connection with a different player object. The old player object is not destroyed. + /// If a connection already has a player object, this can be used to replace that object with a different player object. This does NOT change the ready state of the connection, so it can safely be used while changing scenes. + /// + /// Connection which is adding the player. + /// Player object spawned for the player. + /// The player controller ID number as specified by client. + /// True if player was replaced. + static public bool ReplacePlayerForConnection(NetworkConnection conn, GameObject player, short playerControllerId) + { + return instance.InternalReplacePlayerForConnection(conn, player, playerControllerId); + } + + static public bool AddPlayerForConnection(NetworkConnection conn, GameObject player, short playerControllerId, NetworkHash128 assetId) + { + NetworkIdentity id; + if (GetNetworkIdentity(player, out id)) + { + id.SetDynamicAssetId(assetId); + } + return instance.InternalAddPlayerForConnection(conn, player, playerControllerId); + } + /// + /// When an AddPlayer message handler has received a request from a player, the server calls this to associate the player object with the connection. + /// When a player is added for a connection, the client for that connection is made ready automatically. The player object is automatically spawned, so you do not need to call NetworkServer.Spawn for that object. This function is used for "adding" a player, not for "replacing" the player on a connection. If there is already a player on this playerControllerId for this connection, this will fail. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// class MyServer : MonoBehaviour + /// { + /// public GameObject playerPrefab; + /// + /// void Start() + /// { + /// NetworkServer.RegisterHandler(MsgType.AddPlayer, OnAddPlayerMessage); + /// } + /// + /// void OnAddPlayerMessage(NetworkMessage netMsg) + /// { + /// GameObject thePlayer = (GameObject)Instantiate(playerPrefab, Vector3.zero, Quaternion.identity); + /// // This spawns the new player on all clients + /// NetworkServer.AddPlayerForConnection(conn, thePlayer, 0); + /// } + /// } + /// + /// + /// Connection which is adding the player. + /// Player object spawned for the player. + /// The player controller ID number as specified by client. + /// True if player was added. + static public bool AddPlayerForConnection(NetworkConnection conn, GameObject player, short playerControllerId) + { + return instance.InternalAddPlayerForConnection(conn, player, playerControllerId); + } + + internal bool InternalAddPlayerForConnection(NetworkConnection conn, GameObject playerGameObject, short playerControllerId) + { + NetworkIdentity playerNetworkIdentity; + if (!GetNetworkIdentity(playerGameObject, out playerNetworkIdentity)) + { + if (LogFilter.logError) { Debug.Log("AddPlayer: playerGameObject has no NetworkIdentity. Please add a NetworkIdentity to " + playerGameObject); } + return false; + } + playerNetworkIdentity.Reset(); + + if (!CheckPlayerControllerIdForConnection(conn, playerControllerId)) + return false; + + // cannot have a player object in "Add" version + PlayerController oldController = null; + GameObject oldPlayer = null; + if (conn.GetPlayerController(playerControllerId, out oldController)) + { + oldPlayer = oldController.gameObject; + } + if (oldPlayer != null) + { + if (LogFilter.logError) { Debug.Log("AddPlayer: player object already exists for playerControllerId of " + playerControllerId); } + return false; + } + + PlayerController newPlayerController = new PlayerController(playerGameObject, playerControllerId); + conn.SetPlayerController(newPlayerController); + + // Set the playerControllerId on the NetworkIdentity on the server, NetworkIdentity.SetLocalPlayer is not called on the server (it is on clients and that sets the playerControllerId there) + playerNetworkIdentity.SetConnectionToClient(conn, newPlayerController.playerControllerId); + + SetClientReady(conn); + + if (SetupLocalPlayerForConnection(conn, playerNetworkIdentity, newPlayerController)) + { + return true; + } + + if (LogFilter.logDebug) { Debug.Log("Adding new playerGameObject object netId: " + playerGameObject.GetComponent().netId + " asset ID " + playerGameObject.GetComponent().assetId); } + + FinishPlayerForConnection(conn, playerNetworkIdentity, playerGameObject); + if (playerNetworkIdentity.localPlayerAuthority) + { + playerNetworkIdentity.SetClientOwner(conn); + } + return true; + } + + static bool CheckPlayerControllerIdForConnection(NetworkConnection conn, short playerControllerId) + { + if (playerControllerId < 0) + { + if (LogFilter.logError) { Debug.LogError("AddPlayer: playerControllerId of " + playerControllerId + " is negative"); } + return false; + } + if (playerControllerId > PlayerController.MaxPlayersPerClient) + { + if (LogFilter.logError) { Debug.Log("AddPlayer: playerControllerId of " + playerControllerId + " is too high. max is " + PlayerController.MaxPlayersPerClient); } + return false; + } + if (playerControllerId > PlayerController.MaxPlayersPerClient / 2) + { + if (LogFilter.logWarn) { Debug.LogWarning("AddPlayer: playerControllerId of " + playerControllerId + " is unusually high"); } + } + return true; + } + + bool SetupLocalPlayerForConnection(NetworkConnection conn, NetworkIdentity uv, PlayerController newPlayerController) + { + if (LogFilter.logDev) { Debug.Log("NetworkServer SetupLocalPlayerForConnection netID:" + uv.netId); } + + var localConnection = conn as ULocalConnectionToClient; + if (localConnection != null) + { + if (LogFilter.logDev) { Debug.Log("NetworkServer AddPlayer handling ULocalConnectionToClient"); } + + // Spawn this player for other players, instead of SpawnObject: + if (uv.netId.IsEmpty()) + { + // it is allowed to provide an already spawned object as the new player object. + // so dont spawn it again. + uv.OnStartServer(true); + } + uv.RebuildObservers(true); + SendSpawnMessage(uv, null); + + // Set up local player instance on the client instance and update local object map + localConnection.localClient.AddLocalPlayer(newPlayerController); + uv.SetClientOwner(conn); + + // Trigger OnAuthority + uv.ForceAuthority(true); + + // Trigger OnStartLocalPlayer + uv.SetLocalPlayer(newPlayerController.playerControllerId); + return true; + } + return false; + } + + static void FinishPlayerForConnection(NetworkConnection conn, NetworkIdentity uv, GameObject playerGameObject) + { + if (uv.netId.IsEmpty()) + { + // it is allowed to provide an already spawned object as the new player object. + // so dont spawn it again. + Spawn(playerGameObject); + } + + OwnerMessage owner = new OwnerMessage(); + owner.netId = uv.netId; + owner.playerControllerId = uv.playerControllerId; + conn.Send(MsgType.Owner, owner); + } + + internal bool InternalReplacePlayerForConnection(NetworkConnection conn, GameObject playerGameObject, short playerControllerId) + { + NetworkIdentity playerNetworkIdentity; + if (!GetNetworkIdentity(playerGameObject, out playerNetworkIdentity)) + { + if (LogFilter.logError) { Debug.LogError("ReplacePlayer: playerGameObject has no NetworkIdentity. Please add a NetworkIdentity to " + playerGameObject); } + return false; + } + + if (!CheckPlayerControllerIdForConnection(conn, playerControllerId)) + return false; + + //NOTE: there can be an existing player + if (LogFilter.logDev) { Debug.Log("NetworkServer ReplacePlayer"); } + + // is there already an owner that is a different object?? + PlayerController oldOwner; + if (conn.GetPlayerController(playerControllerId, out oldOwner)) + { + oldOwner.unetView.SetNotLocalPlayer(); + oldOwner.unetView.ClearClientOwner(); + } + + PlayerController newPlayerController = new PlayerController(playerGameObject, playerControllerId); + conn.SetPlayerController(newPlayerController); + + // Set the playerControllerId on the NetworkIdentity on the server, NetworkIdentity.SetLocalPlayer is not called on the server (it is on clients and that sets the playerControllerId there) + playerNetworkIdentity.SetConnectionToClient(conn, newPlayerController.playerControllerId); + + //NOTE: DONT set connection ready. + + if (LogFilter.logDev) { Debug.Log("NetworkServer ReplacePlayer setup local"); } + + if (SetupLocalPlayerForConnection(conn, playerNetworkIdentity, newPlayerController)) + { + return true; + } + + if (LogFilter.logDebug) { Debug.Log("Replacing playerGameObject object netId: " + playerGameObject.GetComponent().netId + " asset ID " + playerGameObject.GetComponent().assetId); } + + FinishPlayerForConnection(conn, playerNetworkIdentity, playerGameObject); + if (playerNetworkIdentity.localPlayerAuthority) + { + playerNetworkIdentity.SetClientOwner(conn); + } + return true; + } + + static bool GetNetworkIdentity(GameObject go, out NetworkIdentity view) + { + view = go.GetComponent(); + if (view == null) + { + if (LogFilter.logError) { Debug.LogError("UNET failure. GameObject doesn't have NetworkIdentity."); } + return false; + } + return true; + } + + /// + /// Sets the client to be ready. + /// When a client has signaled that it is ready, this method tells the server that the client is ready to receive spawned objects and state synchronization updates. This is usually called in a handler for the SYSTEM_READY message. If there is not specific action a game needs to take for this message, relying on the default ready handler function is probably fine, so this call wont be needed. + /// + /// The connection of the client to make ready. + static public void SetClientReady(NetworkConnection conn) + { + instance.SetClientReadyInternal(conn); + } + + internal void SetClientReadyInternal(NetworkConnection conn) + { + if (LogFilter.logDebug) { Debug.Log("SetClientReadyInternal for conn:" + conn.connectionId); } + + if (conn.isReady) + { + if (LogFilter.logDebug) { Debug.Log("SetClientReady conn " + conn.connectionId + " already ready"); } + return; + } + + if (conn.playerControllers.Count == 0) + { + // this is now allowed + if (LogFilter.logDebug) { Debug.LogWarning("Ready with no player object"); } + } + + conn.isReady = true; + + var localConnection = conn as ULocalConnectionToClient; + if (localConnection != null) + { + if (LogFilter.logDev) { Debug.Log("NetworkServer Ready handling ULocalConnectionToClient"); } + + // Setup spawned objects for local player + // Only handle the local objects for the first player (no need to redo it when doing more local players) + // and don't handle player objects here, they were done above + foreach (NetworkIdentity uv in objects.Values) + { + // Need to call OnStartClient directly here, as it's already been added to the local object dictionary + // in the above SetLocalPlayer call + if (uv != null && uv.gameObject != null) + { + var vis = uv.OnCheckObserver(conn); + if (vis) + { + uv.AddObserver(conn); + } + if (!uv.isClient) + { + if (LogFilter.logDev) { Debug.Log("LocalClient.SetSpawnObject calling OnStartClient"); } + uv.OnStartClient(); + } + } + } + return; + } + + // Spawn/update all current server objects + if (LogFilter.logDebug) { Debug.Log("Spawning " + objects.Count + " objects for conn " + conn.connectionId); } + + ObjectSpawnFinishedMessage msg = new ObjectSpawnFinishedMessage(); + msg.state = 0; + conn.Send(MsgType.SpawnFinished, msg); + + foreach (NetworkIdentity uv in objects.Values) + { + if (uv == null) + { + if (LogFilter.logWarn) { Debug.LogWarning("Invalid object found in server local object list (null NetworkIdentity)."); } + continue; + } + if (!uv.gameObject.activeSelf) + { + continue; + } + + if (LogFilter.logDebug) { Debug.Log("Sending spawn message for current server objects name='" + uv.gameObject.name + "' netId=" + uv.netId); } + + var vis = uv.OnCheckObserver(conn); + if (vis) + { + uv.AddObserver(conn); + } + } + + msg.state = 1; + conn.Send(MsgType.SpawnFinished, msg); + } + + static internal void ShowForConnection(NetworkIdentity uv, NetworkConnection conn) + { + if (conn.isReady) + instance.SendSpawnMessage(uv, conn); + } + + static internal void HideForConnection(NetworkIdentity uv, NetworkConnection conn) + { + ObjectDestroyMessage msg = new ObjectDestroyMessage(); + msg.netId = uv.netId; + conn.Send(MsgType.ObjectHide, msg); + } + + /// + /// Marks all connected clients as no longer ready. + /// All clients will no longer be sent state synchronization updates. The player's clients can call ClientManager.Ready() again to re-enter the ready state. This is useful when switching scenes. + /// + // call this to make all the clients not ready, such as when changing levels. + static public void SetAllClientsNotReady() + { + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null) + { + SetClientNotReady(conn); + } + } + } + + /// + /// Sets the client of the connection to be not-ready. + /// Clients that are not ready do not receive spawned objects or state synchronization updates. They client can be made ready again by calling SetClientReady(). + /// + /// The connection of the client to make not ready. + static public void SetClientNotReady(NetworkConnection conn) + { + instance.InternalSetClientNotReady(conn); + } + + internal void InternalSetClientNotReady(NetworkConnection conn) + { + if (conn.isReady) + { + if (LogFilter.logDebug) { Debug.Log("PlayerNotReady " + conn); } + conn.isReady = false; + conn.RemoveObservers(); + + NotReadyMessage msg = new NotReadyMessage(); + conn.Send(MsgType.NotReady, msg); + } + } + + // default ready handler. + static void OnClientReadyMessage(NetworkMessage netMsg) + { + if (LogFilter.logDebug) { Debug.Log("Default handler for ready message from " + netMsg.conn); } + SetClientReady(netMsg.conn); + } + + // default remove player handler + static void OnRemovePlayerMessage(NetworkMessage netMsg) + { + netMsg.ReadMessage(s_RemovePlayerMessage); + + PlayerController player = null; + netMsg.conn.GetPlayerController(s_RemovePlayerMessage.playerControllerId, out player); + if (player != null) + { + netMsg.conn.RemovePlayerController(s_RemovePlayerMessage.playerControllerId); + Destroy(player.gameObject); + } + else + { + if (LogFilter.logError) { Debug.LogError("Received remove player message but could not find the player ID: " + s_RemovePlayerMessage.playerControllerId); } + } + } + + // Handle command from specific player, this could be one of multiple players on a single client + static void OnCommandMessage(NetworkMessage netMsg) + { + int cmdHash = (int)netMsg.reader.ReadPackedUInt32(); + var netId = netMsg.reader.ReadNetworkId(); + + var cmdObject = FindLocalObject(netId); + if (cmdObject == null) + { + if (LogFilter.logWarn) { Debug.LogWarning("Instance not found when handling Command message [netId=" + netId + "]"); } + return; + } + + var uv = cmdObject.GetComponent(); + if (uv == null) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkIdentity deleted when handling Command message [netId=" + netId + "]"); } + return; + } + + // Commands can be for player objects, OR other objects with client-authority + bool foundOwner = false; + for (int i = 0; i < netMsg.conn.playerControllers.Count; i++) + { + var p = netMsg.conn.playerControllers[i]; + if (p.gameObject != null && p.gameObject.GetComponent().netId == uv.netId) + { + foundOwner = true; + break; + } + } + if (!foundOwner) + { + if (uv.clientAuthorityOwner != netMsg.conn) + { + if (LogFilter.logWarn) { Debug.LogWarning("Command for object without authority [netId=" + netId + "]"); } + return; + } + } + + if (LogFilter.logDev) { Debug.Log("OnCommandMessage for netId=" + netId + " conn=" + netMsg.conn); } + uv.HandleCommand(cmdHash, netMsg.reader); + } + + internal void SpawnObject(GameObject obj) + { + if (!NetworkServer.active) + { + if (LogFilter.logError) { Debug.LogError("SpawnObject for " + obj + ", NetworkServer is not active. Cannot spawn objects without an active server."); } + return; + } + + NetworkIdentity objNetworkIdentity; + if (!GetNetworkIdentity(obj, out objNetworkIdentity)) + { + if (LogFilter.logError) { Debug.LogError("SpawnObject " + obj + " has no NetworkIdentity. Please add a NetworkIdentity to " + obj); } + return; + } + objNetworkIdentity.Reset(); + + objNetworkIdentity.OnStartServer(false); + + if (LogFilter.logDebug) { Debug.Log("SpawnObject instance ID " + objNetworkIdentity.netId + " asset ID " + objNetworkIdentity.assetId); } + + objNetworkIdentity.RebuildObservers(true); + //SendSpawnMessage(objNetworkIdentity, null); + } + + /* + TODO: optimize BuildSpawnMsg to not do allocations. + - this would need a static m_MsgStreamOut and m_MsgWriter. + - payload needs to be separate sub-msg? + + internal short BuildSpawnBytes(NetworkIdentity uv) + { + m_MsgStreamIn.Seek(0, SeekOrigin.Begin); + m_MsgWriter.Serialize((short)0); // space for size + m_MsgWriter.UWriteUInt32((uint)MsgType.ObjectSpawn); + m_MsgWriter.UWriteUInt32(uv.netId); + m_MsgWriter.Serialize(uv.spawnType); + m_MsgWriter.Serialize(uv.assetId); + m_MsgWriter.Serialize(uv.transform.position); + //payload - this is optional? + uv.UNetSerializeTransform(m_MsgWriter, true); + uv.UNetSerializeVars(m_MsgWriter, true); + + short sz = (short)(m_MsgStreamIn.Position - sizeof(short)); + m_MsgStreamIn.Seek(0, SeekOrigin.Begin); + m_MsgWriter.Serialize(sz); + + return (short)(sz + sizeof(short)); + }*/ + + internal void SendSpawnMessage(NetworkIdentity uv, NetworkConnection conn) + { + if (uv.serverOnly) + return; + + if (uv.sceneId.IsEmpty()) + { + ObjectSpawnMessage msg = new ObjectSpawnMessage(); + msg.netId = uv.netId; + msg.assetId = uv.assetId; + msg.position = uv.transform.position; + msg.rotation = uv.transform.rotation; + + // include synch data + NetworkWriter writer = new NetworkWriter(); + uv.UNetSerializeAllVars(writer); + if (writer.Position > 0) + { + msg.payload = writer.ToArray(); + } + + if (conn != null) + { + conn.Send(MsgType.ObjectSpawn, msg); + } + else + { + SendToReady(uv.gameObject, MsgType.ObjectSpawn, msg); + } + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.ObjectSpawn, uv.assetId.ToString()); +#endif + } + else + { + ObjectSpawnSceneMessage msg = new ObjectSpawnSceneMessage(); + msg.netId = uv.netId; + msg.sceneId = uv.sceneId; + msg.position = uv.transform.position; + + // include synch data + NetworkWriter writer = new NetworkWriter(); + uv.UNetSerializeAllVars(writer); + if (writer.Position > 0) + { + msg.payload = writer.ToArray(); + } + + if (conn != null) + { + conn.Send(MsgType.ObjectSpawnScene, msg); + } + else + { + SendToReady(uv.gameObject, MsgType.ObjectSpawn, msg); + } + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.ObjectSpawnScene, "sceneId"); +#endif + } + } + + /// + /// This destroys all the player objects associated with a NetworkConnections on a server. + /// This is used when a client disconnects, to remove the players for that client. This also destroys non-player objects that have client authority set for this connection. + /// + /// The connections object to clean up for. + static public void DestroyPlayersForConnection(NetworkConnection conn) + { + if (conn.playerControllers.Count == 0) + { + if (LogFilter.logWarn) { Debug.LogWarning("Empty player list given to NetworkServer.Destroy(), nothing to do."); } + return; + } + + if (conn.clientOwnedObjects != null) + { + var tmp = new HashSet(conn.clientOwnedObjects); + foreach (var netId in tmp) + { + var obj = FindLocalObject(netId); + if (obj != null) + { + DestroyObject(obj); + } + } + } + + for (int i = 0; i < conn.playerControllers.Count; i++) + { + var player = conn.playerControllers[i]; + if (player.IsValid) + { + if (player.unetView == null) + { + // the playerController's object has been destroyed, but RemovePlayerForConnection was never called. + // this is ok, just dont double destroy it. + } + else + { + DestroyObject(player.unetView, true); + } + player.gameObject = null; + } + } + conn.playerControllers.Clear(); + } + + static void UnSpawnObject(GameObject obj) + { + if (obj == null) + { + if (LogFilter.logDev) { Debug.Log("NetworkServer UnspawnObject is null"); } + return; + } + + NetworkIdentity objNetworkIdentity; + if (!GetNetworkIdentity(obj, out objNetworkIdentity)) return; + + UnSpawnObject(objNetworkIdentity); + } + + static void UnSpawnObject(NetworkIdentity uv) + { + DestroyObject(uv, false); + } + + static void DestroyObject(GameObject obj) + { + if (obj == null) + { + if (LogFilter.logDev) { Debug.Log("NetworkServer DestroyObject is null"); } + return; + } + + NetworkIdentity objNetworkIdentity; + if (!GetNetworkIdentity(obj, out objNetworkIdentity)) return; + + DestroyObject(objNetworkIdentity, true); + } + + static void DestroyObject(NetworkIdentity uv, bool destroyServerObject) + { + if (LogFilter.logDebug) { Debug.Log("DestroyObject instance:" + uv.netId); } + if (objects.ContainsKey(uv.netId)) + { + objects.Remove(uv.netId); + } + + if (uv.clientAuthorityOwner != null) + { + uv.clientAuthorityOwner.RemoveOwnedObject(uv); + } + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.ObjectDestroy, uv.assetId.ToString()); +#endif + + ObjectDestroyMessage msg = new ObjectDestroyMessage(); + msg.netId = uv.netId; + SendToObservers(uv.gameObject, MsgType.ObjectDestroy, msg); + + uv.ClearObservers(); + if (NetworkClient.active && instance.m_LocalClientActive) + { + uv.OnNetworkDestroy(); + ClientScene.SetLocalObject(msg.netId, null); + } + + // when unspawning, dont destroy the server's object + if (destroyServerObject) + { + Object.Destroy(uv.gameObject); + } + uv.MarkForReset(); + } + + /// + /// This clears all of the networked objects that the server is aware of. This can be required if a scene change deleted all of the objects without destroying them in the normal manner. + /// + static public void ClearLocalObjects() + { + objects.Clear(); + } + + /// + /// Spawn the given game object on all clients which are ready. + /// This will cause a new object to be instantiated from the registered prefab, or from a custom spawn function. + /// + /// //Attach this script to the GameObject you would like to be spawned. + /// //Attach a NetworkIdentity component to your GameObject. Click and drag the GameObject into the Assets directory so that it becomes a prefab. + /// //The GameObject you assign in the Inspector spawns when the Client connects. To spawn a prefab GameObject, use Instantiate first before spawning the GameObject. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class Example : NetworkBehaviour + /// { + /// //Assign the prefab in the Inspector + /// public GameObject m_MyGameObject; + /// GameObject m_MyInstantiated; + /// + /// void Start() + /// { + /// //Instantiate the prefab + /// m_MyInstantiated = Instantiate(m_MyGameObject); + /// //Spawn the GameObject you assign in the Inspector + /// NetworkServer.Spawn(m_MyInstantiated); + /// } + /// } + /// + /// + /// Game object with NetworkIdentity to spawn. + static public void Spawn(GameObject obj) + { + if (!VerifyCanSpawn(obj)) + { + return; + } + + instance.SpawnObject(obj); + } + + static bool CheckForPrefab(GameObject obj) + { +#if UNITY_EDITOR + return UnityEditor.PrefabUtility.IsPartOfPrefabAsset(obj); +#else + return false; +#endif + } + + static bool VerifyCanSpawn(GameObject obj) + { + if (CheckForPrefab(obj)) + { + Debug.LogErrorFormat("GameObject {0} is a prefab, it can't be spawned. This will cause errors in builds.", obj.name); + return false; + } + + return true; + } + + /// + /// This spawns an object like NetworkServer.Spawn() but also assigns Client Authority to the specified client. + /// This is the same as calling NetworkIdentity.AssignClientAuthority on the spawned object. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// class TestBehaviour : NetworkBehaviour + /// { + /// public GameObject otherPrefab; + /// [Command] + /// public void CmdSpawn() + /// { + /// GameObject go = (GameObject)Instantiate(otherPrefab, transform.position + new Vector3(0, 1, 0), Quaternion.identity); + /// NetworkServer.SpawnWithClientAuthority(go, connectionToClient); + /// } + /// } + /// + /// + /// The object to spawn. + /// The player object to set Client Authority to. + /// + static public Boolean SpawnWithClientAuthority(GameObject obj, GameObject player) + { + var uv = player.GetComponent(); + if (uv == null) + { + Debug.LogError("SpawnWithClientAuthority player object has no NetworkIdentity"); + return false; + } + + if (uv.connectionToClient == null) + { + Debug.LogError("SpawnWithClientAuthority player object is not a player."); + return false; + } + + return SpawnWithClientAuthority(obj, uv.connectionToClient); + } + + /// + /// This spawns an object like NetworkServer.Spawn() but also assigns Client Authority to the specified client. + /// This is the same as calling NetworkIdentity.AssignClientAuthority on the spawned object. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// class TestBehaviour : NetworkBehaviour + /// { + /// public GameObject otherPrefab; + /// [Command] + /// public void CmdSpawn() + /// { + /// GameObject go = (GameObject)Instantiate(otherPrefab, transform.position + new Vector3(0, 1, 0), Quaternion.identity); + /// NetworkServer.SpawnWithClientAuthority(go, connectionToClient); + /// } + /// } + /// + /// + /// The object to spawn. + /// The connection to set Client Authority to. + /// + static public bool SpawnWithClientAuthority(GameObject obj, NetworkConnection conn) + { + if (!conn.isReady) + { + Debug.LogError("SpawnWithClientAuthority NetworkConnection is not ready!"); + return false; + } + + Spawn(obj); + + var uv = obj.GetComponent(); + if (uv == null || !uv.isServer) + { + // spawning the object failed. + return false; + } + + return uv.AssignClientAuthority(conn); + } + + /// + /// This spawns an object like NetworkServer.Spawn() but also assigns Client Authority to the specified client. + /// This is the same as calling NetworkIdentity.AssignClientAuthority on the spawned object. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// class TestBehaviour : NetworkBehaviour + /// { + /// public GameObject otherPrefab; + /// [Command] + /// public void CmdSpawn() + /// { + /// GameObject go = (GameObject)Instantiate(otherPrefab, transform.position + new Vector3(0, 1, 0), Quaternion.identity); + /// NetworkServer.SpawnWithClientAuthority(go, connectionToClient); + /// } + /// } + /// + /// + /// The object to spawn. + /// The assetId of the object to spawn. Used for custom spawn handlers. + /// The connection to set Client Authority to. + /// + static public bool SpawnWithClientAuthority(GameObject obj, NetworkHash128 assetId, NetworkConnection conn) + { + Spawn(obj, assetId); + + var uv = obj.GetComponent(); + if (uv == null || !uv.isServer) + { + // spawning the object failed. + return false; + } + + return uv.AssignClientAuthority(conn); + } + + static public void Spawn(GameObject obj, NetworkHash128 assetId) + { + if (!VerifyCanSpawn(obj)) + { + return; + } + + NetworkIdentity id; + if (GetNetworkIdentity(obj, out id)) + { + id.SetDynamicAssetId(assetId); + } + instance.SpawnObject(obj); + } + + /// + /// Destroys this object and corresponding objects on all clients. + /// In some cases it is useful to remove an object but not delete it on the server. For that, use NetworkServer.UnSpawn() instead of NetworkServer.Destroy(). + /// + /// Game object to destroy. + static public void Destroy(GameObject obj) + { + DestroyObject(obj); + } + + /// + /// This takes an object that has been spawned and un-spawns it. + /// The object will be removed from clients that it was spawned on, or the custom spawn handler function on the client will be called for the object. + /// Unlike when calling NetworkServer.Destroy(), on the server the object will NOT be destroyed. This allows the server to re-use the object, even spawn it again later. + /// + /// The spawned object to be unspawned. + static public void UnSpawn(GameObject obj) + { + UnSpawnObject(obj); + } + + internal bool InvokeBytes(ULocalConnectionToServer conn, byte[] buffer, int numBytes, int channelId) + { + NetworkReader reader = new NetworkReader(buffer); + + reader.ReadInt16(); // size + short msgType = reader.ReadInt16(); + + if (handlers.ContainsKey(msgType) && m_LocalConnection != null) + { + // this must be invoked with the connection to the client, not the client's connection to the server + m_LocalConnection.InvokeHandler(msgType, reader, channelId); + return true; + } + return false; + } + + // invoked for local clients + internal bool InvokeHandlerOnServer(ULocalConnectionToServer conn, short msgType, MessageBase msg, int channelId) + { + if (handlers.ContainsKey(msgType) && m_LocalConnection != null) + { + // write the message to a local buffer + NetworkWriter writer = new NetworkWriter(); + msg.Serialize(writer); + + // pass a reader (attached to local buffer) to handler + NetworkReader reader = new NetworkReader(writer); + + // this must be invoked with the connection to the client, not the client's connection to the server + m_LocalConnection.InvokeHandler(msgType, reader, channelId); + return true; + } + if (LogFilter.logError) { Debug.LogError("Local invoke: Failed to find local connection to invoke handler on [connectionId=" + conn.connectionId + "] for MsgId:" + msgType); } + return false; + } + + /// + /// This finds the local NetworkIdentity object with the specified network Id. + /// Since netIds are the same on the server and all clients for a game, this allows clients to send a netId of a local game objects, and have the server find the corresponding server object. + /// + /// + /// The netId of the NetworkIdentity object to find. + /// The game object that matches the netId. + static public GameObject FindLocalObject(NetworkInstanceId netId) + { + return instance.m_NetworkScene.FindLocalObject(netId); + } + + /// + /// Gets aggregate packet stats for all connections. + /// + /// Dictionary of msg types and packet statistics. + static public Dictionary GetConnectionStats() + { + Dictionary stats = new Dictionary(); + + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null) + { + foreach (short k in conn.packetStats.Keys) + { + if (stats.ContainsKey(k)) + { + NetworkConnection.PacketStat s = stats[k]; + s.count += conn.packetStats[k].count; + s.bytes += conn.packetStats[k].bytes; + stats[k] = s; + } + else + { + stats[k] = new NetworkConnection.PacketStat(conn.packetStats[k]); + } + } + } + } + return stats; + } + + /// + /// Resets the packet stats on all connections. + /// + static public void ResetConnectionStats() + { + for (int i = 0; i < connections.Count; i++) + { + var conn = connections[i]; + if (conn != null) + { + conn.ResetStats(); + } + } + } + + /// + /// This accepts a network connection from another external source and adds it to the server. + /// This connection will use the callbacks registered with the server, and can have players added to it like any other connection. + /// + /// Network connection to add. + /// True if added. + static public bool AddExternalConnection(NetworkConnection conn) + { + return instance.AddExternalConnectionInternal(conn); + } + + bool AddExternalConnectionInternal(NetworkConnection conn) + { + if (conn.connectionId < 0) + return false; + + if (conn.connectionId < connections.Count && connections[conn.connectionId] != null) + { + if (LogFilter.logError) { Debug.LogError("AddExternalConnection failed, already connection for id:" + conn.connectionId); } + return false; + } + + if (LogFilter.logDebug) { Debug.Log("AddExternalConnection external connection " + conn.connectionId); } + m_SimpleServerSimple.SetConnectionAtIndex(conn); + m_ExternalConnections.Add(conn.connectionId); + conn.InvokeHandlerNoData(MsgType.Connect); + + return true; + } + + /// + /// This removes an external connection added with AddExternalConnection(). + /// + /// The id of the connection to remove. + static public void RemoveExternalConnection(int connectionId) + { + instance.RemoveExternalConnectionInternal(connectionId); + } + + bool RemoveExternalConnectionInternal(int connectionId) + { + if (!m_ExternalConnections.Contains(connectionId)) + { + if (LogFilter.logError) { Debug.LogError("RemoveExternalConnection failed, no connection for id:" + connectionId); } + return false; + } + if (LogFilter.logDebug) { Debug.Log("RemoveExternalConnection external connection " + connectionId); } + + var conn = m_SimpleServerSimple.FindConnection(connectionId); + if (conn != null) + { + conn.RemoveObservers(); + } + m_SimpleServerSimple.RemoveConnectionAtIndex(connectionId); + + return true; + } + + static bool ValidateSceneObject(NetworkIdentity netId) + { + if (netId.gameObject.hideFlags == HideFlags.NotEditable || netId.gameObject.hideFlags == HideFlags.HideAndDontSave) + return false; + +#if UNITY_EDITOR + if (UnityEditor.EditorUtility.IsPersistent(netId.gameObject)) + return false; +#endif + + // If not a scene object + if (netId.sceneId.IsEmpty()) + return false; + + return true; + } + + /// + /// This causes NetworkIdentity objects in a scene to be spawned on a server. + /// NetworkIdentity objects in a scene are disabled by default. Calling SpawnObjects() causes these scene objects to be enabled and spawned. It is like calling NetworkServer.Spawn() for each of them. + /// + /// Success if objects where spawned. + static public bool SpawnObjects() + { + if (!active) + return true; + + NetworkIdentity[] netIds = Resources.FindObjectsOfTypeAll(); + for (int i = 0; i < netIds.Length; i++) + { + var netId = netIds[i]; + if (!ValidateSceneObject(netId)) + continue; + + if (LogFilter.logDebug) { Debug.Log("SpawnObjects sceneId:" + netId.sceneId + " name:" + netId.gameObject.name); } + netId.Reset(); + netId.gameObject.SetActive(true); + } + for (int i = 0; i < netIds.Length; i++) + { + var netId = netIds[i]; + if (!ValidateSceneObject(netId)) + continue; + + Spawn(netId.gameObject); + + // these objects are server authority - even if "localPlayerAuthority" is set on them + netId.ForceAuthority(true); + } + return true; + } + + static void SendCrc(NetworkConnection targetConnection) + { + if (NetworkCRC.singleton == null) + return; + + if (NetworkCRC.scriptCRCCheck == false) + return; + + CRCMessage crcMsg = new CRCMessage(); + + // build entries + List entries = new List(); + foreach (var name in NetworkCRC.singleton.scripts.Keys) + { + CRCMessageEntry entry = new CRCMessageEntry(); + entry.name = name; + entry.channel = (byte)NetworkCRC.singleton.scripts[name]; + entries.Add(entry); + } + crcMsg.scripts = entries.ToArray(); + + targetConnection.Send(MsgType.CRC, crcMsg); + } + + [Obsolete("moved to NetworkMigrationManager")] + public void SendNetworkInfo(NetworkConnection targetConnection) + { + } + + class ServerSimpleWrapper : NetworkServerSimple + { + NetworkServer m_Server; + + public ServerSimpleWrapper(NetworkServer server) + { + m_Server = server; + } + + public override void OnConnectError(int connectionId, byte error) + { + m_Server.GenerateConnectError(error); + } + + public override void OnDataError(NetworkConnection conn, byte error) + { + m_Server.GenerateDataError(conn, error); + } + + public override void OnDisconnectError(NetworkConnection conn, byte error) + { + m_Server.GenerateDisconnectError(conn, error); + } + + public override void OnConnected(NetworkConnection conn) + { + m_Server.OnConnected(conn); + } + + public override void OnDisconnected(NetworkConnection conn) + { + m_Server.OnDisconnected(conn); + } + + public override void OnData(NetworkConnection conn, int receivedSize, int channelId) + { + m_Server.OnData(conn, receivedSize, channelId); + } + } + }; +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServer.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServer.cs.meta new file mode 100644 index 00000000..040e2b7d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5a8ae5b5116fe436a85f28af22c0c99a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServerSimple.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServerSimple.cs new file mode 100644 index 00000000..13eaa4d0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServerSimple.cs @@ -0,0 +1,673 @@ +using System; +using UnityEngine; +using System.Collections.Generic; +using UnityEngine.Networking.Types; +using System.Collections.ObjectModel; + + +namespace UnityEngine.Networking +{ + /// + /// The NetworkServerSimple is a basic server class without the "game" related functionality that the NetworkServer class has. + /// This class has no scene management, spawning, player objects, observers, or static interface like the NetworkServer class. It is simply a server that listens on a port, manages connections, and handles messages. There can be more than one instance of this class in a process. + /// Like the NetworkServer and NetworkClient classes, it allows the type of NetworkConnection class created for new connections to be specified with SetNetworkConnectionClass(), so custom types of network connections can be used with it. + /// This class can be used by overriding the virtual functions OnConnected, OnDisconnected and OnData; or by registering message handlers. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkServerSimple + { + bool m_Initialized = false; + int m_ListenPort; + int m_ServerHostId = -1; + int m_RelaySlotId = -1; + bool m_UseWebSockets; + + byte[] m_MsgBuffer = null; + NetworkReader m_MsgReader = null; + + Type m_NetworkConnectionClass = typeof(NetworkConnection); + HostTopology m_HostTopology; + List m_Connections = new List(); + ReadOnlyCollection m_ConnectionsReadOnly; + + NetworkMessageHandlers m_MessageHandlers = new NetworkMessageHandlers(); + + /// + /// The network port that the server is listening on. + /// + public int listenPort { get { return m_ListenPort; } set { m_ListenPort = value; }} + /// + /// The transport layer hostId of the server. + /// + public int serverHostId { get { return m_ServerHostId; } set { m_ServerHostId = value; }} + /// + /// The transport layer host-topology that the server is configured with. + /// A host topology object can be passed to the Listen() function, or a default host topology that is compatible with the default topology of NetworkClient will be used. + /// + public HostTopology hostTopology { get { return m_HostTopology; }} + /// + /// This causes the server to listen for WebSocket connections instead of regular transport layer connections. + /// This allows WebGL clients to talk to the server. + /// + public bool useWebSockets { get { return m_UseWebSockets; } set { m_UseWebSockets = value; } } + /// + /// A read-only list of the current connections being managed. + /// + public ReadOnlyCollection connections { get { return m_ConnectionsReadOnly; }} + /// + /// The message handler functions that are registered. + /// + public Dictionary handlers { get { return m_MessageHandlers.GetHandlers(); } } + + /// + /// The internal buffer that the server reads data from the network into. This will contain the most recent data read from the network when OnData() is called. + /// + public byte[] messageBuffer { get { return m_MsgBuffer; }} + /// + /// A NetworkReader object that is bound to the server's messageBuffer. + /// + public NetworkReader messageReader { get { return m_MsgReader; }} + + /// + /// The type of class to be created for new network connections from clients. + /// By default this is the NetworkConnection class, but it can be changed with SetNetworkConnectionClass() to classes derived from NetworkConnections. + /// + public Type networkConnectionClass + { + get { return m_NetworkConnectionClass; } + } + + /// + /// This sets the class that is used when creating new network connections. + /// The class must be derived from NetworkConnection. + /// + /// + public void SetNetworkConnectionClass() where T : NetworkConnection + { + m_NetworkConnectionClass = typeof(T); + } + + public NetworkServerSimple() + { + m_ConnectionsReadOnly = new ReadOnlyCollection(m_Connections); + } + + /// + /// Initialization function that is invoked when the server starts listening. This can be overridden to perform custom initialization such as setting the NetworkConnectionClass. + /// + public virtual void Initialize() + { + if (m_Initialized) + return; + + m_Initialized = true; + NetworkManager.activeTransport.Init(); + + m_MsgBuffer = new byte[NetworkMessage.MaxMessageSize]; + m_MsgReader = new NetworkReader(m_MsgBuffer); + + if (m_HostTopology == null) + { + var config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + m_HostTopology = new HostTopology(config, 8); + } + + if (LogFilter.logDebug) { Debug.Log("NetworkServerSimple initialize."); } + } + + /// + /// This configures the network transport layer of the server. + /// + /// The transport layer configuration to use. + /// Maximum number of network connections to allow. + /// True if configured. + public bool Configure(ConnectionConfig config, int maxConnections) + { + HostTopology top = new HostTopology(config, maxConnections); + return Configure(top); + } + + /// + /// This configures the network transport layer of the server. + /// + /// The transport layer host topology to use. + /// True if configured. + public bool Configure(HostTopology topology) + { + m_HostTopology = topology; + return true; + } + + /// + /// This starts the server listening for connections on the specified port. + /// + /// + /// The port to listen on. + /// True if able to listen. + public bool Listen(string ipAddress, int serverListenPort) + { + Initialize(); + m_ListenPort = serverListenPort; + + if (m_UseWebSockets) + { + m_ServerHostId = NetworkManager.activeTransport.AddWebsocketHost(m_HostTopology, serverListenPort, ipAddress); + } + else + { + m_ServerHostId = NetworkManager.activeTransport.AddHost(m_HostTopology, serverListenPort, ipAddress); + } + + if (m_ServerHostId == -1) + { + return false; + } + + if (LogFilter.logDebug) { Debug.Log("NetworkServerSimple listen: " + ipAddress + ":" + m_ListenPort); } + return true; + } + + /// + /// This starts the server listening for connections on the specified port. + /// + /// The port to listen on. + /// + public bool Listen(int serverListenPort) + { + return Listen(serverListenPort, m_HostTopology); + } + + /// + /// This starts the server listening for connections on the specified port. + /// + /// The port to listen on. + /// The transport layer host toplogy to configure with. + /// + public bool Listen(int serverListenPort, HostTopology topology) + { + m_HostTopology = topology; + Initialize(); + m_ListenPort = serverListenPort; + + if (m_UseWebSockets) + { + m_ServerHostId = NetworkManager.activeTransport.AddWebsocketHost(m_HostTopology, serverListenPort, null); + } + else + { + m_ServerHostId = NetworkManager.activeTransport.AddHost(m_HostTopology, serverListenPort, null); + } + + if (m_ServerHostId == -1) + { + return false; + } + + if (LogFilter.logDebug) { Debug.Log("NetworkServerSimple listen " + m_ListenPort); } + return true; + } + + /// + /// Starts a server using a Relay server. This is the manual way of using the Relay server, as the regular NetworkServer.Connect() will automatically use the Relay server if a match exists. + /// + /// Relay server IP Address. + /// Relay server port. + /// GUID of the network to create. + /// This server's sourceId. + /// The node to join the network with. + public void ListenRelay(string relayIp, int relayPort, NetworkID netGuid, SourceID sourceId, NodeID nodeId) + { + Initialize(); + + m_ServerHostId = NetworkManager.activeTransport.AddHost(m_HostTopology, listenPort, null); + if (LogFilter.logDebug) { Debug.Log("Server Host Slot Id: " + m_ServerHostId); } + + Update(); + + byte error; + NetworkManager.activeTransport.ConnectAsNetworkHost( + m_ServerHostId, + relayIp, + relayPort, + netGuid, + sourceId, + nodeId, + out error); + + m_RelaySlotId = 0; + if (LogFilter.logDebug) { Debug.Log("Relay Slot Id: " + m_RelaySlotId); } + } + + /// + /// This stops a server from listening. + /// + public void Stop() + { + if (LogFilter.logDebug) { Debug.Log("NetworkServerSimple stop "); } + NetworkManager.activeTransport.RemoveHost(m_ServerHostId); + m_ServerHostId = -1; + } + + internal void RegisterHandlerSafe(short msgType, NetworkMessageDelegate handler) + { + m_MessageHandlers.RegisterHandlerSafe(msgType, handler); + } + + /// + /// This registers a handler function for a message Id. + /// + /// Message Id to register handler for. + /// Handler function. + public void RegisterHandler(short msgType, NetworkMessageDelegate handler) + { + m_MessageHandlers.RegisterHandler(msgType, handler); + } + + /// + /// This unregisters a registered message handler function. + /// + /// The message id to unregister. + public void UnregisterHandler(short msgType) + { + m_MessageHandlers.UnregisterHandler(msgType); + } + + /// + /// Clears the message handlers that are registered. + /// + public void ClearHandlers() + { + m_MessageHandlers.ClearMessageHandlers(); + } + + /// + /// This function causes pending outgoing data on connections to be sent, but unlike Update() it works when the server is not listening. + /// When the server is using externally added connections and the dontListen flag is set, the regular connection flush in the Update() function does not happen. In this case, UpdateConnections can be called to pump the external connections. This is an advanced usage that should not be required unless the server uses custom NetworkConnection classes that do not use the built-in transport layer. + /// + // this can be used independantly of Update() - such as when using external connections and not listening. + public void UpdateConnections() + { + for (int i = 0; i < m_Connections.Count; i++) + { + NetworkConnection conn = m_Connections[i]; + if (conn != null) + conn.FlushChannels(); + } + } + + /// + /// This function pumps the server causing incoming network data to be processed, and pending outgoing data to be sent. + /// This should be called each frame, and is called automatically for the server used by NetworkServer. + /// + public void Update() + { + if (m_ServerHostId == -1) + return; + + int connectionId; + int channelId; + int receivedSize; + byte error; + + var networkEvent = NetworkEventType.DataEvent; + if (m_RelaySlotId != -1) + { + networkEvent = NetworkManager.activeTransport.ReceiveRelayEventFromHost(m_ServerHostId, out error); + if (NetworkEventType.Nothing != networkEvent) + { + if (LogFilter.logDebug) { Debug.Log("NetGroup event:" + networkEvent); } + } + if (networkEvent == NetworkEventType.ConnectEvent) + { + if (LogFilter.logDebug) { Debug.Log("NetGroup server connected"); } + } + if (networkEvent == NetworkEventType.DisconnectEvent) + { + if (LogFilter.logDebug) { Debug.Log("NetGroup server disconnected"); } + } + } + + do + { + networkEvent = NetworkManager.activeTransport.ReceiveFromHost(m_ServerHostId, out connectionId, out channelId, m_MsgBuffer, (int)m_MsgBuffer.Length, out receivedSize, out error); + if (networkEvent != NetworkEventType.Nothing) + { + if (LogFilter.logDev) { Debug.Log("Server event: host=" + m_ServerHostId + " event=" + networkEvent + " error=" + error); } + } + + switch (networkEvent) + { + case NetworkEventType.ConnectEvent: + { + HandleConnect(connectionId, error); + break; + } + + case NetworkEventType.DataEvent: + { + HandleData(connectionId, channelId, receivedSize, error); + break; + } + + case NetworkEventType.DisconnectEvent: + { + HandleDisconnect(connectionId, error); + break; + } + + case NetworkEventType.Nothing: + break; + + default: + if (LogFilter.logError) { Debug.LogError("Unknown network message type received: " + networkEvent); } + break; + } + } + while (networkEvent != NetworkEventType.Nothing); + + UpdateConnections(); + } + + /// + /// This looks up the network connection object for the specified connection Id. + /// + /// The connection id to look up. + /// A NetworkConnection objects, or null if no connection found. + public NetworkConnection FindConnection(int connectionId) + { + if (connectionId < 0 || connectionId >= m_Connections.Count) + return null; + + return m_Connections[connectionId]; + } + + /// + /// This adds a connection created by external code to the server's list of connections, at the connection's connectionId index. + /// Connections are usually added automatically, this is a low-level function for the rare special case of externally created connections. + /// + /// A new connection object. + /// True if added. + public bool SetConnectionAtIndex(NetworkConnection conn) + { + while (m_Connections.Count <= conn.connectionId) + { + m_Connections.Add(null); + } + + if (m_Connections[conn.connectionId] != null) + { + // already a connection at this index + return false; + } + + m_Connections[conn.connectionId] = conn; + conn.SetHandlers(m_MessageHandlers); + return true; + } + + /// + /// This removes a connection object from the server's list of connections. + /// This is a low-level function that should not be used for regular connections. It is only safe to remove connections added with SetConnectionAtIndex() using this function. + /// + /// The id of the connection to remove. + /// True if removed. + public bool RemoveConnectionAtIndex(int connectionId) + { + if (connectionId < 0 || connectionId >= m_Connections.Count) + return false; + + m_Connections[connectionId] = null; + return true; + } + + void HandleConnect(int connectionId, byte error) + { + if (LogFilter.logDebug) { Debug.Log("NetworkServerSimple accepted client:" + connectionId); } + + if (error != 0) + { + OnConnectError(connectionId, error); + return; + } + + string address; + int port; + NetworkID networkId; + NodeID node; + byte error2; + NetworkManager.activeTransport.GetConnectionInfo(m_ServerHostId, connectionId, out address, out port, out networkId, out node, out error2); + + NetworkConnection conn = (NetworkConnection)Activator.CreateInstance(m_NetworkConnectionClass); + conn.SetHandlers(m_MessageHandlers); + conn.Initialize(address, m_ServerHostId, connectionId, m_HostTopology); + conn.lastError = (NetworkError)error2; + + // add connection at correct index + while (m_Connections.Count <= connectionId) + { + m_Connections.Add(null); + } + m_Connections[connectionId] = conn; + + OnConnected(conn); + } + + void HandleDisconnect(int connectionId, byte error) + { + if (LogFilter.logDebug) { Debug.Log("NetworkServerSimple disconnect client:" + connectionId); } + + var conn = FindConnection(connectionId); + if (conn == null) + { + return; + } + conn.lastError = (NetworkError)error; + + if (error != 0) + { + if ((NetworkError)error != NetworkError.Timeout) + { + m_Connections[connectionId] = null; + if (LogFilter.logError) { Debug.LogError("Server client disconnect error, connectionId: " + connectionId + " error: " + (NetworkError)error); } + + OnDisconnectError(conn, error); + return; + } + } + + conn.Disconnect(); + m_Connections[connectionId] = null; + if (LogFilter.logDebug) { Debug.Log("Server lost client:" + connectionId); } + + OnDisconnected(conn); + } + + void HandleData(int connectionId, int channelId, int receivedSize, byte error) + { + var conn = FindConnection(connectionId); + if (conn == null) + { + if (LogFilter.logError) { Debug.LogError("HandleData Unknown connectionId:" + connectionId); } + return; + } + conn.lastError = (NetworkError)error; + + if (error != 0) + { + OnDataError(conn, error); + return; + } + + m_MsgReader.SeekZero(); + OnData(conn, receivedSize, channelId); + } + + /// + /// This sends the data in an array of bytes to the connected client. + /// + /// The id of the connection to send on. + /// The data to send. + /// The size of the data to send. + /// The channel to send the data on. + public void SendBytesTo(int connectionId, byte[] bytes, int numBytes, int channelId) + { + var outConn = FindConnection(connectionId); + if (outConn == null) + { + return; + } + outConn.SendBytes(bytes, numBytes, channelId); + } + + /// + /// This sends the contents of a NetworkWriter object to the connected client. + /// + /// The id of the connection to send on. + /// The writer object to send. + /// The channel to send the data on. + public void SendWriterTo(int connectionId, NetworkWriter writer, int channelId) + { + var outConn = FindConnection(connectionId); + if (outConn == null) + { + return; + } + outConn.SendWriter(writer, channelId); + } + + /// + /// This disconnects the connection of the corresponding connection id. + /// + /// The id of the connection to disconnect. + public void Disconnect(int connectionId) + { + var outConn = FindConnection(connectionId); + if (outConn == null) + { + return; + } + outConn.Disconnect(); + m_Connections[connectionId] = null; + } + + /// + /// This disconnects all of the active connections. + /// + public void DisconnectAllConnections() + { + for (int i = 0; i < m_Connections.Count; i++) + { + NetworkConnection conn = m_Connections[i]; + if (conn != null) + { + conn.Disconnect(); + conn.Dispose(); + } + } + } + + // --------------------------- virtuals --------------------------------------- + + /// + /// A virtual function that is invoked when there is a connection error. + /// + /// The id of the connection with the error. + /// The error code. + public virtual void OnConnectError(int connectionId, byte error) + { + Debug.LogError("OnConnectError error:" + error); + } + + /// + /// A virtual function that is called when a data error occurs on a connection. + /// + /// The connection object that the error occured on. + /// The error code. + public virtual void OnDataError(NetworkConnection conn, byte error) + { + Debug.LogError("OnDataError error:" + error); + } + + /// + /// A virtual function that is called when a disconnect error happens. + /// + /// The connection object that the error occured on. + /// The error code. + public virtual void OnDisconnectError(NetworkConnection conn, byte error) + { + Debug.LogError("OnDisconnectError error:" + error); + } + + /// + /// This virtual function can be overridden to perform custom functionality for new network connections. + /// By default OnConnected just invokes a connect event on the new connection. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public abstract class ExampleScript : NetworkManager + /// { + /// public virtual void OnConnected(NetworkConnection conn) + /// { + /// conn.InvokeHandlerNoData(MsgType.Connect); + /// } + /// } + /// + /// + /// The new connection object. + public virtual void OnConnected(NetworkConnection conn) + { + conn.InvokeHandlerNoData(MsgType.Connect); + } + + /// + /// This virtual function can be overridden to perform custom functionality for disconnected network connections. + /// By default OnConnected just invokes a disconnect event on the new connection. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public abstract class ExampleScript : NetworkManager + /// { + /// public virtual void OnDisconnected(NetworkConnection conn) + /// { + /// conn.InvokeHandlerNoData(MsgType.Disconnect); + /// } + /// } + /// + /// + /// + public virtual void OnDisconnected(NetworkConnection conn) + { + conn.InvokeHandlerNoData(MsgType.Disconnect); + } + + /// + /// This virtual function can be overridden to perform custom functionality when data is received for a connection. + /// By default this function calls HandleData() which will process the data and invoke message handlers for any messages that it finds. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public abstract class ExampleScript : NetworkManager + /// { + /// byte[] msgBuffer = new byte[1024]; + /// + /// public virtual void OnData(NetworkConnection conn, int channelId, int receivedSize) + /// { + /// conn.TransportRecieve(msgBuffer, receivedSize, channelId); + /// } + /// } + /// + /// + /// + /// + /// + public virtual void OnData(NetworkConnection conn, int receivedSize, int channelId) + { + conn.TransportReceive(m_MsgBuffer, receivedSize, channelId); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServerSimple.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServerSimple.cs.meta new file mode 100644 index 00000000..0c13ee92 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkServerSimple.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e8d195b17014244b891a4b8e44a59f5c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkStartPosition.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkStartPosition.cs new file mode 100644 index 00000000..ce1d6e85 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkStartPosition.cs @@ -0,0 +1,25 @@ +using System; +using UnityEngine; + +namespace UnityEngine.Networking +{ + /// + /// This component is used to make a gameObject a starting position for spawning player objects in multiplayer games. + /// This object's transform will be automatically registered and unregistered with the NetworkManager as a starting position. + /// + [DisallowMultipleComponent] + [AddComponentMenu("Network/NetworkStartPosition")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkStartPosition : MonoBehaviour + { + public void Awake() + { + NetworkManager.RegisterStartPosition(transform); + } + + public void OnDestroy() + { + NetworkManager.UnRegisterStartPosition(transform); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkStartPosition.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkStartPosition.cs.meta new file mode 100644 index 00000000..80cf68d5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkStartPosition.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 921ceb7939c624969a567b4c88e17315 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTranformChild.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTranformChild.cs new file mode 100644 index 00000000..30925b5b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTranformChild.cs @@ -0,0 +1,520 @@ +using System; +using UnityEngine; + +namespace UnityEngine.Networking +{ + /// + /// A component to synchronize the position of child transforms of networked objects. + /// There must be a NetworkTransform on the root object of the hierarchy. There can be multiple NetworkTransformChild components on an object. This does not use physics for synchronization, it simply synchronizes the localPosition and localRotation of the child transform and lerps towards the recieved values. + /// + [AddComponentMenu("Network/NetworkTransformChild")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkTransformChild : NetworkBehaviour + { + [SerializeField] + Transform m_Target; + + [SerializeField] + uint m_ChildIndex; + + NetworkTransform m_Root; + + [SerializeField] float m_SendInterval = 0.1f; + [SerializeField] NetworkTransform.AxisSyncMode m_SyncRotationAxis = NetworkTransform.AxisSyncMode.AxisXYZ; + [SerializeField] NetworkTransform.CompressionSyncMode m_RotationSyncCompression = NetworkTransform.CompressionSyncMode.None; + [SerializeField] float m_MovementThreshold = 0.001f; + + [SerializeField] float m_InterpolateRotation = 0.5f; + [SerializeField] float m_InterpolateMovement = 0.5f; + [SerializeField] NetworkTransform.ClientMoveCallback3D m_ClientMoveCallback3D; + + + // movement smoothing + Vector3 m_TargetSyncPosition; + Quaternion m_TargetSyncRotation3D; + + float m_LastClientSyncTime; // last time client received a sync from server + float m_LastClientSendTime; // last time client send a sync to server + + Vector3 m_PrevPosition; + Quaternion m_PrevRotation; + + const float k_LocalMovementThreshold = 0.00001f; + const float k_LocalRotationThreshold = 0.00001f; + + NetworkWriter m_LocalTransformWriter; + + // settings + /// + /// The child transform to be synchronized. + /// + public Transform target { get {return m_Target; } set { m_Target = value; OnValidate(); } } + /// + /// A unique Identifier for this NetworkTransformChild component on this root object. + /// + public uint childIndex { get { return m_ChildIndex; }} + /// + /// The sendInterval controls how often state updates are sent for this object. + /// + public float sendInterval { get { return m_SendInterval; } set { m_SendInterval = value; } } + /// + /// Which axis should rotation by synchronized for. + /// + public NetworkTransform.AxisSyncMode syncRotationAxis { get { return m_SyncRotationAxis; } set { m_SyncRotationAxis = value; } } + /// + /// How much to compress rotation sync updates. + /// + public NetworkTransform.CompressionSyncMode rotationSyncCompression { get { return m_RotationSyncCompression; } set { m_RotationSyncCompression = value; } } + /// + /// The distance that an object can move without sending a movement synchronization update. + /// This applies to the child object's localPosition, not it's world position. + /// + public float movementThreshold { get { return m_MovementThreshold; } set { m_MovementThreshold = value; } } + /// + /// The rate to interpolate to the target rotation. + /// A value of 1 will snap to the position, and lower positive values will interpolate more slowly. + /// + public float interpolateRotation { get { return m_InterpolateRotation; } set { m_InterpolateRotation = value; } } + /// + /// The rate to interpolate towards the target position. + /// A value of 1 will snap to the position, and lower positive values will interpolate more slowly. + /// + public float interpolateMovement { get { return m_InterpolateMovement; } set { m_InterpolateMovement = value; } } + /// + /// A callback function to allow server side validation of the movement of the child object. + /// + public NetworkTransform.ClientMoveCallback3D clientMoveCallback3D { get { return m_ClientMoveCallback3D; } set { m_ClientMoveCallback3D = value; } } + + // runtime data + /// + /// The most recent time when a movement synchronization packet arrived for this object. + /// + public float lastSyncTime { get { return m_LastClientSyncTime; } } + /// + /// The target position interpolating towards. + /// + public Vector3 targetSyncPosition { get { return m_TargetSyncPosition; } } + /// + /// The target rotation interpolating towards. + /// + public Quaternion targetSyncRotation3D { get { return m_TargetSyncRotation3D; } } + + void OnValidate() + { + // root parent of target must have a NetworkTransform + if (m_Target != null) + { + Transform parent = m_Target.parent; + if (parent == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkTransformChild target cannot be the root transform."); } + m_Target = null; + return; + } + while (parent.parent != null) + { + parent = parent.parent; + } + + m_Root = parent.gameObject.GetComponent(); + if (m_Root == null) + { + if (LogFilter.logError) { Debug.LogError("NetworkTransformChild root must have NetworkTransform"); } + m_Target = null; + return; + } + } + + if (m_Root != null) + { + // childIndex is the index within all the NetworkChildTransforms on the root + m_ChildIndex = UInt32.MaxValue; + var childTransforms = m_Root.GetComponents(); + for (uint i = 0; i < childTransforms.Length; i++) + { + if (childTransforms[i] == this) + { + m_ChildIndex = i; + break; + } + } + if (m_ChildIndex == UInt32.MaxValue) + { + if (LogFilter.logError) { Debug.LogError("NetworkTransformChild component must be a child in the same hierarchy"); } + m_Target = null; + } + } + + if (m_SendInterval < 0) + { + m_SendInterval = 0; + } + + if (m_SyncRotationAxis < NetworkTransform.AxisSyncMode.None || m_SyncRotationAxis > NetworkTransform.AxisSyncMode.AxisXYZ) + { + m_SyncRotationAxis = NetworkTransform.AxisSyncMode.None; + } + + if (movementThreshold < 0) + { + movementThreshold = 0.00f; + } + + if (interpolateRotation < 0) + { + interpolateRotation = 0.01f; + } + if (interpolateRotation > 1.0f) + { + interpolateRotation = 1.0f; + } + + if (interpolateMovement < 0) + { + interpolateMovement = 0.01f; + } + if (interpolateMovement > 1.0f) + { + interpolateMovement = 1.0f; + } + } + + void Awake() + { + m_PrevPosition = m_Target.localPosition; + m_PrevRotation = m_Target.localRotation; + + // cache these to avoid per-frame allocations. + if (localPlayerAuthority) + { + m_LocalTransformWriter = new NetworkWriter(); + } + } + + public override bool OnSerialize(NetworkWriter writer, bool initialState) + { + if (initialState) + { + // always write initial state, no dirty bits + } + else if (syncVarDirtyBits == 0) + { + writer.WritePackedUInt32(0); + return false; + } + else + { + // dirty bits + writer.WritePackedUInt32(1); + } + + SerializeModeTransform(writer); + return true; + } + + void SerializeModeTransform(NetworkWriter writer) + { + // position + writer.Write(m_Target.localPosition); + + // rotation + if (m_SyncRotationAxis != NetworkTransform.AxisSyncMode.None) + { + NetworkTransform.SerializeRotation3D(writer, m_Target.localRotation, syncRotationAxis, rotationSyncCompression); + } + m_PrevPosition = m_Target.localPosition; + m_PrevRotation = m_Target.localRotation; + } + + public override void OnDeserialize(NetworkReader reader, bool initialState) + { + if (isServer && NetworkServer.localClientActive) + return; + + if (!initialState) + { + if (reader.ReadPackedUInt32() == 0) + return; + } + UnserializeModeTransform(reader, initialState); + + m_LastClientSyncTime = Time.time; + } + + void UnserializeModeTransform(NetworkReader reader, bool initialState) + { + if (hasAuthority) + { + // this component must read the data that the server wrote, even if it ignores it. + // otherwise the NetworkReader stream will still contain that data for the next component. + + // position + reader.ReadVector3(); + + if (syncRotationAxis != NetworkTransform.AxisSyncMode.None) + { + NetworkTransform.UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + return; + } + + if (isServer && m_ClientMoveCallback3D != null) + { + var pos = reader.ReadVector3(); + var vel = Vector3.zero; + var rot = Quaternion.identity; + if (syncRotationAxis != NetworkTransform.AxisSyncMode.None) + { + rot = NetworkTransform.UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + + if (m_ClientMoveCallback3D(ref pos, ref vel, ref rot)) + { + m_TargetSyncPosition = pos; + if (syncRotationAxis != NetworkTransform.AxisSyncMode.None) + { + m_TargetSyncRotation3D = rot; + } + } + else + { + // rejected by callback + return; + } + } + else + { + // position + m_TargetSyncPosition = reader.ReadVector3(); + + // rotation + if (syncRotationAxis != NetworkTransform.AxisSyncMode.None) + { + m_TargetSyncRotation3D = NetworkTransform.UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + } + } + + void FixedUpdate() + { + if (isServer) + { + FixedUpdateServer(); + } + if (isClient) + { + FixedUpdateClient(); + } + } + + void FixedUpdateServer() + { + if (syncVarDirtyBits != 0) + return; + + // dont run if network isn't active + if (!NetworkServer.active) + return; + + // dont run if we haven't been spawned yet + if (!isServer) + return; + + // dont' auto-dirty if no send interval + if (GetNetworkSendInterval() == 0) + return; + + float distance = (m_Target.localPosition - m_PrevPosition).sqrMagnitude; + if (distance < movementThreshold) + { + distance = Quaternion.Angle(m_PrevRotation, m_Target.localRotation); + if (distance < movementThreshold) + { + return; + } + } + + // This will cause transform to be sent + SetDirtyBit(1); + } + + void FixedUpdateClient() + { + // dont run if we haven't received any sync data + if (m_LastClientSyncTime == 0) + return; + + // dont run if network isn't active + if (!NetworkServer.active && !NetworkClient.active) + return; + + // dont run if we haven't been spawned yet + if (!isServer && !isClient) + return; + + // dont run if not expecting continuous updates + if (GetNetworkSendInterval() == 0) + return; + + // dont run this if this client has authority over this player object + if (hasAuthority) + return; + + // interpolate on client + if (m_LastClientSyncTime != 0) + { + if (m_InterpolateMovement > 0) + { + m_Target.localPosition = Vector3.Lerp(m_Target.localPosition, m_TargetSyncPosition, m_InterpolateMovement); + } + else + { + m_Target.localPosition = m_TargetSyncPosition; + } + + if (m_InterpolateRotation > 0) + { + m_Target.localRotation = Quaternion.Slerp(m_Target.localRotation, m_TargetSyncRotation3D, m_InterpolateRotation); + } + else + { + m_Target.localRotation = m_TargetSyncRotation3D; + } + } + } + + // --------------------- local transform sync ------------------------ + + void Update() + { + if (!hasAuthority) + return; + + if (!localPlayerAuthority) + return; + + if (NetworkServer.active) + return; + + if (Time.time - m_LastClientSendTime > GetNetworkSendInterval()) + { + SendTransform(); + m_LastClientSendTime = Time.time; + } + } + + bool HasMoved() + { + float diff = 0; + + // check if position has changed + diff = (m_Target.localPosition - m_PrevPosition).sqrMagnitude; + if (diff > k_LocalMovementThreshold) + { + return true; + } + + // check if rotation has changed + diff = Quaternion.Angle(m_Target.localRotation, m_PrevRotation); + if (diff > k_LocalRotationThreshold) + { + return true; + } + + // check if velocty has changed + + return false; + } + + [Client] + void SendTransform() + { + if (!HasMoved() || ClientScene.readyConnection == null) + { + return; + } + + m_LocalTransformWriter.StartMessage(MsgType.LocalChildTransform); + m_LocalTransformWriter.Write(netId); + m_LocalTransformWriter.WritePackedUInt32(m_ChildIndex); + SerializeModeTransform(m_LocalTransformWriter); + + m_PrevPosition = m_Target.localPosition; + m_PrevRotation = m_Target.localRotation; + + + m_LocalTransformWriter.FinishMessage(); + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.LocalChildTransform, "16:LocalChildTransform"); +#endif + ClientScene.readyConnection.SendWriter(m_LocalTransformWriter, GetNetworkChannel()); + } + + static internal void HandleChildTransform(NetworkMessage netMsg) + { + NetworkInstanceId netId = netMsg.reader.ReadNetworkId(); + uint childIndex = netMsg.reader.ReadPackedUInt32(); + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.LocalChildTransform, "16:LocalChildTransform"); +#endif + + GameObject foundObj = NetworkServer.FindLocalObject(netId); + if (foundObj == null) + { + if (LogFilter.logError) { Debug.LogError("Received NetworkTransformChild data for GameObject that doesn't exist"); } + return; + } + var children = foundObj.GetComponents(); + if (children == null || children.Length == 0) + { + if (LogFilter.logError) { Debug.LogError("HandleChildTransform no children"); } + return; + } + if (childIndex >= children.Length) + { + if (LogFilter.logError) { Debug.LogError("HandleChildTransform childIndex invalid"); } + return; + } + + NetworkTransformChild foundSync = children[childIndex]; + if (foundSync == null) + { + if (LogFilter.logError) { Debug.LogError("HandleChildTransform null target"); } + return; + } + if (!foundSync.localPlayerAuthority) + { + if (LogFilter.logError) { Debug.LogError("HandleChildTransform no localPlayerAuthority"); } + return; + } + + if (!netMsg.conn.clientOwnedObjects.Contains(netId)) + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkTransformChild netId:" + netId + " is not for a valid player"); } + return; + } + + foundSync.UnserializeModeTransform(netMsg.reader, false); + foundSync.m_LastClientSyncTime = Time.time; + + if (!foundSync.isClient) + { + // dedicated server wont interpolate, so snap. + foundSync.m_Target.localPosition = foundSync.m_TargetSyncPosition; + foundSync.m_Target.localRotation = foundSync.m_TargetSyncRotation3D; + } + } + + public override int GetNetworkChannel() + { + return Channels.DefaultUnreliable; + } + + public override float GetNetworkSendInterval() + { + return m_SendInterval; + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTranformChild.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTranformChild.cs.meta new file mode 100644 index 00000000..309b3ace --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTranformChild.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2e4fc1de7aae047a4bf138b9498c9b37 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransform.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransform.cs new file mode 100644 index 00000000..d8a5b2f7 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransform.cs @@ -0,0 +1,1793 @@ +using System; +using UnityEngine; + +namespace UnityEngine.Networking +{ + /// + /// A component to synchronize the position and rotation of networked objects. + /// The movement of game objects can be networked by this component. There are two models of authority for networked movement: + /// If the object has authority on the client, then it should be controlled locally on the owning client, then movement state information will be sent from the owning client to the server, then broadcast to all of the other clients. This is common for player objects. + /// If the object has authority on the server, then it should be controlled on the server and movement state information will be sent to all clients. This is common for objects not related to a specific client, such as an enemy unit. + /// + [DisallowMultipleComponent] + [AddComponentMenu("Network/NetworkTransform")] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkTransform : NetworkBehaviour + { + /// + /// How to synchronize an object's position. + /// + public enum TransformSyncMode + { + /// + /// Dont synchronize. + /// + SyncNone = 0, + /// + /// Sync using the game object's base transform. + /// + SyncTransform = 1, + /// + /// Sync using the Rigidbody2D component. + /// + SyncRigidbody2D = 2, + /// + /// Sync using the Rigidbody component. + /// + SyncRigidbody3D = 3, + /// + /// Sync using the CharacterController component. + /// + SyncCharacterController = 4 + } + + /// + /// An axis or set of axis. + /// + public enum AxisSyncMode + { + /// + /// Do not sync. + /// + None, + /// + /// Only x axis. + /// + AxisX, + /// + /// Only the y axis. + /// + AxisY, + /// + /// Only the z axis. + /// + AxisZ, + /// + /// The x and y axis. + /// + AxisXY, + /// + /// The x and z axis. + /// + AxisXZ, + /// + /// The y and z axis. + /// + AxisYZ, + /// + /// The x, y and z axis. + /// + AxisXYZ + } + + /// + /// How much to compress sync data. + /// + public enum CompressionSyncMode + { + /// + /// Do not compress. + /// + None, + /// + /// A low amount of compression that preserves accuracy. + /// + Low, + /// + /// High Compression - sacrificing accuracy. + /// + High + } + + public delegate bool ClientMoveCallback3D(ref Vector3 position, ref Vector3 velocity, ref Quaternion rotation); + public delegate bool ClientMoveCallback2D(ref Vector2 position, ref Vector2 velocity, ref float rotation); + + [SerializeField] TransformSyncMode m_TransformSyncMode = TransformSyncMode.SyncNone; + [SerializeField] float m_SendInterval = 0.1f; + [SerializeField] AxisSyncMode m_SyncRotationAxis = AxisSyncMode.AxisXYZ; + [SerializeField] CompressionSyncMode m_RotationSyncCompression = CompressionSyncMode.None; + [SerializeField] bool m_SyncSpin; + [SerializeField] float m_MovementTheshold = 0.001f; + [SerializeField] float m_VelocityThreshold = 0.0001f; + + [SerializeField] float m_SnapThreshold = 5.0f; + [SerializeField] float m_InterpolateRotation = 1.0f; + [SerializeField] float m_InterpolateMovement = 1.0f; + [SerializeField] ClientMoveCallback3D m_ClientMoveCallback3D; + [SerializeField] ClientMoveCallback2D m_ClientMoveCallback2D; + + Rigidbody m_RigidBody3D; + Rigidbody2D m_RigidBody2D; + CharacterController m_CharacterController; + bool m_Grounded = true; + + // movement smoothing + + Vector3 m_TargetSyncPosition; + Vector3 m_TargetSyncVelocity; + + Vector3 m_FixedPosDiff; + + Quaternion m_TargetSyncRotation3D; + Vector3 m_TargetSyncAngularVelocity3D; + + float m_TargetSyncRotation2D; + float m_TargetSyncAngularVelocity2D; + + float m_LastClientSyncTime; // last time client received a sync from server + float m_LastClientSendTime; // last time client send a sync to server + + Vector3 m_PrevPosition; + Quaternion m_PrevRotation; + float m_PrevRotation2D; + float m_PrevVelocity; + + const float k_LocalMovementThreshold = 0.00001f; + const float k_LocalRotationThreshold = 0.00001f; + const float k_LocalVelocityThreshold = 0.00001f; + const float k_MoveAheadRatio = 0.1f; + + NetworkWriter m_LocalTransformWriter; + + // settings + + /// + /// What method to use to sync the object's position. + /// + public TransformSyncMode transformSyncMode { get { return m_TransformSyncMode; } set { m_TransformSyncMode = value; } } + /// + /// The sendInterval controls how often state updates are sent for this object. + /// Unlike most NetworkBehaviour scripts, for NetworkTransform this is implemented at a per-object level rather than at the per-script level. This allows more flexibility as this component is used in various situation. + /// If sendInterval is non-zero, then transform state updates are send at most once every sendInterval seconds. However, if an object is stationary, no updates are sent. + /// If sendInterval is zero, then no automatic updates are sent. In this case, calling SetDirtyBits() on the NetworkTransform will cause an updates to be sent. This could be used for objects like bullets that have a predictable trajectory. + /// + public float sendInterval { get { return m_SendInterval; } set { m_SendInterval = value; } } + /// + /// Which axis should rotation by synchronized for. + /// + public AxisSyncMode syncRotationAxis { get { return m_SyncRotationAxis; } set { m_SyncRotationAxis = value; } } + /// + /// How much to compress rotation sync updates. + /// + public CompressionSyncMode rotationSyncCompression { get { return m_RotationSyncCompression; } set { m_RotationSyncCompression = value; } } + public bool syncSpin { get { return m_SyncSpin; } set { m_SyncSpin = value; } } + /// + /// The distance that an object can move without sending a movement synchronization update. + /// + public float movementTheshold { get { return m_MovementTheshold; } set { m_MovementTheshold = value; } } + /// + /// The minimum velocity difference that will be synchronized over the network. + /// + public float velocityThreshold { get { return m_VelocityThreshold; } set { m_VelocityThreshold = value; } } + /// + /// If a movement update puts an object further from its current position that this value, it will snap to the position instead of moving smoothly. + /// + public float snapThreshold { get { return m_SnapThreshold; } set { m_SnapThreshold = value; } } + /// + /// Enables interpolation of the synchronized rotation. + /// If this is not set, object will snap to the new rotation. The larger this number is, the faster the object will interpolate to the target facing direction. + /// + public float interpolateRotation { get { return m_InterpolateRotation; } set { m_InterpolateRotation = value; } } + /// + /// Enables interpolation of the synchronized movement. + /// The larger this number is, the faster the object will interpolate to the target position. + /// + public float interpolateMovement { get { return m_InterpolateMovement; } set { m_InterpolateMovement = value; } } + /// + /// A callback that can be used to validate on the server, the movement of client authoritative objects. + /// This version of the callback works with objects that use 3D physics. The callback function may return false to reject the movement request completely. It may also modify the movement parameters - which are passed by reference. + /// The example below set the callback in OnStartServer, and will disconnect a client that moves an object into an invalid position after a number of failures. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class MyMover : NetworkManager + /// { + /// public int cheatCount = 0; + /// + /// public bool ValidateMove(ref Vector3 position, ref Vector3 velocity, ref Quaternion rotation) + /// { + /// Debug.Log("pos:" + position); + /// if (position.y > 9) + /// { + /// position.y = 9; + /// cheatCount += 1; + /// if (cheatCount == 10) + /// { + /// Invoke("DisconnectCheater", 0.1f); + /// } + /// } + /// return true; + /// } + /// + /// void DisconnectCheater() + /// { + /// GetComponent<NetworkIdentity>().connectionToClient.Disconnect(); + /// } + /// + /// public override void OnStartServer() + /// { + /// GetComponent<NetworkTransform>().clientMoveCallback3D = ValidateMove; + /// } + /// } + /// + /// This kind of server-side movement validation should be used in conjunction with client side movement validation. The callback should only detect a failure if a client is by-passing client side movement checks - by cheating. + /// + public ClientMoveCallback3D clientMoveCallback3D { get { return m_ClientMoveCallback3D; } set { m_ClientMoveCallback3D = value; } } + /// + /// A callback that can be used to validate on the server, the movement of client authoritative objects. + /// This version of the callback works with objects that use 2D physics. The callback function may return false to reject the movement request completely. It may also modify the movement parameters - which are passed by reference. + /// The example below set the callback in OnStartServer, and will disconnect a client that moves an object into an invalid position after a number of failures. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class MyMover : NetworkManager + /// { + /// public int cheatCount = 0; + /// + /// public bool ValidateMove(ref Vector2 position, ref Vector2 velocity, ref float rotation) + /// { + /// Debug.Log("pos:" + position); + /// if (position.y > 9) + /// { + /// position.y = 9; + /// cheatCount += 1; + /// if (cheatCount == 10) + /// { + /// Invoke("DisconnectCheater", 0.1f); + /// } + /// } + /// return true; + /// } + /// + /// void DisconnectCheater() + /// { + /// GetComponent<NetworkIdentity>().connectionToClient.Disconnect(); + /// } + /// + /// public override void OnStartServer() + /// { + /// GetComponent<NetworkTransform>().clientMoveCallback2D = ValidateMove; + /// } + /// } + /// + /// This kind of server-side movement validation should be used in conjunction with client side movement validation. The callback should only detect a failure if a client is by-passing client side movement checks - by cheating. + /// + public ClientMoveCallback2D clientMoveCallback2D { get { return m_ClientMoveCallback2D; } set { m_ClientMoveCallback2D = value; } } + + // runtime data + + /// + /// Cached CharacterController. + /// + public CharacterController characterContoller { get { return m_CharacterController; } } + /// + /// Cached Rigidbody. + /// + public Rigidbody rigidbody3D { get { return m_RigidBody3D; } } + /// + /// Cached Rigidbody2D. + /// +#pragma warning disable 109 + new public Rigidbody2D rigidbody2D { get { return m_RigidBody2D; } } +#pragma warning restore 109 + /// + /// The most recent time when a movement synchronization packet arrived for this object. + /// + public float lastSyncTime { get { return m_LastClientSyncTime; } } + /// + /// The target position interpolating towards. + /// + public Vector3 targetSyncPosition { get { return m_TargetSyncPosition; } } + /// + /// The velocity send for synchronization. + /// + public Vector3 targetSyncVelocity { get { return m_TargetSyncVelocity; } } + /// + /// The target position interpolating towards. + /// + public Quaternion targetSyncRotation3D { get { return m_TargetSyncRotation3D; } } + /// + /// The target rotation interpolating towards. + /// + public float targetSyncRotation2D { get { return m_TargetSyncRotation2D; } } + /// + /// Tells the NetworkTransform that it is on a surface (this is the default). + /// Object that are NOT grounded will not interpolate their vertical velocity. This avoid the problem of interpolation fighting with gravity on non-authoritative objects. This only works for RigidBody2D physics objects. + /// + public bool grounded { get { return m_Grounded; } set { m_Grounded = value; } } + + void OnValidate() + { + if (m_TransformSyncMode < TransformSyncMode.SyncNone || m_TransformSyncMode > TransformSyncMode.SyncCharacterController) + { + m_TransformSyncMode = TransformSyncMode.SyncTransform; + } + + if (m_SendInterval < 0) + { + m_SendInterval = 0; + } + + if (m_SyncRotationAxis < AxisSyncMode.None || m_SyncRotationAxis > AxisSyncMode.AxisXYZ) + { + m_SyncRotationAxis = AxisSyncMode.None; + } + + if (m_MovementTheshold < 0) + { + m_MovementTheshold = 0.00f; + } + + if (m_VelocityThreshold < 0) + { + m_VelocityThreshold = 0.00f; + } + + if (m_SnapThreshold < 0) + { + m_SnapThreshold = 0.01f; + } + + if (m_InterpolateRotation < 0) + { + m_InterpolateRotation = 0.01f; + } + + if (m_InterpolateMovement < 0) + { + m_InterpolateMovement = 0.01f; + } + } + + void Awake() + { + m_RigidBody3D = GetComponent(); + m_RigidBody2D = GetComponent(); + m_CharacterController = GetComponent(); + m_PrevPosition = transform.position; + m_PrevRotation = transform.rotation; + m_PrevVelocity = 0; + + // cache these to avoid per-frame allocations. + if (localPlayerAuthority) + { + m_LocalTransformWriter = new NetworkWriter(); + } + } + + public override void OnStartServer() + { + m_LastClientSyncTime = 0; + } + + public override bool OnSerialize(NetworkWriter writer, bool initialState) + { + if (initialState) + { + // always write initial state, no dirty bits + } + else if (syncVarDirtyBits == 0) + { + writer.WritePackedUInt32(0); + return false; + } + else + { + // dirty bits + writer.WritePackedUInt32(1); + } + + switch (transformSyncMode) + { + case TransformSyncMode.SyncNone: + { + return false; + } + case TransformSyncMode.SyncTransform: + { + SerializeModeTransform(writer); + break; + } + case TransformSyncMode.SyncRigidbody3D: + { + SerializeMode3D(writer); + break; + } + case TransformSyncMode.SyncRigidbody2D: + { + SerializeMode2D(writer); + break; + } + case TransformSyncMode.SyncCharacterController: + { + SerializeModeCharacterController(writer); + break; + } + } + return true; + } + + void SerializeModeTransform(NetworkWriter writer) + { + // position + writer.Write(transform.position); + + // no velocity + + // rotation + if (m_SyncRotationAxis != AxisSyncMode.None) + { + SerializeRotation3D(writer, transform.rotation, syncRotationAxis, rotationSyncCompression); + } + + // no spin + + m_PrevPosition = transform.position; + m_PrevRotation = transform.rotation; + m_PrevVelocity = 0; + } + + void VerifySerializeComponentExists() + { + bool throwError = false; + Type componentMissing = null; + + switch (transformSyncMode) + { + case TransformSyncMode.SyncCharacterController: + if (!m_CharacterController && !(m_CharacterController = GetComponent())) + { + throwError = true; + componentMissing = typeof(CharacterController); + } + break; + + case TransformSyncMode.SyncRigidbody2D: + if (!m_RigidBody2D && !(m_RigidBody2D = GetComponent())) + { + throwError = true; + componentMissing = typeof(Rigidbody2D); + } + break; + + case TransformSyncMode.SyncRigidbody3D: + if (!m_RigidBody3D && !(m_RigidBody3D = GetComponent())) + { + throwError = true; + componentMissing = typeof(Rigidbody); + } + break; + } + + if (throwError && componentMissing != null) + { + throw new InvalidOperationException(string.Format("transformSyncMode set to {0} but no {1} component was found, did you call NetworkServer.Spawn on a prefab?", transformSyncMode, componentMissing.Name)); + } + } + + void SerializeMode3D(NetworkWriter writer) + { + VerifySerializeComponentExists(); + + if (isServer && m_LastClientSyncTime != 0) + { + // target position + writer.Write(m_TargetSyncPosition); + + // target velocity + SerializeVelocity3D(writer, m_TargetSyncVelocity, CompressionSyncMode.None); + + if (syncRotationAxis != AxisSyncMode.None) + { + // target rotation + SerializeRotation3D(writer, m_TargetSyncRotation3D, syncRotationAxis, rotationSyncCompression); + } + } + else + { + // current position + writer.Write(m_RigidBody3D.position); + + // current velocity + SerializeVelocity3D(writer, m_RigidBody3D.velocity, CompressionSyncMode.None); + + if (syncRotationAxis != AxisSyncMode.None) + { + // current rotation + SerializeRotation3D(writer, m_RigidBody3D.rotation, syncRotationAxis, rotationSyncCompression); + } + } + + // spin + if (m_SyncSpin) + { + SerializeSpin3D(writer, m_RigidBody3D.angularVelocity, syncRotationAxis, rotationSyncCompression); + } + + m_PrevPosition = m_RigidBody3D.position; + m_PrevRotation = transform.rotation; + m_PrevVelocity = m_RigidBody3D.velocity.sqrMagnitude; + } + + void SerializeModeCharacterController(NetworkWriter writer) + { + VerifySerializeComponentExists(); + + if (isServer && m_LastClientSyncTime != 0) + { + // target position + writer.Write(m_TargetSyncPosition); + + // no velocity + + if (syncRotationAxis != AxisSyncMode.None) + { + // target rotation + SerializeRotation3D(writer, m_TargetSyncRotation3D, syncRotationAxis, rotationSyncCompression); + } + } + else + { + // current position + writer.Write(transform.position); + + // no velocity + + if (syncRotationAxis != AxisSyncMode.None) + { + // current rotation + SerializeRotation3D(writer, transform.rotation, syncRotationAxis, rotationSyncCompression); + } + } + + // no spin + + m_PrevPosition = transform.position; + m_PrevRotation = transform.rotation; + m_PrevVelocity = 0; + } + + void SerializeMode2D(NetworkWriter writer) + { + VerifySerializeComponentExists(); + + if (isServer && m_LastClientSyncTime != 0) + { + // target position + writer.Write((Vector2)m_TargetSyncPosition); + + // target velocity + SerializeVelocity2D(writer, m_TargetSyncVelocity, CompressionSyncMode.None); + + // target rotation + if (syncRotationAxis != AxisSyncMode.None) + { + float orientation = m_TargetSyncRotation2D % 360; + if (orientation < 0) orientation += 360; + SerializeRotation2D(writer, orientation, rotationSyncCompression); + } + } + else + { + // current position + writer.Write(m_RigidBody2D.position); + + // current velocity + SerializeVelocity2D(writer, m_RigidBody2D.velocity, CompressionSyncMode.None); + + // current rotation + if (syncRotationAxis != AxisSyncMode.None) + { + float orientation = m_RigidBody2D.rotation % 360; + if (orientation < 0) orientation += 360; + SerializeRotation2D(writer, orientation, rotationSyncCompression); + } + } + + // spin + if (m_SyncSpin) + { + SerializeSpin2D(writer, m_RigidBody2D.angularVelocity, rotationSyncCompression); + } + + m_PrevPosition = m_RigidBody2D.position; + m_PrevRotation = transform.rotation; + m_PrevVelocity = m_RigidBody2D.velocity.sqrMagnitude; + } + + public override void OnDeserialize(NetworkReader reader, bool initialState) + { + if (isServer && NetworkServer.localClientActive) + return; + + if (!initialState) + { + if (reader.ReadPackedUInt32() == 0) + return; + } + + switch (transformSyncMode) + { + case TransformSyncMode.SyncNone: + { + return; + } + case TransformSyncMode.SyncTransform: + { + UnserializeModeTransform(reader, initialState); + break; + } + case TransformSyncMode.SyncRigidbody3D: + { + UnserializeMode3D(reader, initialState); + break; + } + case TransformSyncMode.SyncRigidbody2D: + { + UnserializeMode2D(reader, initialState); + break; + } + case TransformSyncMode.SyncCharacterController: + { + UnserializeModeCharacterController(reader, initialState); + break; + } + } + m_LastClientSyncTime = Time.time; + } + + void UnserializeModeTransform(NetworkReader reader, bool initialState) + { + if (hasAuthority) + { + // this component must read the data that the server wrote, even if it ignores it. + // otherwise the NetworkReader stream will still contain that data for the next component. + + // position + reader.ReadVector3(); + + if (syncRotationAxis != AxisSyncMode.None) + { + UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + return; + } + + if (isServer && m_ClientMoveCallback3D != null) + { + var pos = reader.ReadVector3(); + var vel = Vector3.zero; + var rot = Quaternion.identity; + if (syncRotationAxis != AxisSyncMode.None) + { + rot = UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + + if (m_ClientMoveCallback3D(ref pos, ref vel, ref rot)) + { + transform.position = pos; + if (syncRotationAxis != AxisSyncMode.None) + { + transform.rotation = rot; + } + } + else + { + // rejected by callback + return; + } + } + else + { + // position + transform.position = reader.ReadVector3(); + + // no velocity + + // rotation + if (syncRotationAxis != AxisSyncMode.None) + { + transform.rotation = UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + + // no spin + } + } + + void UnserializeMode3D(NetworkReader reader, bool initialState) + { + if (hasAuthority) + { + // this component must read the data that the server wrote, even if it ignores it. + // otherwise the NetworkReader stream will still contain that data for the next component. + + // position + reader.ReadVector3(); + + // velocity + reader.ReadVector3(); + + if (syncRotationAxis != AxisSyncMode.None) + { + UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + if (syncSpin) + { + UnserializeSpin3D(reader, syncRotationAxis, rotationSyncCompression); + } + return; + } + + if (isServer && m_ClientMoveCallback3D != null) + { + var pos = reader.ReadVector3(); + var vel = reader.ReadVector3(); + Quaternion rot = Quaternion.identity; + if (syncRotationAxis != AxisSyncMode.None) + { + rot = UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + + if (m_ClientMoveCallback3D(ref pos, ref vel, ref rot)) + { + m_TargetSyncPosition = pos; + m_TargetSyncVelocity = vel; + if (syncRotationAxis != AxisSyncMode.None) + { + m_TargetSyncRotation3D = rot; + } + } + else + { + // rejected by callback + return; + } + } + else + { + // position + m_TargetSyncPosition = reader.ReadVector3(); + + // velocity + m_TargetSyncVelocity = reader.ReadVector3(); + + // rotation + if (syncRotationAxis != AxisSyncMode.None) + { + m_TargetSyncRotation3D = UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + } + // spin + if (syncSpin) + { + m_TargetSyncAngularVelocity3D = UnserializeSpin3D(reader, syncRotationAxis, rotationSyncCompression); + } + + if (m_RigidBody3D == null) + return; + + if (isServer && !isClient) + { + // dedicated server needs to apply immediately, there is no interpolation + m_RigidBody3D.MovePosition(m_TargetSyncPosition); + m_RigidBody3D.MoveRotation(m_TargetSyncRotation3D); + m_RigidBody3D.velocity = m_TargetSyncVelocity; + return; + } + + // handle zero send rate + if (GetNetworkSendInterval() == 0) + { + m_RigidBody3D.MovePosition(m_TargetSyncPosition); + m_RigidBody3D.velocity = m_TargetSyncVelocity; + if (syncRotationAxis != AxisSyncMode.None) + { + m_RigidBody3D.MoveRotation(m_TargetSyncRotation3D); + } + if (syncSpin) + { + m_RigidBody3D.angularVelocity = m_TargetSyncAngularVelocity3D; + } + return; + } + + // handle position snap threshold + float dist = (m_RigidBody3D.position - m_TargetSyncPosition).magnitude; + if (dist > snapThreshold) + { + m_RigidBody3D.position = m_TargetSyncPosition; + m_RigidBody3D.velocity = m_TargetSyncVelocity; + } + + // handle no rotation interpolation + if (interpolateRotation == 0 && syncRotationAxis != AxisSyncMode.None) + { + m_RigidBody3D.rotation = m_TargetSyncRotation3D; + if (syncSpin) + { + m_RigidBody3D.angularVelocity = m_TargetSyncAngularVelocity3D; + } + } + + // handle no movement interpolation + if (m_InterpolateMovement == 0) + { + m_RigidBody3D.position = m_TargetSyncPosition; + } + + if (initialState && syncRotationAxis != AxisSyncMode.None) + { + m_RigidBody3D.rotation = m_TargetSyncRotation3D; + } + } + + void UnserializeMode2D(NetworkReader reader, bool initialState) + { + if (hasAuthority) + { + // this component must read the data that the server wrote, even if it ignores it. + // otherwise the NetworkReader stream will still contain that data for the next component. + + // position + reader.ReadVector2(); + + // velocity + reader.ReadVector2(); + + if (syncRotationAxis != AxisSyncMode.None) + { + UnserializeRotation2D(reader, rotationSyncCompression); + } + + if (syncSpin) + { + UnserializeSpin2D(reader, rotationSyncCompression); + } + return; + } + + if (m_RigidBody2D == null) + return; + + if (isServer && m_ClientMoveCallback2D != null) + { + Vector2 pos = reader.ReadVector2(); + Vector2 vel = reader.ReadVector2(); + float rot = 0; + if (syncRotationAxis != AxisSyncMode.None) + { + rot = UnserializeRotation2D(reader, rotationSyncCompression); + } + + if (m_ClientMoveCallback2D(ref pos, ref vel, ref rot)) + { + m_TargetSyncPosition = pos; + m_TargetSyncVelocity = vel; + if (syncRotationAxis != AxisSyncMode.None) + { + m_TargetSyncRotation2D = rot; + } + } + else + { + // rejected by callback + return; + } + } + else + { + // position + m_TargetSyncPosition = reader.ReadVector2(); + + // velocity + m_TargetSyncVelocity = reader.ReadVector2(); + + // rotation + if (syncRotationAxis != AxisSyncMode.None) + { + m_TargetSyncRotation2D = UnserializeRotation2D(reader, rotationSyncCompression); + } + } + + // spin + if (syncSpin) + { + m_TargetSyncAngularVelocity2D = UnserializeSpin2D(reader, rotationSyncCompression); + } + + if (isServer && !isClient) + { + // dedicated server needs to apply immediately, there is no interpolation + transform.position = m_TargetSyncPosition; + m_RigidBody2D.MoveRotation(m_TargetSyncRotation2D); + m_RigidBody2D.velocity = m_TargetSyncVelocity; + return; + } + + // handle zero send rate + if (GetNetworkSendInterval() == 0) + { + // NOTE: cannot use m_RigidBody2D.MovePosition() and set velocity in the same frame, so use transform.position + transform.position = m_TargetSyncPosition; + m_RigidBody2D.velocity = m_TargetSyncVelocity; + if (syncRotationAxis != AxisSyncMode.None) + { + m_RigidBody2D.MoveRotation(m_TargetSyncRotation2D); + } + if (syncSpin) + { + m_RigidBody2D.angularVelocity = m_TargetSyncAngularVelocity2D; + } + return; + } + + // handle position snap threshold + float dist = (m_RigidBody2D.position - (Vector2)m_TargetSyncPosition).magnitude; + if (dist > snapThreshold) + { + m_RigidBody2D.position = m_TargetSyncPosition; + m_RigidBody2D.velocity = m_TargetSyncVelocity; + } + + // handle no rotation interpolation + if (interpolateRotation == 0 && syncRotationAxis != AxisSyncMode.None) + { + m_RigidBody2D.rotation = m_TargetSyncRotation2D; + if (syncSpin) + { + m_RigidBody2D.angularVelocity = m_TargetSyncAngularVelocity2D; + } + } + + // handle no movement interpolation + if (m_InterpolateMovement == 0) + { + m_RigidBody2D.position = m_TargetSyncPosition; + } + + if (initialState) + { + m_RigidBody2D.rotation = m_TargetSyncRotation2D; + } + } + + void UnserializeModeCharacterController(NetworkReader reader, bool initialState) + { + if (hasAuthority) + { + // this component must read the data that the server wrote, even if it ignores it. + // otherwise the NetworkReader stream will still contain that data for the next component. + + // position + reader.ReadVector3(); + + if (syncRotationAxis != AxisSyncMode.None) + { + UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + return; + } + + if (isServer && m_ClientMoveCallback3D != null) + { + var pos = reader.ReadVector3(); + Quaternion rot = Quaternion.identity; + if (syncRotationAxis != AxisSyncMode.None) + { + rot = UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + + if (m_CharacterController == null) + return; + + // no velocity in packet, use current local velocity + var vel = m_CharacterController.velocity; + + if (m_ClientMoveCallback3D(ref pos, ref vel, ref rot)) + { + m_TargetSyncPosition = pos; + m_TargetSyncVelocity = vel; + if (syncRotationAxis != AxisSyncMode.None) + { + m_TargetSyncRotation3D = rot; + } + } + else + { + // rejected by callback + return; + } + } + else + { + // position + m_TargetSyncPosition = reader.ReadVector3(); + + // no velocity + + // rotation + if (syncRotationAxis != AxisSyncMode.None) + { + m_TargetSyncRotation3D = UnserializeRotation3D(reader, syncRotationAxis, rotationSyncCompression); + } + + // no spin + } + + if (m_CharacterController == null) + return; + + // total distance away the target position is + var totalDistToTarget = (m_TargetSyncPosition - transform.position); // 5 units + var perSecondDist = totalDistToTarget / GetNetworkSendInterval(); + m_FixedPosDiff = perSecondDist * Time.fixedDeltaTime; + + if (isServer && !isClient) + { + // dedicated server needs to apply immediately, there is no interpolation + transform.position = m_TargetSyncPosition; + transform.rotation = m_TargetSyncRotation3D; + return; + } + + // handle zero send rate + if (GetNetworkSendInterval() == 0) + { + transform.position = m_TargetSyncPosition; + //m_RigidBody3D.velocity = m_TargetSyncVelocity; + if (syncRotationAxis != AxisSyncMode.None) + { + transform.rotation = m_TargetSyncRotation3D; + } + return; + } + + // handle position snap threshold + float dist = (transform.position - m_TargetSyncPosition).magnitude; + if (dist > snapThreshold) + { + transform.position = m_TargetSyncPosition; + } + + // handle no rotation interpolation + if (interpolateRotation == 0 && syncRotationAxis != AxisSyncMode.None) + { + transform.rotation = m_TargetSyncRotation3D; + } + + // handle no movement interpolation + if (m_InterpolateMovement == 0) + { + transform.position = m_TargetSyncPosition; + } + + if (initialState && syncRotationAxis != AxisSyncMode.None) + { + transform.rotation = m_TargetSyncRotation3D; + } + } + + void FixedUpdate() + { + if (isServer) + { + FixedUpdateServer(); + } + if (isClient) + { + FixedUpdateClient(); + } + } + + void FixedUpdateServer() + { + if (syncVarDirtyBits != 0) + return; + + // dont run if network isn't active + if (!NetworkServer.active) + return; + + // dont run if we haven't been spawned yet + if (!isServer) + return; + + // dont' auto-dirty if no send interval + if (GetNetworkSendInterval() == 0) + return; + + float distance = (transform.position - m_PrevPosition).magnitude; + if (distance < movementTheshold) + { + distance = Quaternion.Angle(m_PrevRotation, transform.rotation); + if (distance < movementTheshold) + { + if (!CheckVelocityChanged()) + { + return; + } + } + } + + // This will cause transform to be sent + SetDirtyBit(1); + } + + bool CheckVelocityChanged() + { + switch (transformSyncMode) + { + case TransformSyncMode.SyncRigidbody2D: + if (m_RigidBody2D && m_VelocityThreshold > 0) + { + return Mathf.Abs(m_RigidBody2D.velocity.sqrMagnitude - m_PrevVelocity) >= m_VelocityThreshold; + } + else + { + return false; + } + + case TransformSyncMode.SyncRigidbody3D: + if (m_RigidBody3D && m_VelocityThreshold > 0) + { + return Mathf.Abs(m_RigidBody3D.velocity.sqrMagnitude - m_PrevVelocity) >= m_VelocityThreshold; + } + else + { + return false; + } + + default: + return false; + } + } + + void FixedUpdateClient() + { + // dont run if we haven't received any sync data + if (m_LastClientSyncTime == 0) + return; + + // dont run if network isn't active + if (!NetworkServer.active && !NetworkClient.active) + return; + + // dont run if we haven't been spawned yet + if (!isServer && !isClient) + return; + + // dont run if not expecting continuous updates + if (GetNetworkSendInterval() == 0) + return; + + // dont run this if this client has authority over this player object + if (hasAuthority) + return; + + // interpolate on client + switch (transformSyncMode) + { + case TransformSyncMode.SyncNone: + { + return; + } + case TransformSyncMode.SyncTransform: + { + return; + } + case TransformSyncMode.SyncRigidbody3D: + { + InterpolateTransformMode3D(); + break; + } + case TransformSyncMode.SyncRigidbody2D: + { + InterpolateTransformMode2D(); + break; + } + + case TransformSyncMode.SyncCharacterController: + { + InterpolateTransformModeCharacterController(); + break; + } + } + } + + void InterpolateTransformMode3D() + { + if (m_InterpolateMovement != 0) + { + Vector3 newVelocity = (m_TargetSyncPosition - m_RigidBody3D.position) * m_InterpolateMovement / GetNetworkSendInterval(); + m_RigidBody3D.velocity = newVelocity; + } + + if (interpolateRotation != 0) + { + m_RigidBody3D.MoveRotation(Quaternion.Slerp( + m_RigidBody3D.rotation, + m_TargetSyncRotation3D, + Time.fixedDeltaTime * interpolateRotation)); + + //m_TargetSyncRotation3D *= Quaternion.Euler(m_TargetSyncAngularVelocity3D * Time.fixedDeltaTime); + + // move sync rotation slightly in rotation direction + //m_TargetSyncRotation3D += (m_TargetSyncAngularVelocity3D * Time.fixedDeltaTime * moveAheadRatio); + } + + // move sync position slightly in the position of velocity + m_TargetSyncPosition += (m_TargetSyncVelocity * Time.fixedDeltaTime * k_MoveAheadRatio); + } + + void InterpolateTransformModeCharacterController() + { + if (m_FixedPosDiff == Vector3.zero && m_TargetSyncRotation3D == transform.rotation) + return; + + if (m_InterpolateMovement != 0) + { + m_CharacterController.Move(m_FixedPosDiff * m_InterpolateMovement); + } + + if (interpolateRotation != 0) + { + transform.rotation = Quaternion.Slerp( + transform.rotation, + m_TargetSyncRotation3D, + Time.fixedDeltaTime * interpolateRotation * 10); + } + if (Time.time - m_LastClientSyncTime > GetNetworkSendInterval()) + { + // turn off interpolation if we go out of the time window for a new packet + m_FixedPosDiff = Vector3.zero; + + var diff = m_TargetSyncPosition - transform.position; + m_CharacterController.Move(diff); + } + } + + void InterpolateTransformMode2D() + { + if (m_InterpolateMovement != 0) + { + Vector2 oldVelocity = m_RigidBody2D.velocity; + Vector2 newVelocity = (((Vector2)m_TargetSyncPosition - m_RigidBody2D.position)) * m_InterpolateMovement / GetNetworkSendInterval(); + if (!m_Grounded && newVelocity.y < 0) + { + newVelocity.y = oldVelocity.y; + } + m_RigidBody2D.velocity = newVelocity; + } + + if (interpolateRotation != 0) + { + float orientation = m_RigidBody2D.rotation % 360; + if (orientation < 0) + { + orientation += 360; + } + + Quaternion newRotation = Quaternion.Slerp( + transform.rotation, + Quaternion.Euler(0, 0, m_TargetSyncRotation2D), + Time.fixedDeltaTime * interpolateRotation / GetNetworkSendInterval()); + + m_RigidBody2D.MoveRotation(newRotation.eulerAngles.z); + + // move sync rotation slightly in rotation direction + m_TargetSyncRotation2D += (m_TargetSyncAngularVelocity2D * Time.fixedDeltaTime * k_MoveAheadRatio); + } + + // move sync position slightly in the position of velocity + m_TargetSyncPosition += (m_TargetSyncVelocity * Time.fixedDeltaTime * k_MoveAheadRatio); + } + + // --------------------- local transform sync ------------------------ + + void Update() + { + if (!hasAuthority) + return; + + if (!localPlayerAuthority) + return; + + if (NetworkServer.active) + return; + + if (Time.time - m_LastClientSendTime > GetNetworkSendInterval()) + { + SendTransform(); + m_LastClientSendTime = Time.time; + } + } + + bool HasMoved() + { + float diff = 0; + + // check if position has changed + if (m_RigidBody3D != null) + { + diff = (m_RigidBody3D.position - m_PrevPosition).magnitude; + } + else if (m_RigidBody2D != null) + { + diff = (m_RigidBody2D.position - (Vector2)m_PrevPosition).magnitude; + } + else + { + diff = (transform.position - m_PrevPosition).magnitude; + } + + if (diff > k_LocalMovementThreshold) + { + return true; + } + + // check if rotation has changed + if (m_RigidBody3D != null) + { + diff = Quaternion.Angle(m_RigidBody3D.rotation, m_PrevRotation); + } + else if (m_RigidBody2D != null) + { + diff = Math.Abs(m_RigidBody2D.rotation - m_PrevRotation2D); + } + else + { + diff = Quaternion.Angle(transform.rotation, m_PrevRotation); + } + if (diff > k_LocalRotationThreshold) + { + return true; + } + + // check if velocty has changed + if (m_RigidBody3D != null) + { + diff = Mathf.Abs(m_RigidBody3D.velocity.sqrMagnitude - m_PrevVelocity); + } + else if (m_RigidBody2D != null) + { + diff = Mathf.Abs(m_RigidBody2D.velocity.sqrMagnitude - m_PrevVelocity); + } + if (diff > k_LocalVelocityThreshold) + { + return true; + } + + + return false; + } + + [Client] + void SendTransform() + { + if (!HasMoved() || ClientScene.readyConnection == null) + { + return; + } + + m_LocalTransformWriter.StartMessage(MsgType.LocalPlayerTransform); + m_LocalTransformWriter.Write(netId); + + switch (transformSyncMode) + { + case TransformSyncMode.SyncNone: + { + return; + } + case TransformSyncMode.SyncTransform: + { + SerializeModeTransform(m_LocalTransformWriter); + break; + } + case TransformSyncMode.SyncRigidbody3D: + { + SerializeMode3D(m_LocalTransformWriter); + break; + } + case TransformSyncMode.SyncRigidbody2D: + { + SerializeMode2D(m_LocalTransformWriter); + break; + } + case TransformSyncMode.SyncCharacterController: + { + SerializeModeCharacterController(m_LocalTransformWriter); + break; + } + } + + if (m_RigidBody3D != null) + { + m_PrevPosition = m_RigidBody3D.position; + m_PrevRotation = m_RigidBody3D.rotation; + m_PrevVelocity = m_RigidBody3D.velocity.sqrMagnitude; + } + else if (m_RigidBody2D != null) + { + m_PrevPosition = m_RigidBody2D.position; + m_PrevRotation2D = m_RigidBody2D.rotation; + m_PrevVelocity = m_RigidBody2D.velocity.sqrMagnitude; + } + else + { + m_PrevPosition = transform.position; + m_PrevRotation = transform.rotation; + } + + m_LocalTransformWriter.FinishMessage(); + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.LocalPlayerTransform, "6:LocalPlayerTransform"); +#endif + ClientScene.readyConnection.SendWriter(m_LocalTransformWriter, GetNetworkChannel()); + } + + static public void HandleTransform(NetworkMessage netMsg) + { + NetworkInstanceId netId = netMsg.reader.ReadNetworkId(); + +#if UNITY_EDITOR + Profiler.IncrementStatIncoming(MsgType.LocalPlayerTransform, "6:LocalPlayerTransform"); +#endif + + GameObject foundObj = NetworkServer.FindLocalObject(netId); + if (foundObj == null) + { + if (LogFilter.logError) { Debug.LogError("Received NetworkTransform data for GameObject that doesn't exist"); } + return; + } + NetworkTransform foundSync = foundObj.GetComponent(); + if (foundSync == null) + { + if (LogFilter.logError) { Debug.LogError("HandleTransform null target"); } + return; + } + if (!foundSync.localPlayerAuthority) + { + if (LogFilter.logError) { Debug.LogError("HandleTransform no localPlayerAuthority"); } + return; + } + if (netMsg.conn.clientOwnedObjects == null) + { + if (LogFilter.logError) { Debug.LogError("HandleTransform object not owned by connection"); } + return; + } + + if (netMsg.conn.clientOwnedObjects.Contains(netId)) + { + switch (foundSync.transformSyncMode) + { + case TransformSyncMode.SyncNone: + { + return; + } + case TransformSyncMode.SyncTransform: + { + foundSync.UnserializeModeTransform(netMsg.reader, false); + break; + } + case TransformSyncMode.SyncRigidbody3D: + { + foundSync.UnserializeMode3D(netMsg.reader, false); + break; + } + case TransformSyncMode.SyncRigidbody2D: + { + foundSync.UnserializeMode2D(netMsg.reader, false); + break; + } + case TransformSyncMode.SyncCharacterController: + { + foundSync.UnserializeModeCharacterController(netMsg.reader, false); + break; + } + } + foundSync.m_LastClientSyncTime = Time.time; + return; + } + + if (LogFilter.logWarn) { Debug.LogWarning("HandleTransform netId:" + netId + " is not for a valid player"); } + } + + // --------------------- Compression Helper functions ------------------------ + + static void WriteAngle(NetworkWriter writer, float angle, CompressionSyncMode compression) + { + switch (compression) + { + case CompressionSyncMode.None: + { + writer.Write(angle); + break; + } + case CompressionSyncMode.Low: + { + writer.Write((short)angle); + break; + } + case CompressionSyncMode.High: + { + //TODO + writer.Write((short)angle); + break; + } + } + } + + static float ReadAngle(NetworkReader reader, CompressionSyncMode compression) + { + switch (compression) + { + case CompressionSyncMode.None: + { + return reader.ReadSingle(); + } + case CompressionSyncMode.Low: + { + return reader.ReadInt16(); + } + case CompressionSyncMode.High: + { + //TODO + return reader.ReadInt16(); + } + } + return 0; + } + + // --------------------- Serialization Helper functions ------------------------ + + static public void SerializeVelocity3D(NetworkWriter writer, Vector3 velocity, CompressionSyncMode compression) + { + writer.Write(velocity); + } + + static public void SerializeVelocity2D(NetworkWriter writer, Vector2 velocity, CompressionSyncMode compression) + { + writer.Write(velocity); + } + + static public void SerializeRotation3D(NetworkWriter writer, Quaternion rot, AxisSyncMode mode, CompressionSyncMode compression) + { + switch (mode) + { + case AxisSyncMode.None: + break; + + case AxisSyncMode.AxisX: + WriteAngle(writer, rot.eulerAngles.x, compression); + break; + + case AxisSyncMode.AxisY: + WriteAngle(writer, rot.eulerAngles.y, compression); + break; + + case AxisSyncMode.AxisZ: + WriteAngle(writer, rot.eulerAngles.z, compression); + break; + + case AxisSyncMode.AxisXY: + WriteAngle(writer, rot.eulerAngles.x, compression); + WriteAngle(writer, rot.eulerAngles.y, compression); + break; + + case AxisSyncMode.AxisXZ: + WriteAngle(writer, rot.eulerAngles.x, compression); + WriteAngle(writer, rot.eulerAngles.z, compression); + break; + + case AxisSyncMode.AxisYZ: + WriteAngle(writer, rot.eulerAngles.y, compression); + WriteAngle(writer, rot.eulerAngles.z, compression); + break; + + case AxisSyncMode.AxisXYZ: + WriteAngle(writer, rot.eulerAngles.x, compression); + WriteAngle(writer, rot.eulerAngles.y, compression); + WriteAngle(writer, rot.eulerAngles.z, compression); + break; + } + } + + static public void SerializeRotation2D(NetworkWriter writer, float rot, CompressionSyncMode compression) + { + WriteAngle(writer, rot, compression); + } + + static public void SerializeSpin3D(NetworkWriter writer, Vector3 angularVelocity, AxisSyncMode mode, CompressionSyncMode compression) + { + switch (mode) + { + case AxisSyncMode.None: + break; + + case AxisSyncMode.AxisX: + WriteAngle(writer, angularVelocity.x, compression); + break; + + case AxisSyncMode.AxisY: + WriteAngle(writer, angularVelocity.y, compression); + break; + + case AxisSyncMode.AxisZ: + WriteAngle(writer, angularVelocity.z, compression); + break; + + case AxisSyncMode.AxisXY: + WriteAngle(writer, angularVelocity.x, compression); + WriteAngle(writer, angularVelocity.y, compression); + break; + + case AxisSyncMode.AxisXZ: + WriteAngle(writer, angularVelocity.x, compression); + WriteAngle(writer, angularVelocity.z, compression); + break; + + case AxisSyncMode.AxisYZ: + WriteAngle(writer, angularVelocity.y, compression); + WriteAngle(writer, angularVelocity.z, compression); + break; + + case AxisSyncMode.AxisXYZ: + WriteAngle(writer, angularVelocity.x, compression); + WriteAngle(writer, angularVelocity.y, compression); + WriteAngle(writer, angularVelocity.z, compression); + break; + } + } + + static public void SerializeSpin2D(NetworkWriter writer, float angularVelocity, CompressionSyncMode compression) + { + WriteAngle(writer, angularVelocity, compression); + } + + static public Vector3 UnserializeVelocity3D(NetworkReader reader, CompressionSyncMode compression) + { + return reader.ReadVector3(); + } + + static public Vector3 UnserializeVelocity2D(NetworkReader reader, CompressionSyncMode compression) + { + return reader.ReadVector2(); + } + + static public Quaternion UnserializeRotation3D(NetworkReader reader, AxisSyncMode mode, CompressionSyncMode compression) + { + Quaternion rotation = Quaternion.identity; + Vector3 rotv = Vector3.zero; + + switch (mode) + { + case AxisSyncMode.None: + break; + + case AxisSyncMode.AxisX: + rotv.Set(ReadAngle(reader, compression), 0, 0); + rotation.eulerAngles = rotv; + break; + + case AxisSyncMode.AxisY: + rotv.Set(0, ReadAngle(reader, compression), 0); + rotation.eulerAngles = rotv; + break; + + case AxisSyncMode.AxisZ: + rotv.Set(0, 0, ReadAngle(reader, compression)); + rotation.eulerAngles = rotv; + break; + + case AxisSyncMode.AxisXY: + rotv.Set(ReadAngle(reader, compression), ReadAngle(reader, compression), 0); + rotation.eulerAngles = rotv; + break; + + case AxisSyncMode.AxisXZ: + rotv.Set(ReadAngle(reader, compression), 0, ReadAngle(reader, compression)); + rotation.eulerAngles = rotv; + break; + + case AxisSyncMode.AxisYZ: + rotv.Set(0, ReadAngle(reader, compression), ReadAngle(reader, compression)); + rotation.eulerAngles = rotv; + break; + + case AxisSyncMode.AxisXYZ: + rotv.Set(ReadAngle(reader, compression), ReadAngle(reader, compression), ReadAngle(reader, compression)); + rotation.eulerAngles = rotv; + break; + } + return rotation; + } + + static public float UnserializeRotation2D(NetworkReader reader, CompressionSyncMode compression) + { + return ReadAngle(reader, compression); + } + + static public Vector3 UnserializeSpin3D(NetworkReader reader, AxisSyncMode mode, CompressionSyncMode compression) + { + Vector3 spin = Vector3.zero; + switch (mode) + { + case AxisSyncMode.None: + break; + + case AxisSyncMode.AxisX: + spin.Set(ReadAngle(reader, compression), 0, 0); + break; + + case AxisSyncMode.AxisY: + spin.Set(0, ReadAngle(reader, compression), 0); + break; + + case AxisSyncMode.AxisZ: + spin.Set(0, 0, ReadAngle(reader, compression)); + break; + + case AxisSyncMode.AxisXY: + spin.Set(ReadAngle(reader, compression), ReadAngle(reader, compression), 0); + break; + + case AxisSyncMode.AxisXZ: + spin.Set(ReadAngle(reader, compression), 0, ReadAngle(reader, compression)); + break; + + case AxisSyncMode.AxisYZ: + spin.Set(0, ReadAngle(reader, compression), ReadAngle(reader, compression)); + break; + + case AxisSyncMode.AxisXYZ: + spin.Set(ReadAngle(reader, compression), ReadAngle(reader, compression), ReadAngle(reader, compression)); + break; + } + return spin; + } + + static public float UnserializeSpin2D(NetworkReader reader, CompressionSyncMode compression) + { + return ReadAngle(reader, compression); + } + + public override int GetNetworkChannel() + { + return Channels.DefaultUnreliable; + } + + public override float GetNetworkSendInterval() + { + return m_SendInterval; + } + + public override void OnStartAuthority() + { + // must reset this timer, or the server will continue to send target position instead of current position + m_LastClientSyncTime = 0; + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransform.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransform.cs.meta new file mode 100644 index 00000000..733b7106 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransform.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 13d6c522af31447398568cc65334232b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransformVisualizer.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransformVisualizer.cs new file mode 100644 index 00000000..684b3b9c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransformVisualizer.cs @@ -0,0 +1,173 @@ +using System; +using System.ComponentModel; +using UnityEngine; + +namespace UnityEngine.Networking +{ + /// + /// This is a helper component to help understand and debug networked movement synchronization with the NetworkTransform component. + /// + [DisallowMultipleComponent] + [AddComponentMenu("Network/NetworkTransformVisualizer")] + [RequireComponent(typeof(NetworkTransform))] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkTransformVisualizer : NetworkBehaviour + { + [Tooltip("The prefab to use for the visualization object.")] + [SerializeField] GameObject m_VisualizerPrefab; + + NetworkTransform m_NetworkTransform; + GameObject m_Visualizer; + + /// + /// The prefab to use for the visualization object. + /// + public GameObject visualizerPrefab { get { return m_VisualizerPrefab; } set { m_VisualizerPrefab = value; }} + + public override void OnStartClient() + { + if (m_VisualizerPrefab != null) + { + m_NetworkTransform = GetComponent(); + CreateLineMaterial(); + m_Visualizer = (GameObject)Instantiate(m_VisualizerPrefab, transform.position, Quaternion.identity); + } + } + + public override void OnStartLocalPlayer() + { + if (m_Visualizer == null) + return; + + if (m_NetworkTransform.localPlayerAuthority || isServer) + { + Destroy(m_Visualizer); + } + } + + void OnDestroy() + { + if (m_Visualizer != null) + { + Destroy(m_Visualizer); + } + } + + [ClientCallback] + void FixedUpdate() + { + if (m_Visualizer == null) + return; + + // dont run if network isn't active + if (!NetworkServer.active && !NetworkClient.active) + return; + + // dont run if we haven't been spawned yet + if (!isServer && !isClient) + return; + + // dont run this if this client has authority over this player object + if (hasAuthority && m_NetworkTransform.localPlayerAuthority) + return; + + m_Visualizer.transform.position = m_NetworkTransform.targetSyncPosition; + + if (m_NetworkTransform.rigidbody3D != null && m_Visualizer.GetComponent() != null) + { + m_Visualizer.GetComponent().velocity = m_NetworkTransform.targetSyncVelocity; + } + if (m_NetworkTransform.rigidbody2D != null && m_Visualizer.GetComponent() != null) + { + m_Visualizer.GetComponent().velocity = m_NetworkTransform.targetSyncVelocity; + } + + Quaternion targetFacing = Quaternion.identity; + if (m_NetworkTransform.rigidbody3D != null) + { + targetFacing = m_NetworkTransform.targetSyncRotation3D; + } + if (m_NetworkTransform.rigidbody2D != null) + { + targetFacing = Quaternion.Euler(0, 0, m_NetworkTransform.targetSyncRotation2D); + } + m_Visualizer.transform.rotation = targetFacing; + } + + // --------------------- local transform sync ------------------------ + + void OnRenderObject() + { + if (m_Visualizer == null) + return; + + if (m_NetworkTransform.localPlayerAuthority && hasAuthority) + return; + + if (m_NetworkTransform.lastSyncTime == 0) + return; + + s_LineMaterial.SetPass(0); + GL.Begin(GL.LINES); + GL.Color(Color.white); + GL.Vertex3(transform.position.x, transform.position.y, transform.position.z); + GL.Vertex3(m_NetworkTransform.targetSyncPosition.x, m_NetworkTransform.targetSyncPosition.y, m_NetworkTransform.targetSyncPosition.z); + GL.End(); + + DrawRotationInterpolation(); + } + + void DrawRotationInterpolation() + { + Quaternion targetFacing = Quaternion.identity; + if (m_NetworkTransform.rigidbody3D != null) + { + targetFacing = m_NetworkTransform.targetSyncRotation3D; + } + if (m_NetworkTransform.rigidbody2D != null) + { + targetFacing = Quaternion.Euler(0, 0, m_NetworkTransform.targetSyncRotation2D); + } + if (targetFacing == Quaternion.identity) + return; + + // draw line for actual facing + GL.Begin(GL.LINES); + GL.Color(Color.yellow); + GL.Vertex3(transform.position.x, transform.position.y, transform.position.z); + + Vector3 actualFront = transform.position + transform.right; + GL.Vertex3(actualFront.x, actualFront.y, actualFront.z); + GL.End(); + + // draw line for target (server) facing + GL.Begin(GL.LINES); + GL.Color(Color.green); + + GL.Vertex3(transform.position.x, transform.position.y, transform.position.z); + + Vector3 targetPositionOffset = (targetFacing * Vector3.right); + Vector3 targetFront = transform.position + targetPositionOffset; + GL.Vertex3(targetFront.x, targetFront.y, targetFront.z); + GL.End(); + } + + static Material s_LineMaterial; + + static void CreateLineMaterial() + { + if (s_LineMaterial) + return; + var shader = Shader.Find("Hidden/Internal-Colored"); + if (!shader) + { + Debug.LogWarning("Could not find Colored builtin shader"); + return; + } + s_LineMaterial = new Material(shader); + s_LineMaterial.hideFlags = HideFlags.HideAndDontSave; + s_LineMaterial.SetInt("_ZWrite", 0); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransformVisualizer.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransformVisualizer.cs.meta new file mode 100644 index 00000000..257691c6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkTransformVisualizer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 12d3c4d58654741cf8f294d1dc4033a7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkWriter.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkWriter.cs new file mode 100644 index 00000000..4cdc86f2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkWriter.cs @@ -0,0 +1,1385 @@ +using System; +using System.Text; +using UnityEngine; + +namespace UnityEngine.Networking +{ + /* + // Binary stream Writer. Supports simple types, buffers, arrays, structs, and nested types + */ + /// + /// General purpose serializer for UNET (for serializing data to byte arrays). + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// // Writing data to a NetworkWriter and then + /// // Converting this to a NetworkReader. + /// void Start() + /// { + /// // The data you add to your writer must be prefixed with a message type. + /// // This is in the form of a short. + /// short myMsgType = 143; + /// NetworkWriter writer = new NetworkWriter(); + /// // You start the message in your writer by passing in the message type. + /// // This is a short meaning that it will take up 2 bytes at the start of + /// // your message. + /// writer.StartMessage(myMsgType); + /// // You can now begin your message. In this case we will just use strings. + /// writer.Write("Test data 1"); + /// writer.Write("Test data 2"); + /// writer.Write("Test data 3"); + /// // Make sure to end your message with FinishMessage() + /// writer.FinishMessage(); + /// // You can now access the data in your writer. ToArray() returns a copy + /// // of the bytes that the writer is using and AsArray() returns the + /// // internal array of bytes, not a copy. + /// byte[] writerData = writer.ToArray(); + /// CreateNetworkReader(writerData); + /// } + /// + /// void CreateNetworkReader(byte[] data) + /// { + /// // We will create the NetworkReader using the data from our previous + /// // NetworkWriter. + /// NetworkReader networkReader = new NetworkReader(data); + /// // The first two bytes in the buffer represent the size + /// // of the message. This is equal to the NetworkReader.Length + /// // minus the size of the prefix. + /// byte[] readerMsgSizeData = networkReader.ReadBytes(2); + /// short readerMsgSize = (short)((readerMsgSizeData[1] << 8) + readerMsgSizeData[0]); + /// Debug.Log(readerMsgSize); + /// // The message type added in NetworkWriter.StartMessage + /// // is to be read now. It is a short and so consists of + /// // two bytes. It is the second two bytes on the buffer. + /// byte[] readerMsgTypeData = networkReader.ReadBytes(2); + /// short readerMsgType = (short)((readerMsgTypeData[1] << 8) + readerMsgTypeData[0]); + /// Debug.Log(readerMsgType); + /// // If all of your data is of the same type (in this case the + /// // data on our buffer is comprised of only strings) you can + /// // read all the data from the buffer using a loop like so. + /// while (networkReader.Position < networkReader.Length) + /// { + /// Debug.Log(networkReader.ReadString()); + /// } + /// } + /// } + /// + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkWriter + { + const int k_MaxStringLength = 1024 * 32; + NetBuffer m_Buffer; + static Encoding s_Encoding; + static byte[] s_StringWriteBuffer; + + /// + /// Creates a new NetworkWriter object. + /// + public NetworkWriter() + { + m_Buffer = new NetBuffer(); + if (s_Encoding == null) + { + s_Encoding = new UTF8Encoding(); + s_StringWriteBuffer = new byte[k_MaxStringLength]; + } + } + + /// + /// Creates a new NetworkWriter object. + /// + /// A buffer to write into. This is not copied. + public NetworkWriter(byte[] buffer) + { + m_Buffer = new NetBuffer(buffer); + if (s_Encoding == null) + { + s_Encoding = new UTF8Encoding(); + s_StringWriteBuffer = new byte[k_MaxStringLength]; + } + } + + /// + /// The current position of the internal buffer. + /// See NetworkWriter for a code example. + /// + public short Position { get { return (short)m_Buffer.Position; } } + + /// + /// Returns a copy of internal array of bytes the writer is using, it copies only the bytes used. + /// See NetworkWriter for a code example. + /// + /// Copy of data used by the writer. + public byte[] ToArray() + { + var newArray = new byte[m_Buffer.AsArraySegment().Count]; + Array.Copy(m_Buffer.AsArraySegment().Array, newArray, m_Buffer.AsArraySegment().Count); + return newArray; + } + + /// + /// Returns the internal array of bytes the writer is using. This is NOT a copy. + /// + /// Internal buffer + public byte[] AsArray() + { + return AsArraySegment().Array; + } + + internal ArraySegment AsArraySegment() + { + return m_Buffer.AsArraySegment(); + } + + // http://sqlite.org/src4/doc/trunk/www/varint.wiki + /// + /// This writes the 32-bit value to the stream using variable-length-encoding. + /// + /// Value to write. + public void WritePackedUInt32(UInt32 value) + { + if (value <= 240) + { + Write((byte)value); + return; + } + if (value <= 2287) + { + Write((byte)((value - 240) / 256 + 241)); + Write((byte)((value - 240) % 256)); + return; + } + if (value <= 67823) + { + Write((byte)249); + Write((byte)((value - 2288) / 256)); + Write((byte)((value - 2288) % 256)); + return; + } + if (value <= 16777215) + { + Write((byte)250); + Write((byte)(value & 0xFF)); + Write((byte)((value >> 8) & 0xFF)); + Write((byte)((value >> 16) & 0xFF)); + return; + } + + // all other values of uint + Write((byte)251); + Write((byte)(value & 0xFF)); + Write((byte)((value >> 8) & 0xFF)); + Write((byte)((value >> 16) & 0xFF)); + Write((byte)((value >> 24) & 0xFF)); + } + + /// + /// This writes the 64-bit value to the stream using variable-length-encoding. + /// + /// Value to write. + public void WritePackedUInt64(UInt64 value) + { + if (value <= 240) + { + Write((byte)value); + return; + } + if (value <= 2287) + { + Write((byte)((value - 240) / 256 + 241)); + Write((byte)((value - 240) % 256)); + return; + } + if (value <= 67823) + { + Write((byte)249); + Write((byte)((value - 2288) / 256)); + Write((byte)((value - 2288) % 256)); + return; + } + if (value <= 16777215) + { + Write((byte)250); + Write((byte)(value & 0xFF)); + Write((byte)((value >> 8) & 0xFF)); + Write((byte)((value >> 16) & 0xFF)); + return; + } + if (value <= 4294967295) + { + Write((byte)251); + Write((byte)(value & 0xFF)); + Write((byte)((value >> 8) & 0xFF)); + Write((byte)((value >> 16) & 0xFF)); + Write((byte)((value >> 24) & 0xFF)); + return; + } + if (value <= 1099511627775) + { + Write((byte)252); + Write((byte)(value & 0xFF)); + Write((byte)((value >> 8) & 0xFF)); + Write((byte)((value >> 16) & 0xFF)); + Write((byte)((value >> 24) & 0xFF)); + Write((byte)((value >> 32) & 0xFF)); + return; + } + if (value <= 281474976710655) + { + Write((byte)253); + Write((byte)(value & 0xFF)); + Write((byte)((value >> 8) & 0xFF)); + Write((byte)((value >> 16) & 0xFF)); + Write((byte)((value >> 24) & 0xFF)); + Write((byte)((value >> 32) & 0xFF)); + Write((byte)((value >> 40) & 0xFF)); + return; + } + if (value <= 72057594037927935) + { + Write((byte)254); + Write((byte)(value & 0xFF)); + Write((byte)((value >> 8) & 0xFF)); + Write((byte)((value >> 16) & 0xFF)); + Write((byte)((value >> 24) & 0xFF)); + Write((byte)((value >> 32) & 0xFF)); + Write((byte)((value >> 40) & 0xFF)); + Write((byte)((value >> 48) & 0xFF)); + return; + } + + // all others + { + Write((byte)255); + Write((byte)(value & 0xFF)); + Write((byte)((value >> 8) & 0xFF)); + Write((byte)((value >> 16) & 0xFF)); + Write((byte)((value >> 24) & 0xFF)); + Write((byte)((value >> 32) & 0xFF)); + Write((byte)((value >> 40) & 0xFF)); + Write((byte)((value >> 48) & 0xFF)); + Write((byte)((value >> 56) & 0xFF)); + } + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(NetworkInstanceId value) + { + WritePackedUInt32(value.Value); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(NetworkSceneId value) + { + WritePackedUInt32(value.Value); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(char value) + { + m_Buffer.WriteByte((byte)value); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(byte value) + { + m_Buffer.WriteByte(value); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(sbyte value) + { + m_Buffer.WriteByte((byte)value); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(short value) + { + m_Buffer.WriteByte2((byte)(value & 0xff), (byte)((value >> 8) & 0xff)); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(ushort value) + { + m_Buffer.WriteByte2((byte)(value & 0xff), (byte)((value >> 8) & 0xff)); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(int value) + { + // little endian... + m_Buffer.WriteByte4( + (byte)(value & 0xff), + (byte)((value >> 8) & 0xff), + (byte)((value >> 16) & 0xff), + (byte)((value >> 24) & 0xff)); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(uint value) + { + m_Buffer.WriteByte4( + (byte)(value & 0xff), + (byte)((value >> 8) & 0xff), + (byte)((value >> 16) & 0xff), + (byte)((value >> 24) & 0xff)); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(long value) + { + m_Buffer.WriteByte8( + (byte)(value & 0xff), + (byte)((value >> 8) & 0xff), + (byte)((value >> 16) & 0xff), + (byte)((value >> 24) & 0xff), + (byte)((value >> 32) & 0xff), + (byte)((value >> 40) & 0xff), + (byte)((value >> 48) & 0xff), + (byte)((value >> 56) & 0xff)); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(ulong value) + { + m_Buffer.WriteByte8( + (byte)(value & 0xff), + (byte)((value >> 8) & 0xff), + (byte)((value >> 16) & 0xff), + (byte)((value >> 24) & 0xff), + (byte)((value >> 32) & 0xff), + (byte)((value >> 40) & 0xff), + (byte)((value >> 48) & 0xff), + (byte)((value >> 56) & 0xff)); + } + + static UIntFloat s_FloatConverter; + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(float value) + { + s_FloatConverter.floatValue = value; + Write(s_FloatConverter.intValue); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(double value) + { + s_FloatConverter.doubleValue = value; + Write(s_FloatConverter.longValue); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(decimal value) + { + Int32[] bits = decimal.GetBits(value); + Write(bits[0]); + Write(bits[1]); + Write(bits[2]); + Write(bits[3]); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(string value) + { + if (value == null) + { + m_Buffer.WriteByte2(0, 0); + return; + } + + int len = s_Encoding.GetByteCount(value); + + if (len >= k_MaxStringLength) + { + throw new IndexOutOfRangeException("Serialize(string) too long: " + value.Length); + } + + Write((ushort)(len)); + int numBytes = s_Encoding.GetBytes(value, 0, value.Length, s_StringWriteBuffer, 0); + m_Buffer.WriteBytes(s_StringWriteBuffer, (ushort)numBytes); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(bool value) + { + if (value) + m_Buffer.WriteByte(1); + else + m_Buffer.WriteByte(0); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The byte buffer to write. + /// The number of bytes in the byte buffer to write. + public void Write(byte[] buffer, int count) + { + if (count > UInt16.MaxValue) + { + if (LogFilter.logError) { Debug.LogError("NetworkWriter Write: buffer is too large (" + count + ") bytes. The maximum buffer size is 64K bytes."); } + return; + } + m_Buffer.WriteBytes(buffer, (UInt16)count); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The byte buffer to write. + /// The byte buffer array element to start writing from. + /// The number of bytes in the byte buffer to write. + public void Write(byte[] buffer, int offset, int count) + { + if (count > UInt16.MaxValue) + { + if (LogFilter.logError) { Debug.LogError("NetworkWriter Write: buffer is too large (" + count + ") bytes. The maximum buffer size is 64K bytes."); } + return; + } + m_Buffer.WriteBytesAtOffset(buffer, (ushort)offset, (ushort)count); + } + + /// + /// This writes a 16-bit count and an array of bytes of that length to the stream. + /// + /// Array of bytes to write. + /// Number of bytes from the array to write. + public void WriteBytesAndSize(byte[] buffer, int count) + { + if (buffer == null || count == 0) + { + Write((UInt16)0); + return; + } + + if (count > UInt16.MaxValue) + { + if (LogFilter.logError) { Debug.LogError("NetworkWriter WriteBytesAndSize: buffer is too large (" + count + ") bytes. The maximum buffer size is 64K bytes."); } + return; + } + + Write((UInt16)count); + m_Buffer.WriteBytes(buffer, (UInt16)count); + } + + /// + /// This writes a 16-bit count and an array of bytes of that size to the stream. + /// Note that this will be the full allocated size of the array. So if the array is partially filled with data to send - then you should be using WriteBytesAndSize instead. + /// + /// Bytes to write. + //NOTE: this will write the entire buffer.. including trailing empty space! + public void WriteBytesFull(byte[] buffer) + { + if (buffer == null) + { + Write((UInt16)0); + return; + } + if (buffer.Length > UInt16.MaxValue) + { + if (LogFilter.logError) { Debug.LogError("NetworkWriter WriteBytes: buffer is too large (" + buffer.Length + ") bytes. The maximum buffer size is 64K bytes."); } + return; + } + Write((UInt16)buffer.Length); + m_Buffer.WriteBytes(buffer, (UInt16)buffer.Length); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Vector2 value) + { + Write(value.x); + Write(value.y); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Vector3 value) + { + Write(value.x); + Write(value.y); + Write(value.z); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Vector4 value) + { + Write(value.x); + Write(value.y); + Write(value.z); + Write(value.w); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Color value) + { + Write(value.r); + Write(value.g); + Write(value.b); + Write(value.a); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Color32 value) + { + Write(value.r); + Write(value.g); + Write(value.b); + Write(value.a); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Quaternion value) + { + Write(value.x); + Write(value.y); + Write(value.z); + Write(value.w); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Rect value) + { + Write(value.xMin); + Write(value.yMin); + Write(value.width); + Write(value.height); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example.s + /// + /// The object to write. + public void Write(Plane value) + { + Write(value.normal); + Write(value.distance); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Ray value) + { + Write(value.direction); + Write(value.origin); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Matrix4x4 value) + { + Write(value.m00); + Write(value.m01); + Write(value.m02); + Write(value.m03); + Write(value.m10); + Write(value.m11); + Write(value.m12); + Write(value.m13); + Write(value.m20); + Write(value.m21); + Write(value.m22); + Write(value.m23); + Write(value.m30); + Write(value.m31); + Write(value.m32); + Write(value.m33); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(NetworkHash128 value) + { + Write(value.i0); + Write(value.i1); + Write(value.i2); + Write(value.i3); + Write(value.i4); + Write(value.i5); + Write(value.i6); + Write(value.i7); + Write(value.i8); + Write(value.i9); + Write(value.i10); + Write(value.i11); + Write(value.i12); + Write(value.i13); + Write(value.i14); + Write(value.i15); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(NetworkIdentity value) + { + if (value == null) + { + WritePackedUInt32(0); + return; + } + Write(value.netId); + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(Transform value) + { + if (value == null || value.gameObject == null) + { + WritePackedUInt32(0); + return; + } + var uv = value.gameObject.GetComponent(); + if (uv != null) + { + Write(uv.netId); + } + else + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkWriter " + value + " has no NetworkIdentity"); } + WritePackedUInt32(0); + } + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The object to write. + public void Write(GameObject value) + { + if (value == null) + { + WritePackedUInt32(0); + return; + } + var uv = value.GetComponent(); + if (uv != null) + { + Write(uv.netId); + } + else + { + if (LogFilter.logWarn) { Debug.LogWarning("NetworkWriter " + value + " has no NetworkIdentity"); } + WritePackedUInt32(0); + } + } + + /// + /// This writes a reference to an object, value, buffer or network message, together with a NetworkIdentity component to the stream. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// The network message to write. + public void Write(MessageBase msg) + { + msg.Serialize(this); + } + + /// + /// Seeks to the start of the internal buffer. + /// + public void SeekZero() + { + m_Buffer.SeekZero(); + } + + /// + /// This begins a new message, which should be completed with FinishMessage() once the payload has been written. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + /// Message type. + public void StartMessage(short msgType) + { + SeekZero(); + + // two bytes for size, will be filled out in FinishMessage + m_Buffer.WriteByte2(0, 0); + + // two bytes for message type + Write(msgType); + } + + /// + /// This fills out the size header of a message begun with StartMessage(), so that it can be send using Send() functions. + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class ExampleScript : MonoBehaviour + /// { + /// void Start() + /// { + /// short myMsgType = 444; + /// NetworkWriter writer = new NetworkWriter(); + /// writer.StartMessage(myMsgType); + /// writer.Write("test data"); + /// writer.FinishMessage(); + /// } + /// } + /// + /// See NetworkWriter for another code example. + /// + public void FinishMessage() + { + // writes correct size into space at start of buffer + m_Buffer.FinishMessage(); + } + }; +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkWriter.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkWriter.cs.meta new file mode 100644 index 00000000..75180668 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/NetworkWriter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c85cc6b0514b148eab02311be389fff6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/PlayerController.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/PlayerController.cs new file mode 100644 index 00000000..864f3247 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/PlayerController.cs @@ -0,0 +1,61 @@ +using System; + +namespace UnityEngine.Networking +{ + /// + /// This represents a networked player. + /// + // This class represents the player entity in a network game, there can be multiple players per client + // when there are multiple people playing on one machine + // The server has one connection per client, and the connection has the player instances of that client + // The client has player instances as member variables (should this be removed and just go though the connection like the server does?) + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class PlayerController + { + internal const short kMaxLocalPlayers = 8; + + /// + /// The local player ID number of this player. + /// The HLAPI treats players and clients as separate GameObjects. In most cases, there is a single player for each client, but in some situations (for example, when there are multiple controllers connected to a console system) there might be multiple player GameObjects for a single connection. When there are multiple players for a single connection, use the playerControllerId property to tell them apart. This is an identifier that is scoped to the connection, so that it maps to the id of the controller associated with the player on that client. + /// + public short playerControllerId = -1; + /// + /// The NetworkIdentity component of the player. + /// + public NetworkIdentity unetView; + /// + /// The game object for this player. + /// + public GameObject gameObject; + + /// + /// The maximum number of local players that a client connection can have. + /// + public const int MaxPlayersPerClient = 32; + + public PlayerController() + { + } + + /// + /// Checks if this PlayerController has an actual player attached to it. + /// + public bool IsValid { get { return playerControllerId != -1; } } + + internal PlayerController(GameObject go, short playerControllerId) + { + gameObject = go; + unetView = go.GetComponent(); + this.playerControllerId = playerControllerId; + } + + /// + /// String representation of the player objects state. + /// + /// String with the object state. + public override string ToString() + { + return string.Format("ID={0} NetworkIdentity NetID={1} Player={2}", new object[] { playerControllerId, (unetView != null ? unetView.netId.ToString() : "null"), (gameObject != null ? gameObject.name : "null") }); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/PlayerController.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/PlayerController.cs.meta new file mode 100644 index 00000000..7c16d7e5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/PlayerController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01e26abfd88494891ba3340916b4405a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties.meta new file mode 100644 index 00000000..3f46f129 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a892cd40c71274f01a425178dc9564f1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties/AssemblyInfo.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..21390308 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties/AssemblyInfo.cs @@ -0,0 +1,41 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("UnityEngine.Networking")] +[assembly: AssemblyDescription("Networking High Level API")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Unity Technologies")] +[assembly: AssemblyProduct("UnityEngine.Networking")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: InternalsVisibleTo("UnityEditor.Networking")] +[assembly: InternalsVisibleTo("com.unity.multiplayer-hlapi.Editor")] +[assembly: InternalsVisibleTo("com.unity.multiplayer-hlapi.EditorTests")] +[assembly: InternalsVisibleTo("com.unity.multiplayer-hlapi.Editor-testable")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("87035389-1bb3-40e2-b2a9-c8707e7419ba")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties/AssemblyInfo.cs.meta new file mode 100644 index 00000000..ae906d47 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/Properties/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d581431663e7d4250af76bee38e6a148 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/SyncList.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/SyncList.cs new file mode 100644 index 00000000..c7c49dc1 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/SyncList.cs @@ -0,0 +1,668 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; + +namespace UnityEngine.Networking +{ + /// + /// This is a list of strings that will be synchronized from the server to clients. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public sealed class SyncListString : SyncList + { + protected override void SerializeItem(NetworkWriter writer, string item) + { + writer.Write(item); + } + + protected override string DeserializeItem(NetworkReader reader) + { + return reader.ReadString(); + } + + [System.Obsolete("ReadReference is now used instead")] + static public SyncListString ReadInstance(NetworkReader reader) + { + ushort count = reader.ReadUInt16(); + var result = new SyncListString(); + for (ushort i = 0; i < count; i++) + { + result.AddInternal(reader.ReadString()); + } + return result; + } + + /// + /// An internal function used for serializing SyncList member variables. + /// + /// + /// + static public void ReadReference(NetworkReader reader, SyncListString syncList) + { + ushort count = reader.ReadUInt16(); + syncList.Clear(); + for (ushort i = 0; i < count; i++) + { + syncList.AddInternal(reader.ReadString()); + } + } + + static public void WriteInstance(NetworkWriter writer, SyncListString items) + { + writer.Write((ushort)items.Count); + for (int i = 0; i < items.Count; i++) + { + writer.Write(items[i]); + } + } + } + + /// + /// A list of floats that will be synchronized from server to clients. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public sealed class SyncListFloat : SyncList + { + protected override void SerializeItem(NetworkWriter writer, float item) + { + writer.Write(item); + } + + protected override float DeserializeItem(NetworkReader reader) + { + return reader.ReadSingle(); + } + + [System.Obsolete("ReadReference is now used instead")] + static public SyncListFloat ReadInstance(NetworkReader reader) + { + ushort count = reader.ReadUInt16(); + var result = new SyncListFloat(); + for (ushort i = 0; i < count; i++) + { + result.AddInternal(reader.ReadSingle()); + } + return result; + } + + /// + /// An internal function used for serializing SyncList member variables. + /// + /// + /// + static public void ReadReference(NetworkReader reader, SyncListFloat syncList) + { + ushort count = reader.ReadUInt16(); + syncList.Clear(); + for (ushort i = 0; i < count; i++) + { + syncList.AddInternal(reader.ReadSingle()); + } + } + + static public void WriteInstance(NetworkWriter writer, SyncListFloat items) + { + writer.Write((ushort)items.Count); + for (int i = 0; i < items.Count; i++) + { + writer.Write(items[i]); + } + } + } + + /// + /// A list of integers that will be synchronized from server to clients. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class SyncListInt : SyncList + { + protected override void SerializeItem(NetworkWriter writer, int item) + { + writer.WritePackedUInt32((uint)item); + } + + protected override int DeserializeItem(NetworkReader reader) + { + return (int)reader.ReadPackedUInt32(); + } + + [System.Obsolete("ReadReference is now used instead")] + static public SyncListInt ReadInstance(NetworkReader reader) + { + ushort count = reader.ReadUInt16(); + var result = new SyncListInt(); + for (ushort i = 0; i < count; i++) + { + result.AddInternal((int)reader.ReadPackedUInt32()); + } + return result; + } + + /// + /// An internal function used for serializing SyncList member variables. + /// + /// + /// + static public void ReadReference(NetworkReader reader, SyncListInt syncList) + { + ushort count = reader.ReadUInt16(); + syncList.Clear(); + for (ushort i = 0; i < count; i++) + { + syncList.AddInternal((int)reader.ReadPackedUInt32()); + } + } + + static public void WriteInstance(NetworkWriter writer, SyncListInt items) + { + writer.Write((ushort)items.Count); + + for (int i = 0; i < items.Count; i++) + { + writer.WritePackedUInt32((uint)items[i]); + } + } + } + + /// + /// A list of unsigned integers that will be synchronized from server to clients. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class SyncListUInt : SyncList + { + protected override void SerializeItem(NetworkWriter writer, uint item) + { + writer.WritePackedUInt32(item); + } + + protected override uint DeserializeItem(NetworkReader reader) + { + return reader.ReadPackedUInt32(); + } + + [System.Obsolete("ReadReference is now used instead")] + static public SyncListUInt ReadInstance(NetworkReader reader) + { + ushort count = reader.ReadUInt16(); + var result = new SyncListUInt(); + for (ushort i = 0; i < count; i++) + { + result.AddInternal(reader.ReadPackedUInt32()); + } + return result; + } + + /// + /// An internal function used for serializing SyncList member variables. + /// + /// + /// + static public void ReadReference(NetworkReader reader, SyncListUInt syncList) + { + ushort count = reader.ReadUInt16(); + syncList.Clear(); + for (ushort i = 0; i < count; i++) + { + syncList.AddInternal(reader.ReadPackedUInt32()); + } + } + + static public void WriteInstance(NetworkWriter writer, SyncListUInt items) + { + writer.Write((ushort)items.Count); + for (int i = 0; i < items.Count; i++) + { + writer.WritePackedUInt32(items[i]); + } + } + } + + /// + /// A list of booleans that will be synchronized from server to clients. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class SyncListBool : SyncList + { + protected override void SerializeItem(NetworkWriter writer, bool item) + { + writer.Write(item); + } + + protected override bool DeserializeItem(NetworkReader reader) + { + return reader.ReadBoolean(); + } + + [System.Obsolete("ReadReference is now used instead")] + static public SyncListBool ReadInstance(NetworkReader reader) + { + ushort count = reader.ReadUInt16(); + var result = new SyncListBool(); + for (ushort i = 0; i < count; i++) + { + result.AddInternal(reader.ReadBoolean()); + } + return result; + } + + /// + /// An internal function used for serializing SyncList member variables. + /// + /// + /// + static public void ReadReference(NetworkReader reader, SyncListBool syncList) + { + ushort count = reader.ReadUInt16(); + syncList.Clear(); + for (ushort i = 0; i < count; i++) + { + syncList.AddInternal(reader.ReadBoolean()); + } + } + + static public void WriteInstance(NetworkWriter writer, SyncListBool items) + { + writer.Write((ushort)items.Count); + for (int i = 0; i < items.Count; i++) + { + writer.Write(items[i]); + } + } + } + + /// + /// This class is used for lists of structs that are synchronized from the server to clients. + /// To use SyncListStruct, derive a new class with your struct as the generic parameter. + /// + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class SyncListStruct : SyncList where T : struct + { + new public void AddInternal(T item) + { + base.AddInternal(item); + } + + protected override void SerializeItem(NetworkWriter writer, T item) + { + } + + protected override T DeserializeItem(NetworkReader reader) + { + return new T(); + } + + public T GetItem(int i) + { + return base[i]; + } + + new public ushort Count { get { return (ushort)base.Count; } } + } + + /// + /// This is the base class for type-specific SyncList classes. + /// A SyncList can only be of the following type; + /// + /// + /// + /// Basic type (byte, int, float, string, UInt64, etc) + /// + /// + /// Built-in Unity math type (Vector3, Quaternion, etc), + /// + /// + /// NetworkIdentity + /// + /// + /// NetworkInstanceId + /// + /// + /// NetworkHash128 + /// + /// + /// GameObject with a NetworkIdentity component attached. + /// + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + abstract public class SyncList : IList + { + /// + /// A delegate that can be populated to recieve callbacks when the list changes. + /// For example this function is called when the m_ints list changes: + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// + /// public class MyBehaviour : NetworkBehaviour + /// { + /// public SyncListInt m_ints = new SyncListInt(); + /// + /// private void OnIntChanged(SyncListInt.Operation op, int index) + /// { + /// Debug.Log("list changed " + op); + /// } + /// + /// public override void OnStartClient() + /// { + /// m_ints.Callback = OnIntChanged; + /// } + /// } + /// + /// It is best to populate the delagate during the OnStartClient() callback function. Doing it earlier can lead to it being lost when the initial list value is applied. + /// + /// + /// + public delegate void SyncListChanged(Operation op, int itemIndex); + + List m_Objects = new List(); + + /// + /// Returns the number of elements in this SyncList. + /// + public int Count { get { return m_Objects.Count; } } + /// + /// Reports whether the SyncList is read-only. + /// + public bool IsReadOnly { get { return false; } } + /// + /// The delegate type used for SyncListChanged. + /// + public SyncListChanged Callback { get { return m_Callback; } set { m_Callback = value; } } + + /// + /// The types of operations that can occur for SyncLists. + /// + public enum Operation + { + /// + /// Item was added to the list. + /// + OP_ADD, + /// + /// The list was cleared. + /// + OP_CLEAR, + /// + /// An item was inserted into the list. + /// + OP_INSERT, + /// + /// An item was removed from the list. + /// + OP_REMOVE, + /// + /// An item was removed at an index from the list. + /// + OP_REMOVEAT, + /// + /// An item was set to a new value in the list. + /// + OP_SET, + /// + /// An item in the list was manually marked dirty. + /// + OP_DIRTY + }; + + NetworkBehaviour m_Behaviour; + int m_CmdHash; + SyncListChanged m_Callback; + + /// + /// This is used to write a value object from a SyncList to a stream. + /// + /// Stream to write to. + /// Item to write. + abstract protected void SerializeItem(NetworkWriter writer, T item); + /// + /// This method is used when deserializing SyncList items from a stream. + /// + /// Stream to read from. + /// New instance of the SyncList value type. + abstract protected T DeserializeItem(NetworkReader reader); + + + /// + /// Internal function. + /// + /// The behaviour the list belongs to. + /// Identifies this list. + public void InitializeBehaviour(NetworkBehaviour beh, int cmdHash) + { + m_Behaviour = beh; + m_CmdHash = cmdHash; + } + + void SendMsg(Operation op, int itemIndex, T item) + { + if (m_Behaviour == null) + { + if (LogFilter.logError) { Debug.LogError("SyncList not initialized"); } + return; + } + + var uv = m_Behaviour.GetComponent(); + if (uv == null) + { + if (LogFilter.logError) { Debug.LogError("SyncList no NetworkIdentity"); } + return; + } + + if (!uv.isServer) + { + // object is not spawned yet, so no need to send updates. + return; + } + + NetworkWriter writer = new NetworkWriter(); + writer.StartMessage(MsgType.SyncList); + writer.Write(uv.netId); + writer.WritePackedUInt32((uint)m_CmdHash); + writer.Write((byte)op); + writer.WritePackedUInt32((uint)itemIndex); + SerializeItem(writer, item); + writer.FinishMessage(); + + NetworkServer.SendWriterToReady(uv.gameObject, writer, m_Behaviour.GetNetworkChannel()); + +#if UNITY_EDITOR + Profiler.IncrementStatOutgoing(MsgType.SyncList, op.ToString()); +#endif + + // ensure it is invoked on host + if (m_Behaviour.isServer && m_Behaviour.isClient && m_Callback != null) + { + m_Callback.Invoke(op, itemIndex); + } + } + + void SendMsg(Operation op, int itemIndex) + { + SendMsg(op, itemIndex, default(T)); + } + + public void HandleMsg(NetworkReader reader) + { + byte op = reader.ReadByte(); + int itemIndex = (int)reader.ReadPackedUInt32(); + T item = DeserializeItem(reader); + + switch ((Operation)op) + { + case Operation.OP_ADD: + m_Objects.Add(item); + break; + + case Operation.OP_CLEAR: + m_Objects.Clear(); + break; + + case Operation.OP_INSERT: + m_Objects.Insert(itemIndex, item); + break; + + case Operation.OP_REMOVE: + m_Objects.Remove(item); + break; + + case Operation.OP_REMOVEAT: + m_Objects.RemoveAt(itemIndex); + break; + + case Operation.OP_SET: + case Operation.OP_DIRTY: + m_Objects[itemIndex] = item; + break; + } + if (m_Callback != null) + { + m_Callback.Invoke((Operation)op, itemIndex); + } + } + + // used to bypass Add message. + internal void AddInternal(T item) + { + m_Objects.Add(item); + } + + /// + /// Same as List:Add() but the item is added on clients. + /// + /// Item to add. + public void Add(T item) + { + m_Objects.Add(item); + SendMsg(Operation.OP_ADD, m_Objects.Count - 1, item); + } + + /// + /// Same as List:Clear() but the list is cleared on clients. + /// + public void Clear() + { + m_Objects.Clear(); + SendMsg(Operation.OP_CLEAR, 0); + } + + /// + /// Determines whether the list contains item item. + /// + /// Item to search for. + /// True if item contain + public bool Contains(T item) + { + return m_Objects.Contains(item); + } + + /// + /// Copies the elements of the SyncList to an Array, starting at a particular Array index. + /// + /// Array to copy elements to. + /// The zero-based index in array at which copying begins. + public void CopyTo(T[] array, int index) + { + m_Objects.CopyTo(array, index); + } + + /// + /// Determines the index of a specific item in the SyncList. + /// + /// The item to return the index for. + /// Index of the item + public int IndexOf(T item) + { + return m_Objects.IndexOf(item); + } + + /// + /// Same as List::Insert() but also inserts into list on clients. + /// + /// Where to insert the item. + /// Item to insert. + public void Insert(int index, T item) + { + m_Objects.Insert(index, item); + SendMsg(Operation.OP_INSERT, index, item); + } + + /// + /// Same as List:Remove except removes on clients also. + /// + /// Item to remove. + /// + public bool Remove(T item) + { + var result = m_Objects.Remove(item); + if (result) + { + SendMsg(Operation.OP_REMOVE, 0, item); + } + return result; + } + + /// + /// Same as List:Remove except it removes the index on clients also. + /// + /// Index to remove. + public void RemoveAt(int index) + { + m_Objects.RemoveAt(index); + SendMsg(Operation.OP_REMOVEAT, index); + } + + /// + /// Marks an item in the list as dirty, so it will be updated on clients. + /// + /// Index of item to dirty. + public void Dirty(int index) + { + SendMsg(Operation.OP_DIRTY, index, m_Objects[index]); + } + + public T this[int i] + { + get { return m_Objects[i]; } + set + { + bool changed = false; + if (m_Objects[i] == null) + { + if (value == null) + return; + else + changed = true; + } + else + { + changed = !m_Objects[i].Equals(value); + } + + m_Objects[i] = value; + if (changed) + { + SendMsg(Operation.OP_SET, i, value); + } + } + } + + /// + /// Returns an enumerator that iterates through the SyncList. + /// + /// + public IEnumerator GetEnumerator() + { + return m_Objects.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/SyncList.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/SyncList.cs.meta new file mode 100644 index 00000000..fe09fdab --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/SyncList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 12a66a4cf4e7848d6b332428c3e53d58 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/UNetwork.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/UNetwork.cs new file mode 100644 index 00000000..2450cc34 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/UNetwork.cs @@ -0,0 +1,429 @@ +using System; + +#pragma warning disable 618 +namespace UnityEngine.Networking +{ + // Handles network messages on client and server + public delegate void NetworkMessageDelegate(NetworkMessage netMsg); + + // Handles requests to spawn objects on the client + public delegate GameObject SpawnDelegate(Vector3 position, NetworkHash128 assetId); + + // Handles requests to unspawn objects on the client + public delegate void UnSpawnDelegate(GameObject spawned); + + /// + /// Container class for networking system built-in message types. + /// + // built-in system network messages + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class MsgType + { + // internal system messages - cannot be replaced by user code + /// + /// Internal networking system message for destroying objects. + /// + public const short ObjectDestroy = 1; + /// + /// Internal networking system message for sending a ClientRPC from server to client. + /// + public const short Rpc = 2; + /// + /// Internal networking system message for spawning objects. + /// + public const short ObjectSpawn = 3; + /// + /// Internal networking system message for telling clients they own a player object. + /// + public const short Owner = 4; + /// + /// Internal networking system message for sending a command from client to server. + /// + public const short Command = 5; + /// + /// Internal networking system message for sending tranforms from client to server. + /// + public const short LocalPlayerTransform = 6; + /// + /// Internal networking system message for sending a SyncEvent from server to client. + /// + public const short SyncEvent = 7; + /// + /// Internal networking system message for updating SyncVars on a client from a server. + /// + public const short UpdateVars = 8; + /// + /// Internal networking system message for sending a USyncList generic list. + /// + public const short SyncList = 9; + /// + /// Internal networking system message for spawning scene objects. + /// + public const short ObjectSpawnScene = 10; + /// + /// Internal networking system message for sending information about network peers to clients. + /// + public const short NetworkInfo = 11; + /// + /// Internal networking system messages used to tell when the initial contents of a scene is being spawned. + /// + public const short SpawnFinished = 12; + /// + /// Internal networking system message for hiding objects. + /// + public const short ObjectHide = 13; + /// + /// Internal networking system message for HLAPI CRC checking. + /// + public const short CRC = 14; + /// + /// Internal networking system message for setting authority to a client for an object. + /// + public const short LocalClientAuthority = 15; + /// + /// Internal networking system message for sending tranforms for client object from client to server. + /// + public const short LocalChildTransform = 16; + /// + /// Internal networking system message for identifying fragmented packets. + /// + public const short Fragment = 17; + /// + /// Internal networking system message for sending information about changes in authority for non-player objects to clients. + /// + public const short PeerClientAuthority = 18; + + // used for profiling + internal const short UserMessage = 0; + internal const short HLAPIMsg = 28; + internal const short LLAPIMsg = 29; + internal const short HLAPIResend = 30; + internal const short HLAPIPending = 31; + + /// + /// The highest value of internal networking system message ids. User messages must be above this value. User code cannot replace these handlers. + /// + public const short InternalHighest = 31; + + // public system messages - can be replaced by user code + /// + /// Internal networking system message for communicating a connection has occurred. + /// Ensure you use RegisterHandler on the client or server. Insert MsgType.Connect as a parameter to listen for connections. + /// + public const short Connect = 32; + /// + /// Internal networking system message for communicating a disconnect has occurred. + /// To help understand the reason for a disconnect, an IntegerMessage number is written to the message body, which can be read and converted to the error enum. + /// + public const short Disconnect = 33; + /// + /// Internal networking system message for communicating an error. + /// + public const short Error = 34; + /// + /// Internal networking system message for clients to tell server they are ready. + /// + public const short Ready = 35; + /// + /// Internal networking system message for server to tell clients they are no longer ready. + /// Can be used when switching scenes, to stop receiving network traffic during the switch. + /// + public const short NotReady = 36; + /// + /// Internal networking system message for adding player objects to client instances. + /// This is sent to the server when a client calls NetworkClient.AddPlayer(). The server should have a handler for this message type to add the player object to the game and notify the client with NetworkServer.AddPlayer(). + /// + public const short AddPlayer = 37; + /// + /// Internal networking system message for removing a player object which was spawned for a client. + /// + public const short RemovePlayer = 38; + /// + /// Internal networking system message that tells clients which scene to load when they connect to a server. + /// + public const short Scene = 39; + /// + /// Internal networking system message for sending synchronizing animation state. + /// Used by the NetworkAnimation component. + /// + public const short Animation = 40; + /// + /// Internal networking system message for sending synchronizing animation parameter state. + /// Used by the NetworkAnimation component. + /// + public const short AnimationParameters = 41; + /// + /// Internal networking system message for sending animation triggers. + /// Used by the NetworkAnimation component. + /// + public const short AnimationTrigger = 42; + /// + /// Internal networking system message for communicating a player is ready in the lobby. + /// + public const short LobbyReadyToBegin = 43; + /// + /// Internal networking system message for communicating a lobby player has loaded the game scene. + /// + public const short LobbySceneLoaded = 44; + /// + /// Internal networking system message for communicating failing to add lobby player. + /// + public const short LobbyAddPlayerFailed = 45; + /// + /// Internal networking system messages used to return the game to the lobby scene. + /// + public const short LobbyReturnToLobby = 46; + /// + /// Internal networking system message used when a client connects to the new host of a game. + /// + public const short ReconnectPlayer = 47; + + /// + /// The highest value of built-in networking system message ids. User messages must be above this value. + /// + //NOTE: update msgLabels below if this is changed. + public const short Highest = 47; + + static internal string[] msgLabels = + { + "none", + "ObjectDestroy", + "Rpc", + "ObjectSpawn", + "Owner", + "Command", + "LocalPlayerTransform", + "SyncEvent", + "UpdateVars", + "SyncList", + "ObjectSpawnScene", // 10 + "NetworkInfo", + "SpawnFinished", + "ObjectHide", + "CRC", + "LocalClientAuthority", + "LocalChildTransform", + "Fragment", + "PeerClientAuthority", + "", + "", // 20 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", // 30 + "", // - SystemInternalHighest + "Connect", // 32, + "Disconnect", + "Error", + "Ready", + "NotReady", + "AddPlayer", + "RemovePlayer", + "Scene", + "Animation", // 40 + "AnimationParams", + "AnimationTrigger", + "LobbyReadyToBegin", + "LobbySceneLoaded", + "LobbyAddPlayerFailed", // 45 + "LobbyReturnToLobby", // 46 + "ReconnectPlayer", // 47 + }; + + /// + /// Returns the name of internal message types by their id. + /// + /// A internal message id value. + /// The name of the internal message. + static public string MsgTypeToString(short value) + { + if (value < 0 || value > Highest) + { + return String.Empty; + } + string result = msgLabels[value]; + if (string.IsNullOrEmpty(result)) + { + result = "[" + value + "]"; + } + return result; + } + } + + /// + /// The details of a network message received by a client or server on a network connection. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class NetworkMessage + { + /// + /// The size of the largest message in bytes that can be sent on a NetworkConnection. + /// Note that channels that are not Fragmented cannot send messages larger than the Maximum Transmission Unity (MTU) size, which is about 1400 bytes by default. + /// + public const int MaxMessageSize = (64 * 1024) - 1; + + /// + /// The id of the message type of the message. + /// + public short msgType; + /// + /// The connection the message was recieved on. + /// + public NetworkConnection conn; + /// + /// A NetworkReader object that contains the contents of the message. + /// For some built-in message types with no body, this can be null. + /// + public NetworkReader reader; + /// + /// The transport layer channel the message was sent on. + /// + public int channelId; + + /// + /// Returns a string with the numeric representation of each byte in the payload. + /// + /// Network message payload to dump. + /// Length of payload in bytes. + /// Dumped info from payload. + public static string Dump(byte[] payload, int sz) + { + string outStr = "["; + for (int i = 0; i < sz; i++) + { + outStr += (payload[i] + " "); + } + outStr += "]"; + return outStr; + } + + /// + /// ReadMessage is used to extract a typed network message from the NetworkReader of a NetworkMessage object. + /// For example in a handler for the AddPlayer message: + /// + /// using UnityEngine; + /// using UnityEngine.Networking; + /// using UnityEngine.Networking.NetworkSystem; + /// + /// public class MyManager : NetworkManager + /// { + /// void OnServerAddPlayerMessageInternal(NetworkMessage netMsg) + /// { + /// var msg = netMsg.ReadMessage<AddPlayerMessage>(); + /// OnServerAddPlayer(netMsg.conn, msg.playerControllerId); + /// } + /// } + /// + /// The AddPlayerMessage that is created will be populated by calling DeSerialize(). So when it is returned form ReadMessage it is ready to use. + /// + /// The type of the Network Message, must be derived from MessageBase. + /// + public TMsg ReadMessage() where TMsg : MessageBase, new() + { + var msg = new TMsg(); + msg.Deserialize(reader); + return msg; + } + + public void ReadMessage(TMsg msg) where TMsg : MessageBase + { + msg.Deserialize(reader); + } + } + + /// + /// Enumeration of Networking versions. + /// + public enum Version + { + /// + /// The current UNET version. + /// + Current = 1 + } + + /// + /// Class containing constants for default network channels. + /// + [Obsolete("The high level API classes are deprecated and will be removed in the future.")] + public class Channels + { + /// + /// The id of the default reliable channel used by the UNet HLAPI, This channel is used for state updates and spawning. + /// + public const int DefaultReliable = 0; + /// + /// The id of the default unreliable channel used for the UNet HLAPI. This channel is used for movement updates. + /// + public const int DefaultUnreliable = 1; + } + + /// + /// An enumeration of the options that can be set on a network channel. + /// + public enum ChannelOption + { + /// + /// The option to set the number of pending buffers for a channel. + /// These buffers are allocated dynamically as required when writes to the transport layer fail. Each buffer will be the size of maxPacketSize for the channel - usually around 1400 bytes. The default is 16 buffers. + /// This only applies to reliable channels. If a reliable channel runs out of pnding buffers, data will be lost. + /// + MaxPendingBuffers = 1, + AllowFragmentation = 2, + MaxPacketSize = 3 + // maybe add an InitialCapacity for Pending Buffers list if needed in the future + } + +#if UNITY_EDITOR + class Profiler + { + internal static void IncrementStatOutgoing(short msgType) + { + IncrementStatOutgoing(msgType, "msg"); + } + + internal static void IncrementStatOutgoing(short msgType, string name) + { + UnityEditor.NetworkDetailStats.IncrementStat( + UnityEditor.NetworkDetailStats.NetworkDirection.Outgoing, + msgType, name, 1); + } + + internal static void IncrementStatIncoming(short msgType) + { + IncrementStatIncoming(msgType, "msg"); + } + + internal static void IncrementStatIncoming(short msgType, string name) + { + UnityEditor.NetworkDetailStats.IncrementStat( + UnityEditor.NetworkDetailStats.NetworkDirection.Incoming, + msgType, name, 1); + } + + internal static void SetStatOutgoing(short msgType, int value) + { + UnityEditor.NetworkDetailStats.SetStat( + UnityEditor.NetworkDetailStats.NetworkDirection.Outgoing, + msgType, "msg", value); + } + + internal static void ResetAll() + { + UnityEditor.NetworkDetailStats.ResetAll(); + } + + internal static void NewProfilerTick() + { + UnityEditor.NetworkDetailStats.NewProfilerTick(Time.time); + } + } +#endif +} +#pragma warning disable 618 \ No newline at end of file diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/UNetwork.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/UNetwork.cs.meta new file mode 100644 index 00000000..2103ec56 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/UNetwork.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 89479bd9a5a71455db69cf9e6f0da312 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/com.unity.multiplayer-hlapi.Runtime.asmdef b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/com.unity.multiplayer-hlapi.Runtime.asmdef new file mode 100644 index 00000000..3fb3227a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/com.unity.multiplayer-hlapi.Runtime.asmdef @@ -0,0 +1,6 @@ +{ + "name": "com.unity.multiplayer-hlapi.Runtime", + "references": [], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/com.unity.multiplayer-hlapi.Runtime.asmdef.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/com.unity.multiplayer-hlapi.Runtime.asmdef.meta new file mode 100644 index 00000000..2e8996da --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/com.unity.multiplayer-hlapi.Runtime.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a44f47cf3ada4435dbc516bad0bc86fe +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests.meta new file mode 100644 index 00000000..9fd3b8f4 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b476ff2c24dae43829023f3bb4fdf922 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor.meta new file mode 100644 index 00000000..f776d023 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b89430a3510a54c598227273753516e5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetBufferTest.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetBufferTest.cs new file mode 100644 index 00000000..c74a75b7 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetBufferTest.cs @@ -0,0 +1,250 @@ +using System; +using System.Linq; +using NUnit.Framework; +using UnityEngine.Networking; + +[TestFixture] +public class NetBufferTest +{ + const int bufferLength = 10; + + private byte[] bytes; + private byte[] tempArray; + private NetBuffer buffer; + + [SetUp] + public void Setup() + { + tempArray = new byte[bufferLength]; + + bytes = Enumerable.Range(1, bufferLength).Select(i => (byte)i).ToArray(); + buffer = new NetBuffer(bytes); + } + + [Test] + public void BufferCreated_InitialParametersAreSet() + { + Assert.AreEqual(64, new NetBuffer().Length, "NetBuffer initial size is not 64 bytes after buffer was created"); + Assert.AreEqual(0, new NetBuffer().Position, "NetBuffer initial position is not 0 after buffer was created"); + } + + [Test] + public void BufferCreatedFromArrayOfBytesHasTheSameLengthAsOriginalArray() + { + Assert.AreEqual(0, buffer.Position, "NetBuffer initial position does not equal to 0 after buffer was created"); + Assert.AreEqual(buffer.Length, bufferLength, + "NetBuffer's size doesn't equal to the size of byte array it was created from"); + } + + [Test] + public void BufferReferencesTheArrayAndDoesNotCopyItsValues() + { + bytes[0] = 9; + + Assert.AreEqual(bytes[0], buffer.ReadByte(), + "ReadByte function didn't change the value when the value is changed in referenced array"); + } + + [Test] + public void CanReadOneByte() + { + Assert.AreEqual(bytes[0], buffer.ReadByte(), "ReadByte function read the first byte incorrectly"); + Assert.AreEqual(1, buffer.Position, "ReadByte function didn't changed buffer's position after byte was read"); + } + + [Test] + public void AttemptToReadByteOutOfBufferBounds_OutOfRangeExceptionRaises() + { + var testBuffer = new NetBuffer(new byte[1]); + testBuffer.ReadByte(); + + Assert.That(() => testBuffer.ReadByte(), + Throws.Exception.TypeOf() + .With.Message.EqualTo("NetworkReader:ReadByte out of range:NetBuf sz:1 pos:1")); + } + + [Test] + public void BunchOfBytesCanBeReadAtOnce() + { + buffer.ReadBytes(tempArray, bufferLength); + + for (var i = 0; i < bufferLength; i++) + { + Assert.AreEqual(bytes[i], tempArray[i], "ReadBytes function read a bunch of bytes at once and value of '" + i + "' byte is incorrect"); + } + + Assert.AreEqual(bufferLength, buffer.Position, "ReadBytes function changed position incorrectly after read a bunch of bytes"); + } + + [Test] + public void AttemptToReadABunchOfBytesOutOfBufferBounds_OutOfRangeExceptionRaises() + { + var testBuffer = new NetBuffer(new byte[1]); + + Assert.That(() => testBuffer.ReadBytes(new byte[2], 2), + Throws.Exception.TypeOf() + .With.Message.EqualTo("NetworkReader:ReadBytes out of range: (2) NetBuf sz:1 pos:0")); + } + + [Test] + public void CanWriteByte() + { + buffer.WriteByte(byte.MaxValue); + + Assert.AreEqual(byte.MaxValue, bytes[0], "WriteByte function cannot write byte to the provided array"); + Assert.AreEqual(1, buffer.Position, "WriteByte function didn't shift the NetBuffer's position"); + } + + [Test] + public void CanWriteTwoBytes() + { + buffer.WriteByte2(255, 127); + + Assert.AreEqual(255, bytes[0], "WriteByte2 function wrote incorrect first byte to the provided array"); + Assert.AreEqual(127, bytes[1], "WriteByte2 function wrote incorrect second byte to the provided array"); + + Assert.AreEqual(2, buffer.Position, "WriteByte2 function didn't shift the NetBuffer's position"); + } + + [Test] + public void CanWriteFourBytes() + { + buffer.WriteByte4(10, 11, 12, 13); + + Assert.AreEqual(10, bytes[0], "WriteByte4 function wrote incorrect first byte to the provided array"); + Assert.AreEqual(11, bytes[1], "WriteByte4 function wrote incorrect second byte to the provided array"); + Assert.AreEqual(12, bytes[2], "WriteByte4 function wrote incorrect third byte to the provided array"); + Assert.AreEqual(13, bytes[3], "WriteByte4 function wrote incorrect fourth byte to the provided array"); + + Assert.AreEqual(4, buffer.Position, "WriteByte4 function didn't shift the NetBuffer's position"); + } + + [Test] + public void CanWriteEightBytes() + { + buffer.WriteByte8(100, 110, 120, 130, 140, 150, 160, 170); + + Assert.AreEqual(100, bytes[0], "WriteByte8 function wrote incorrect first byte to the provided array"); + Assert.AreEqual(110, bytes[1], "WriteByte8 function wrote incorrect second byte to the provided array"); + Assert.AreEqual(120, bytes[2], "WriteByte8 function wrote incorrect third byte to the provided array"); + Assert.AreEqual(130, bytes[3], "WriteByte8 function wrote incorrect fourth byte to the provided array"); + Assert.AreEqual(140, bytes[4], "WriteByte8 function wrote incorrect fifth byte to the provided array"); + Assert.AreEqual(150, bytes[5], "WriteByte8 function wrote incorrect sixth byte to the provided array"); + Assert.AreEqual(160, bytes[6], "WriteByte8 function wrote incorrect seventh byte to the provided array"); + Assert.AreEqual(170, bytes[7], "WriteByte8 function wrote incorrect eighth byte to the provided array"); + + Assert.AreEqual(8, buffer.Position, "WriteByte8 function didn't shift the NetBuffer's position"); + } + + [TestCase(4, 14)] + public void BufferSizeGrowsSeveralTimesUntilNewSizeCanHandleAllValuesToWrite(int length, int expectedLength) + { + var testBuffer = new NetBuffer(new byte[length]); + testBuffer.WriteBytes(new byte[10], 10); + + Assert.AreEqual(expectedLength, testBuffer.Length, "New buffer length cannot handle all values"); + } + + [TestCase(bufferLength - 1, (ushort)(bufferLength - 1 - 5))] // array.Length < buffer.Length && bytes to write < array.Length + [TestCase(bufferLength - 1, (ushort)(bufferLength - 1))] // array.Length < buffer.Length && bytes to write == array.Length + [TestCase(bufferLength, (ushort)(bufferLength - 5))] // array.Length == buffer.Length && bytes to write < array.Length + [TestCase(bufferLength, (ushort)(bufferLength))] // array.Length == buffer.Length && bytes to write == array.Length + [TestCase(bufferLength + 1, (ushort)(bufferLength + 1 - 5))] // array.Length > buffer.Length && bytes to write < array.Length + [TestCase(bufferLength + 1, (ushort)(bufferLength + 1))] // array.Length > buffer.Length && bytes to write == array.Length + public void CanWriteABunchOfBytesAtOnce(int arraySize, ushort amountToWrite) + { + var sourceArray = Enumerable.Range(10, arraySize).Select(i => (byte)i).ToArray(); + + buffer.WriteBytes(sourceArray, amountToWrite); + + Assert.AreEqual(amountToWrite, buffer.Position, "WriteBytes function changed position incorrectly after read a bunch of bytes"); + + buffer.SeekZero(); + for (var i = 0; i < amountToWrite; i++) + { + Assert.AreEqual(sourceArray[i], buffer.ReadByte(), "WriteBytes function wrote a bunch of bytes at once and value of '" + i + "' byte is incorrect"); + } + } + + [TestCase((ushort) 5, (ushort) 4)] // offset < buffer size && offset + count < buffer size + [TestCase((ushort) 10, (ushort) 10)] // offset == buffer size && offset + count > buffer size + [TestCase((ushort) 20, (ushort) 20)] // offset > buffer size + [TestCase((ushort) 5, (ushort) 15)] // offset < buffer size && count > buffer size + [TestCase((ushort) 10, (ushort) 10)] // offset == buffer size && offset + count > buffer size + [TestCase((ushort) 20, (ushort) 20)] // offset > buffer size + public void CanWriteAtOffset(ushort offset, ushort count) + { + var sourceArray = Enumerable.Range(100, count).Select(i => (byte)i).ToArray(); + buffer.WriteBytesAtOffset(sourceArray, offset, count); + + Assert.AreEqual(offset + count, buffer.Position, "WriteAtOffset didn't shift buffer's position"); + + buffer.SeekZero(); + buffer.ReadBytes(new byte[offset], offset); + + for (var i = 0; i < count; i++) + { + Assert.AreEqual(sourceArray[i], buffer.ReadByte(), + "WriteAtOffset function wrote a bunch of bytes at offset '" + offset + "' " + "and value of '" + i + "' byte is incorrect"); + } + } + + [Test] + public void NewMemoryIsAllocated_ReferenceToOldArrayIsLost() + { + var sourceArray = Enumerable.Range(100, 10).Select(i => (byte)i).ToArray(); + buffer.WriteBytesAtOffset(sourceArray, (ushort)buffer.Length, 10); //size increased and new memory is allocated + buffer.SeekZero(); + + bytes[0] = 9; + + Assert.AreNotEqual(9, buffer.ReadByte(), "Link to previous referenced array is not lost and changes in referenced array affected internal buffer"); + } + + [Test] + public void SeekZeroMovesPositionToZero() + { + buffer.WriteByte(127); + buffer.SeekZero(); + Assert.AreEqual(0, buffer.Position, "SeekZero function didn't move position to zero"); + } + + [Test] + public void ReplaceFunctionReplacesInternalBufferWithProvidedOne() + { + var testBuffer = new NetBuffer(); + testBuffer.ReadByte(); + testBuffer.Replace(new byte[] {255}); + + Assert.AreEqual(0, testBuffer.Position, "Replace operation didn't move the postion of buffer to zero"); + Assert.AreEqual(1, testBuffer.Length, "New buffer length is not corresponding to the replaced array length"); + Assert.AreEqual(255, testBuffer.ReadByte(), "NetBuffer read incorrect value after replace operation"); + } + + [TestCase(100, 150)] + [TestCase(3, 5)] + [TestCase(1, 2)] + public void BufferSizeGrows_NewBufferLengthRoundedUp(int length, int expectedLength) + { + var testBuffer = new NetBuffer(new byte[length]); + + for (var i = 0; i < length; i++) + { + testBuffer.WriteByte(byte.MaxValue); + } + + Assert.AreEqual(expectedLength, testBuffer.Length, "New NetBuffer's length has unexpected value"); + } + + [Test] + public void WriteBytesCopiesBytesIntoBufferFromCurrentPosition() + { + var sourceArray = Enumerable.Range(100, bufferLength).Select(i => (byte)i).ToArray(); + buffer.ReadBytes(new byte[2], 2); // shift position to 2 + buffer.WriteBytes(sourceArray, bufferLength); //count == buffer.Length + buffer.SeekZero(); + + Assert.AreEqual(bytes[0], buffer.ReadByte(), "WriteBytes touched the values outside buffer position. First byte is wrong"); + Assert.AreEqual(bytes[1], buffer.ReadByte(), "WriteBytes touched the values outside buffer position. Second byte is wrong"); + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetBufferTest.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetBufferTest.cs.meta new file mode 100644 index 00000000..b6d8e765 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetBufferTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 51f3dc9a524344a078719eaf928e17f3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkClientTest.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkClientTest.cs new file mode 100644 index 00000000..8f3f48df --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkClientTest.cs @@ -0,0 +1,38 @@ +using NUnit.Framework; +using UnityEngine; +using UnityEngine.Networking; +using UnityEngine.Networking.NetworkSystem; + +#pragma warning disable 618 +[TestFixture] +public class NetworkClientTest +{ + private NetworkClient m_Client; + private static string s_LatestLogMessage; + + static void HandleLog(string logString, string stackTrace, LogType type) + { + s_LatestLogMessage = type + ": " + logString + "\n" + stackTrace; + } + + [SetUp] + public void Setup() + { + Application.logMessageReceived += HandleLog; + } + + [TearDown] + public void Teardown() + { + Application.logMessageReceived -= HandleLog; + } + + [Test] + public void DisconnectWithoutConnectedConnection() + { + m_Client = new NetworkClient(new NetworkConnection()); + m_Client.Disconnect(); + Assert.AreEqual(null, s_LatestLogMessage); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkClientTest.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkClientTest.cs.meta new file mode 100644 index 00000000..a24751e6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkClientTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 31b18d58007da48b295461412e608215 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkReaderWriter_BasicTypesTest.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkReaderWriter_BasicTypesTest.cs new file mode 100644 index 00000000..16e61c7d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkReaderWriter_BasicTypesTest.cs @@ -0,0 +1,233 @@ +using NUnit.Framework; +using UnityEngine.Networking; + +#pragma warning disable 618 +[TestFixture] +public class NetworkReaderWriter_BasicTypesTest +{ + private NetworkWriter writer; + + [SetUp] + public void Setup() + { + writer = new NetworkWriter(); + } + + // ulong and uint cases have been taken from http://sqlite.org/src4/doc/trunk/www/varint.wiki + private static uint[] UInt32Cases = + { + uint.MinValue, 240, 241, 2287, 2288, 67823, 67824, 16777215, 16777216, 4294967295, uint.MaxValue + }; + private static ulong[] UInt64Cases = + { + ulong.MinValue, 240, 241, 2287, 2288, 67823, 67824, 16777215, 16777216, 4294967295, + 1099511627775, 1099511627776, 281474976710655, 281474976710656, + 72057594037927935, 72057594037927936, ulong.MaxValue + }; + + [Test, TestCaseSource("UInt32Cases")] + public void WriteAndReadPackedUInt32(uint testValue) + { + writer.WritePackedUInt32(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadPackedUInt32(), "Writer and Reader have different values for packed 'uint' type"); + } + + [Test, TestCaseSource("UInt64Cases")] + public void WriteAndReadPackedUInt64(ulong testValue) + { + writer.WritePackedUInt64(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadPackedUInt64(), "Writer and Reader have different values for packed 'ulong' type"); + } + + [Test, TestCaseSource("UInt32Cases")] + public void WriteAndReadUInt32(uint testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadUInt32(), "Writer and Reader have different values for 'uint' type"); + } + + [Test, TestCaseSource("UInt64Cases")] + public void WriteAndReadUInt64(ulong testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadUInt64(), "Writer and Reader have different values for 'ulong' type"); + } + + private static char[] CharCases = { char.MinValue, '\n', '\uFFF0', char.MaxValue }; + + [Ignore("848212")] + [Test, TestCaseSource("CharCases")] + public void WriteAndReadChar(char testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadChar(), "Writer and Reader have different values for 'char' type"); + } + + private static byte[] ByteCases = { byte.MinValue, 127, byte.MaxValue }; + + [Test, TestCaseSource("ByteCases")] + public void WriteAndReadByte(byte testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadByte(), "Writer and Reader have different values for 'byte' type"); + } + + private static sbyte[] SByteCases = { sbyte.MinValue, 0, -0, +0, sbyte.MaxValue }; + + [Test, TestCaseSource("SByteCases")] + public void WriteAndReadSByte(sbyte testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadSByte(), "Writer and Reader have different values for 'sbyte' type"); + } + + private static short[] ShortCases = + { + short.MinValue, -127, 0, 128, 255, short.MaxValue + }; + + [Test, TestCaseSource("ShortCases")] + public void WriteAndReadShort(short testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadInt16(), "Writer and Reader have different values for 'short' type"); + } + + private static ushort[] UshortCases = + { + ushort.MinValue, 128, 255, 32767, ushort.MaxValue + }; + + [Test, TestCaseSource("UshortCases")] + public void WriteAndReadUShort(ushort testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadUInt16(), "Writer and Reader have different values for 'ushort' type"); + } + + private static int[] IntCases = + { + int.MinValue, -32768, -128, 0, 127, 255, 32767, int.MaxValue + }; + + [Test, TestCaseSource("IntCases")] + public void WriteAndReadInt(int testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadInt32(), "Writer and Reader have different values for 'int' type"); + } + + private static long[] LongCases = + { + long.MinValue, -2147483648, -65536, -32768, -128, 0, 127, 255, 32767, 65535, 2147483647, long.MaxValue + }; + + [Test, TestCaseSource("LongCases")] + public void WriteAndReadLong(long testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadInt64(), "Writer and Reader have different values for 'long' type"); + } + + private static float[] FloatCases = + { + float.MinValue, float.NaN, float.Epsilon, float.NegativeInfinity, float.PositiveInfinity, float.MaxValue + }; + + [Test, TestCaseSource("FloatCases")] + public void WriteAndReadFloat(float testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadSingle(), "Writer and Reader have different values for 'float' type"); + } + + private static double[] DoubleCases = + { + double.MinValue, double.Epsilon, double.NaN, double.NegativeInfinity , double.PositiveInfinity, double.MaxValue, + float.MinValue, float.NaN, float.Epsilon, float.NegativeInfinity, float.PositiveInfinity, float.MaxValue + }; + + [Test, TestCaseSource("DoubleCases")] + public void WriteAndReadDouble(double testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadDouble(), "Writer and Reader have different values for 'double' type"); + } + + private static decimal[] DecimalCases = + { + decimal.MinValue, decimal.MinusOne, decimal.One, decimal.Zero, decimal.MaxValue + }; + + [Test, TestCaseSource("DecimalCases")] + public void WriteAndReadDecimal(decimal testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadDecimal(), "Writer and Reader have different values for 'decimal' type"); + } + + private static bool[] BoolCases = + { + true, false + }; + + [Test, TestCaseSource("BoolCases")] + public void WriteAndReadBool(bool testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadBoolean(), "Writer and Reader have different values for 'bool' type"); + } + + // Cases have been taken from http://www.cl.cam.ac.uk/~mgk25/ucs/examples/quickbrown.txt + private static string[] StringCases = + { + bool.TrueString, bool.FalseString, string.Empty, + "Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Wolther spillede på xylofon.", + "Falsches Üben von Xylophonmusik quält jeden größeren Zwerg", + "Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο", + "The quick brown fox jumps over the lazy dog", + "El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.", + "Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en canoë au delà des îles, près du mälström où brûlent les novæ.", + "D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh", + "Árvíztűrő tükörfúrógép", + "Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa. Sævör grét áðan því úlpan var ónýt", + "いろはにほへとちりぬるを", "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム", + "דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה", + "Pchnąć w tę łódź jeża lub ośm skrzyń fig", + "В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!", + "๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า", " Pijamalı hasta, yağız şoföre çabucak güvendi." + }; + + [Test, TestCaseSource("StringCases")] + public void WriteAndReadString(string testValue) + { + writer.Write(testValue); + var reader = new NetworkReader(writer); + Assert.AreEqual(testValue, reader.ReadString(), "Writer and Reader have different values for 'string' type"); + } + + [Test] + public void WriteNullString_ReadEmptyString() + { + string testString = null; + writer.Write(testString); + var reader = new NetworkReader(writer); + Assert.AreEqual(string.Empty, reader.ReadString(), "Writer and Reader have different values for 'string' type"); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkReaderWriter_BasicTypesTest.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkReaderWriter_BasicTypesTest.cs.meta new file mode 100644 index 00000000..77cb45fe --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/NetworkReaderWriter_BasicTypesTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a080635db73e94c08aa0b20b0a03f2cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests.meta new file mode 100644 index 00000000..773c2ee5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e212b6a31a4c545e5bd481c53c3180b1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILGenerationTests.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILGenerationTests.cs new file mode 100644 index 00000000..84fa3246 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILGenerationTests.cs @@ -0,0 +1,86 @@ +using Mono.Cecil; +using Mono.Cecil.Cil; +using NUnit.Framework; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[TestFixture] +public class WeaverILGenerationTests +{ + [Test] + public void TargetRPCServerClientChecks() + { + WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_TargetRPCServerClientChecks), "CallTargetRpcTest", false, 1, 1, + new MockInstruction(OpCodes.Isinst, "UnityEngine.Networking.ULocalConnectionToServer"), + new MockInstruction(OpCodes.Brfalse), + new MockInstruction(OpCodes.Ldstr), + new MockInstruction(OpCodes.Call, "System.Void UnityEngine.Debug::LogError(System.Object)"), + new MockInstruction(OpCodes.Ret) + ); + + WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_TargetRPCServerClientChecks), "CallTargetRpcTest", false, 1, 1, + new MockInstruction(OpCodes.Call, "System.Boolean UnityEngine.Networking.NetworkServer::get_active()"), + new MockInstruction(OpCodes.Brtrue), + new MockInstruction(OpCodes.Ldstr), + new MockInstruction(OpCodes.Call, "System.Void UnityEngine.Debug::LogError(System.Object)"), + new MockInstruction(OpCodes.Ret) + ); + } + + [Test] + public void RpcPassingEnumArrays() + { + WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_TargetRPCServerClientChecks), "CallRpcWithEnumArray", false, 1, 1, + new MockInstruction(OpCodes.Call, "System.Void Unity.GeneratedNetworkCode::_WriteArrayAttributeTargets_None(UnityEngine.Networking.NetworkWriter,System.AttributeTargets[])") + ); + } + + [Test] + public void SyncListsAreAutoInitializedInConstructor() + { + WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_SyncLists), ".ctor", false, 0, 1, + new MockInstruction(OpCodes.Ldarg_0), + new MockInstruction(OpCodes.Newobj, "System.Void UnityEngine.Networking.SyncListInt::.ctor()"), + new MockInstruction(OpCodes.Stfld, "UnityEngine.Networking.SyncListInt WeaverILGenerationTests_SyncLists::Inited") + ); + + /*WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_SyncLists), ".ctor", false, 0, 1, + new MockInstruction(OpCodes.Ldarg_0), + new MockInstruction(OpCodes.Newobj, "System.Void UnityEngine.Networking.SyncListInt::.ctor()"), + new MockInstruction(OpCodes.Stfld, "UnityEngine.Networking.SyncListInt WeaverILGenerationTests_SyncLists::NotInited") + );*/ + } + + [Test] + public void SyncListsAreOnlySerializedOnce() + { + WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_SyncLists), "OnSerialize", true, 2, 2, + new MockInstruction(OpCodes.Ldfld, "UnityEngine.Networking.SyncListInt WeaverILGenerationTests_SyncLists::Inited"), + new MockInstruction(OpCodes.Call, "System.Void UnityEngine.Networking.SyncListInt::WriteInstance(UnityEngine.Networking.NetworkWriter,UnityEngine.Networking.SyncListInt)") + ); + + /*WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_SyncLists), "OnSerialize", true, 2, 2, + new MockInstruction(OpCodes.Ldfld, "UnityEngine.Networking.SyncListInt WeaverILGenerationTests_SyncLists::NotInited"), + new MockInstruction(OpCodes.Call, "System.Void UnityEngine.Networking.SyncListInt::WriteInstance(UnityEngine.Networking.NetworkWriter,UnityEngine.Networking.SyncListInt)") + );*/ + } + + [Test] + public void SyncListsNetworkBehaviourWithSyncListCallsBaseClassAwakeMethod() + { + WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_SyncLists), "Awake", false, 0, 1, + new MockInstruction(OpCodes.Ldarg_0), + new MockInstruction(OpCodes.Call, "System.Void WeaverILGenerationTests_SyncLists_Base::Awake()") + ); + } + + [Test] + public void SyncNetworkBehaviourBaseClassPreStartClientMethodFromSubclass() + { + WeaverILMatcher.MatchMethodIL(typeof(WeaverILGenerationTests_SyncLists), "PreStartClient", false, 0, 1, + new MockInstruction(OpCodes.Ldarg_0), + new MockInstruction(OpCodes.Call, "System.Void WeaverILGenerationTests_SyncLists_Base::PreStartClient()") + ); + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILGenerationTests.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILGenerationTests.cs.meta new file mode 100644 index 00000000..d3db041c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILGenerationTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8a8dc6d575c3d434e9d5a322631ba8ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILMatcher.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILMatcher.cs new file mode 100644 index 00000000..d209a329 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILMatcher.cs @@ -0,0 +1,164 @@ +using Mono.Cecil; +using System; +using System.Linq; +using System.Collections.Generic; +using NUnit.Framework; +using Mono.Cecil.Cil; +using UnityEngine; + +public struct MockInstruction +{ + public OpCode OpCode; + public object Operand; + + public MockInstruction(OpCode opCode) : this(opCode, null) + { + } + + public MockInstruction(OpCode opCode, object operand) + { + OpCode = opCode; + Operand = operand; + } + + public override string ToString() + { + if (Operand == null) + { + return OpCode.ToString(); + } + + if (Operand is String && OpCode == OpCodes.Ldstr) + { + return OpCode.ToString() + "\t\"" + Operand + " \""; + } + + return OpCode.ToString() + "\t" + Operand; + } +} + +public static class WeaverILMatcher +{ + static Dictionary AssemblyDefinitions; + static AssemblyDefinition AssemblyCSharp; + static AssemblyDefinition AssemblyCSharpEditortestable; + + static TypeDefinition GetTypeDef(Type type) + { + if (AssemblyDefinitions == null) + { + AssemblyDefinitions = new Dictionary(); + } + + AssemblyDefinition asmDef; + + if (AssemblyDefinitions.TryGetValue(type.Assembly.Location, out asmDef) == false) + { + // read up assembly + asmDef = AssemblyDefinition.ReadAssembly(type.Assembly.Location); + + // add to lookup so we don't need to read it every time + AssemblyDefinitions.Add(type.Assembly.Location, asmDef); + } + + var typeDef = asmDef.MainModule.Types.FirstOrDefault(x => x.FullName == type.FullName); + + Assert.NotNull(typeDef, "Could not find TypeDefinition for {0}", type); + + return typeDef; + } + + public static void MatchMethodIL(Type type, string method, int parameterCount, params MockInstruction[] match) + { + MatchMethodIL(type, method, false, parameterCount, 1, match); + } + + public static void MatchMethodIL(Type type, string method, bool hasReturnValue, int parameterCount, int matchCount, params MockInstruction[] match) + { + var typeDef = GetTypeDef(type); + var methodDef = typeDef.Methods.FirstOrDefault(x => x.Name == method && (x.ReturnType.Name != "Void") == hasReturnValue && x.Parameters.Count == parameterCount); + + Assert.NotNull(methodDef, "Could not find method {0} on type {1}", method, type); + + var matches = 0; + var instructions = methodDef.Body.Instructions.ToArray(); + + for (int i = 0; i < instructions.Length; ++i) + { + if (instructions[i].OpCode == match[0].OpCode) + { + if (MatchInstructions(instructions, i, match)) + { + // -1: means at least once, and don't check specific count + if (matchCount == -1) + { + return; + } + + ++matches; + } + } + } + + if (matches != matchCount) + { + Assert.Fail("Method {0} on type {1} did not match IL pattern exactly {3} times:\r\n{2}", method, type, string.Join("\r\n", match.Select(x => x.ToString()).ToArray()), matchCount); + } + } + + static bool MatchInstructions(Instruction[] instructions, int i, MockInstruction[] match) + { + for (int m = 0; m < match.Length; ++m) + { + // il out of bounds + if (m + i >= instructions.Length) + { + return false; + } + + var i_in = instructions[m + i]; + var m_in = match[m]; + + // miss-matching opcode + if (i_in.OpCode != m_in.OpCode) + { + return false; + } + + // special case when we pass a null-operand match value we only require the opcode to match + if (m_in.Operand == null) + { + continue; + } + + // miss-matching operand, expected an operand value but got none + if (i_in.Operand == null && m_in.Operand != null) + { + return false; + } + + // special case for "call/callvirt/newobj" verification where we match against a string instead of the actual MemberReference object + if ((m_in.OpCode == OpCodes.Call || m_in.OpCode == OpCodes.Callvirt || m_in.OpCode == OpCodes.Newobj || m_in.OpCode == OpCodes.Isinst || m_in.OpCode == OpCodes.Stfld || m_in.OpCode == OpCodes.Ldfld) && m_in.Operand is string) + { + if (i_in.Operand.ToString() != (string)m_in.Operand) + { + return false; + } + } + + // miss-matching operand type + if (i_in.Operand.GetType() != m_in.Operand.GetType()) + { + continue; + } + + // miss-matching operand value + if (i_in.Operand.Equals(m_in.Operand) == false) + { + return false; + } + } + + return true; + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILMatcher.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILMatcher.cs.meta new file mode 100644 index 00000000..8cc7409c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/WeaverILGenerationTests/WeaverILMatcher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b66a9be4efa54a7b88e1215b6676623 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/com.unity.multiplayer-hlapi.EditorTests.asmdef b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/com.unity.multiplayer-hlapi.EditorTests.asmdef new file mode 100644 index 00000000..59def3f0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/com.unity.multiplayer-hlapi.EditorTests.asmdef @@ -0,0 +1,19 @@ +{ + "name": "com.unity.multiplayer-hlapi.EditorTests", + "references": [ + "com.unity.multiplayer-hlapi.Editor", + "com.unity.multiplayer-hlapi.Runtime", + "com.unity.multiplayer-hlapi.Tests" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "overrideReferences": true, + "precompiledReferences": [ + "Mono.Cecil.dll" + ] +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/com.unity.multiplayer-hlapi.EditorTests.asmdef.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/com.unity.multiplayer-hlapi.EditorTests.asmdef.meta new file mode 100644 index 00000000..9f3897ad --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Editor/com.unity.multiplayer-hlapi.EditorTests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7a3929c70b3b0446fb56bba195f36f7f +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime.meta new file mode 100644 index 00000000..cba25895 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 688de35b7658b4ff3b240b6057d96c93 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect.meta new file mode 100644 index 00000000..6b041c74 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cbca57a14a31a9e45b8777c9e333bb27 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/AuthorityOnSpawnedObjectsIsCorrect.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/AuthorityOnSpawnedObjectsIsCorrect.cs new file mode 100644 index 00000000..e02bb634 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/AuthorityOnSpawnedObjectsIsCorrect.cs @@ -0,0 +1,40 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class AuthorityOnSpawnedObjectsIsCorrect +{ + public static bool isTestDone = false; + + [UnityTest] + public IEnumerator AuthorityOnSpawnedObjectsIsCorrectTest() + { + NetworkServer.Reset(); + NetworkClient.ShutdownAll(); + + GameObject nmObject = new GameObject(); + NetworkManager nmanager = nmObject.AddComponent(); + nmanager.playerPrefab = Resources.Load("PlayerWithAuthPrefab", typeof(GameObject)) as GameObject; + nmanager.spawnPrefabs.Add(Resources.Load("NoAuthObjPrefab", typeof(GameObject)) as GameObject); + nmanager.spawnPrefabs.Add(Resources.Load("AuthObjPrefab", typeof(GameObject)) as GameObject); + + Assert.IsNotNull(nmanager.playerPrefab, "Player prefab field is not set on NetworkManager"); + nmanager.StartHost(); + yield return null; + + Assert.IsTrue(NetworkServer.active, "Server is not active after StartHost"); + Assert.IsTrue(NetworkClient.active, "Client is not active after StartHost"); + + while (!isTestDone) + { + yield return null; + } + + nmanager.StopHost(); + Object.Destroy(nmObject); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/AuthorityOnSpawnedObjectsIsCorrect.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/AuthorityOnSpawnedObjectsIsCorrect.cs.meta new file mode 100644 index 00000000..403ea4d1 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/AuthorityOnSpawnedObjectsIsCorrect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7667f600dcd28f240af7d75bbdac1e65 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources.meta new file mode 100644 index 00000000..443b70b9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9defd058395097e4298d3faa4b5d59db +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthObjPrefab.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthObjPrefab.prefab new file mode 100644 index 00000000..87fb62c7 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthObjPrefab.prefab @@ -0,0 +1,144 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1714307093068652} + m_IsPrefabParent: 1 +--- !u!1 &1714307093068652 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4623073533655558} + - component: {fileID: 33667536636950200} + - component: {fileID: 23523400470116162} + - component: {fileID: 136575574917815900} + - component: {fileID: 114138697493695896} + - component: {fileID: 114274152422866264} + m_Layer: 0 + m_Name: AuthObjPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4623073533655558 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1714307093068652} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23523400470116162 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1714307093068652} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33667536636950200 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1714307093068652} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114138697493695896 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1714307093068652} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 251 + i1: 23 + i2: 188 + i3: 120 + i4: 171 + i5: 232 + i6: 172 + i7: 84 + i8: 203 + i9: 91 + i10: 249 + i11: 85 + i12: 216 + i13: 30 + i14: 114 + i15: 71 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 1 +--- !u!114 &114274152422866264 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1714307093068652} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a63ea60b3539fc4a8a5aabd04005e05, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!136 &136575574917815900 +CapsuleCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1714307093068652} + 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} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthObjPrefab.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthObjPrefab.prefab.meta new file mode 100644 index 00000000..91173d8d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthObjPrefab.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fb17bc78abe8ac54cb5bf955d81e7247 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthSpawnableObject.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthSpawnableObject.cs new file mode 100644 index 00000000..086c515c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthSpawnableObject.cs @@ -0,0 +1,18 @@ +using NUnit.Framework; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class AuthSpawnableObject : NetworkBehaviour +{ + // this object is spawned with client Authority + public override void OnStartAuthority() + { + Assert.IsTrue(hasAuthority); + } + + public override void OnStopAuthority() + { + Assert.Fail("OnStopAuthority on AuthSpawnableObject should not be called"); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthSpawnableObject.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthSpawnableObject.cs.meta new file mode 100644 index 00000000..3164251c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/AuthSpawnableObject.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7a63ea60b3539fc4a8a5aabd04005e05 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthObjPrefab.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthObjPrefab.prefab new file mode 100644 index 00000000..e4390550 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthObjPrefab.prefab @@ -0,0 +1,143 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1458795156556284} + m_IsPrefabParent: 1 +--- !u!1 &1458795156556284 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4966032680941340} + - component: {fileID: 33729123460419368} + - component: {fileID: 23087036340302866} + - component: {fileID: 135227808896565270} + - component: {fileID: 114873357703664714} + - component: {fileID: 114579196398650772} + m_Layer: 0 + m_Name: NoAuthObjPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4966032680941340 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1458795156556284} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23087036340302866 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1458795156556284} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33729123460419368 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1458795156556284} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114579196398650772 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1458795156556284} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a8305c0bafcd2604fb3d8545b4092f56, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114873357703664714 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1458795156556284} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 24 + i1: 243 + i2: 216 + i3: 106 + i4: 30 + i5: 240 + i6: 1 + i7: 36 + i8: 136 + i9: 154 + i10: 34 + i11: 217 + i12: 11 + i13: 189 + i14: 16 + i15: 150 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 1 +--- !u!135 &135227808896565270 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1458795156556284} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthObjPrefab.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthObjPrefab.prefab.meta new file mode 100644 index 00000000..7d43d6b3 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthObjPrefab.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 18f3d86a1ef00124889a22d90bbd1096 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthSpawnableObject.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthSpawnableObject.cs new file mode 100644 index 00000000..1613c19f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthSpawnableObject.cs @@ -0,0 +1,24 @@ +using NUnit.Framework; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NoAuthSpawnableObject : NetworkBehaviour +{ + // this object is spawned without client Authority, then set + public override void OnStartClient() + { + Assert.IsFalse(hasAuthority); + } + + public override void OnStartAuthority() + { + Assert.IsTrue(hasAuthority); + } + + public override void OnStopAuthority() + { + Assert.IsFalse(hasAuthority); + AuthorityOnSpawnedObjectsIsCorrect.isTestDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthSpawnableObject.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthSpawnableObject.cs.meta new file mode 100644 index 00000000..2c77525c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/NoAuthSpawnableObject.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a8305c0bafcd2604fb3d8545b4092f56 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthPrefab.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthPrefab.prefab new file mode 100644 index 00000000..13d9685f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthPrefab.prefab @@ -0,0 +1,147 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1605537484536220} + m_IsPrefabParent: 1 +--- !u!1 &1605537484536220 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4852699654151406} + - component: {fileID: 33082284501209378} + - component: {fileID: 23252609606156378} + - component: {fileID: 65920616948593688} + - component: {fileID: 114205998322145600} + - component: {fileID: 114538045202614566} + m_Layer: 0 + m_Name: PlayerWithAuthPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4852699654151406 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1605537484536220} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23252609606156378 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1605537484536220} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33082284501209378 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1605537484536220} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65920616948593688 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1605537484536220} + 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!114 &114205998322145600 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1605537484536220} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 85 + i1: 52 + i2: 183 + i3: 35 + i4: 254 + i5: 90 + i6: 182 + i7: 228 + i8: 25 + i9: 2 + i10: 97 + i11: 94 + i12: 194 + i13: 7 + i14: 60 + i15: 95 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 1 +--- !u!114 &114538045202614566 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1605537484536220} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 385cfd3170b11b64aa9cbd23d6b0489f, type: 3} + m_Name: + m_EditorClassIdentifier: + objAuthPrefab: {fileID: 1714307093068652, guid: fb17bc78abe8ac54cb5bf955d81e7247, + type: 2} + objNoAuthPrefab: {fileID: 1458795156556284, guid: 18f3d86a1ef00124889a22d90bbd1096, + type: 2} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthPrefab.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthPrefab.prefab.meta new file mode 100644 index 00000000..8f616eef --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthPrefab.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5534b723fe5ab6e41902615ec2073c5f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthority.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthority.cs new file mode 100644 index 00000000..ce7ca13b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthority.cs @@ -0,0 +1,47 @@ +using UnityEngine; +using NUnit.Framework; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class PlayerWithAuthority : NetworkBehaviour +{ + GameObject spawned; + public GameObject objAuthPrefab; + public GameObject objNoAuthPrefab; + + public override void OnStartAuthority() + { + Assert.IsTrue(hasAuthority); + } + + public override void OnStartLocalPlayer() + { + Assert.IsTrue(hasAuthority); + Assert.IsTrue(isLocalPlayer); + + CmdSpawnObj(); + } + + [Command] + void CmdSpawnObj() + { + // spawn auth object + var objAuth = (GameObject)Instantiate(objAuthPrefab, Vector3.zero, objAuthPrefab.transform.rotation); + NetworkServer.SpawnWithClientAuthority(objAuth, connectionToClient); + + // spawn no auth object + var objNoAuth = (GameObject)Instantiate(objNoAuthPrefab, Vector3.zero, objNoAuthPrefab.transform.rotation); + NetworkServer.Spawn(objNoAuth); + + objNoAuth.GetComponent().AssignClientAuthority(connectionToClient); + + spawned = objNoAuth; + Invoke("RemoveAuthority", 0.1f); + } + + void RemoveAuthority() + { + spawned.GetComponent().RemoveClientAuthority(connectionToClient); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthority.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthority.cs.meta new file mode 100644 index 00000000..1956a3d4 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/AuthorityOnSpawnedObjectsIsCorrect/Resources/PlayerWithAuthority.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 385cfd3170b11b64aa9cbd23d6b0489f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow.meta new file mode 100644 index 00000000..cbacf357 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a8a5e20d25d0c41409434f24ce0233f0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow/ChannelBufferHandlesOverflow.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow/ChannelBufferHandlesOverflow.cs new file mode 100644 index 00000000..162997ed --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow/ChannelBufferHandlesOverflow.cs @@ -0,0 +1,88 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class ChannelBufferHandlesOverflow +{ + int kListenPort = 7073; + const int kPacketSize = 1000; + const short kMsgId = 155; + const int kNumMsgs = 14000; + + NetworkClient myClient; + + bool isTestDone; + + [UnityTest] + public IEnumerator ChannelBufferHandlesOverflowTest() + { + NetworkServer.Reset(); + NetworkClient.ShutdownAll(); + + ConnectionConfig config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + + myClient = new NetworkClient(); + if (!myClient.Configure(config, 10)) + { + Assert.Fail("Client configure failed"); + } + + NetworkServer.RegisterHandler(kMsgId, OnServerMsg); + myClient.RegisterHandler(MsgType.Connect, OnClientConnected); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + myClient.Connect("127.0.0.1", kListenPort); + + while (!isTestDone) + { + yield return null; + } + //Debug.Log("Shutting down"); + //NetworkServer.DisconnectAll(); + //NetworkClient.ShutdownAll(); + //NetworkTransport.Shutdown(); + + yield return null; + } + + public void OnServerMsg(NetworkMessage netMsg) + { + //need this method simply to prevent "Unknown ID" error message + } + + public void OnClientConnected(NetworkMessage netMsg) + { + NetworkWriter writer = new NetworkWriter(); + writer.StartMessage(kMsgId); + byte[] data = new byte[kPacketSize]; + writer.Write(data, kPacketSize); + writer.FinishMessage(); + LogAssert.Expect(LogType.Error, "ChannelBuffer buffer limit of 16 packets reached."); + + // these messages do not all fit in the transport layer send queue. + // to be recieved on the server, they must be buffered by HLAPI + bool gotFailure = false; + for (int i = 0; i < kNumMsgs; i++) + { + if (!myClient.SendWriter(writer, Channels.DefaultReliable)) + { + gotFailure = true; + break; + } + } + + Assert.AreEqual(true, gotFailure); + isTestDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow/ChannelBufferHandlesOverflow.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow/ChannelBufferHandlesOverflow.cs.meta new file mode 100644 index 00000000..f7c2bc24 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ChannelBufferHandlesOverflow/ChannelBufferHandlesOverflow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30db7069bd9fc2549895dd9c9ee27f48 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure.meta new file mode 100644 index 00000000..52c4748c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 366748e64c490224f9e404f26270a3f1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure/ClientCanConnectAfterFailure.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure/ClientCanConnectAfterFailure.cs new file mode 100644 index 00000000..123e1750 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure/ClientCanConnectAfterFailure.cs @@ -0,0 +1,104 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class ClientCanConnectAfterFailure +{ + int kListenPort = 7073; + NetworkClient client1; + NetworkClient client2; + bool isClientConnected = false; + bool serverRecievedConnection = false; + ConnectionConfig config; + + bool isTestDone; + + [UnityTest] + public IEnumerator ClientCanConnectAfterFailureTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + NetworkServer.RegisterHandler(MsgType.Connect, OnServerConnected); + + config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableFragmented); + if (!NetworkServer.Configure(config, 10)) + { + Assert.Fail("Server configure failed"); + } + + // Mismatched channels between client 1 and server, so connect will fail with CRCMismatch error + ConnectionConfig customConfig = new ConnectionConfig(); + customConfig.AddChannel(QosType.UnreliableFragmented); + + client1 = new NetworkClient(); + if (!client1.Configure(customConfig, 10)) + { + Assert.Fail("Client1 configure failed"); + } + + client1.RegisterHandler(MsgType.Connect, OnClient1Connected); + client1.RegisterHandler(MsgType.Disconnect, OnClient1Disconnected); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + LogAssert.Expect(LogType.Error, "UNet Client Disconnect Error: CRCMismatch"); + client1.Connect("127.0.0.1", kListenPort); + + while (!serverRecievedConnection || !isClientConnected) + { + yield return null; + } + + NetworkServer.DisconnectAll(); + + while (!isTestDone) + { + yield return null; + } + } + + public void OnServerConnected(NetworkMessage netMsg) + { + serverRecievedConnection = true; + } + + public void OnClient1Connected(NetworkMessage netMsg) + { + Assert.Fail("Client1 connection should not happen"); + } + + public void OnClient1Disconnected(NetworkMessage netMsg) + { + client2 = new NetworkClient(); + if (!client2.Configure(config, 10)) + { + Assert.Fail("Client2 configure failed"); + } + + client2.RegisterHandler(MsgType.Connect, OnClient2Connected); + client2.RegisterHandler(MsgType.Disconnect, OnClient2Disconnected); + client2.Connect("127.0.0.1", kListenPort); + } + + public void OnClient2Connected(NetworkMessage netMsg) + { + isClientConnected = true; + } + + public void OnClient2Disconnected(NetworkMessage netMsg) + { + Assert.IsTrue(serverRecievedConnection); + Assert.IsTrue(isClientConnected); + isTestDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure/ClientCanConnectAfterFailure.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure/ClientCanConnectAfterFailure.cs.meta new file mode 100644 index 00000000..7f6e8049 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ClientCanConnectAfterFailure/ClientCanConnectAfterFailure.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 12439e6f66cf4f04395054b5f1da8b61 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork.meta new file mode 100644 index 00000000..98b2531e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e9b71b7770b37d45a850a424fabd021 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork/CommandsAndRPCCallsWork.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork/CommandsAndRPCCallsWork.cs new file mode 100644 index 00000000..11225e9b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork/CommandsAndRPCCallsWork.cs @@ -0,0 +1,225 @@ +using System; +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; +using Object = UnityEngine.Object; + +#pragma warning disable 618 +public class CommandsAndRPCCallsWork +{ + int kListenPort = 7073; + NetworkClient myClient; + static bool isTestDone; + + static NetworkHash128 playerHash = NetworkHash128.Parse("abcd1"); + + public static GameObject OnSpawnPlayer(Vector3 pos, NetworkHash128 assetId) + { + try + { + GameObject serverPlayer = new GameObject(); + serverPlayer.name = "MyPlayer"; + serverPlayer.AddComponent(); + serverPlayer.AddComponent(); + return serverPlayer; + } + catch (Exception e) + { + Assert.Fail("Spawn exception " + e); + return null; + } + } + + public static void OnUnSpawnPlayer(GameObject unspawned) + { + Object.Destroy(unspawned); + } + + [UnityTest] + public IEnumerator CommandsAndRPCCallsWorkTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + ConnectionConfig config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced);// this test requires correct sequence of packets. + config.AddChannel(QosType.Unreliable); + + myClient = new NetworkClient(); + if (!myClient.Configure(config, 10)) + { + Assert.Fail("Client configure failed"); + } + + NetworkServer.RegisterHandler(MsgType.AddPlayer, OnAddPlayer); + myClient.RegisterHandler(MsgType.Connect, OnClientConnected); + myClient.RegisterHandler(MsgType.Error, OnClientError); + ClientScene.RegisterSpawnHandler(playerHash, OnSpawnPlayer, OnUnSpawnPlayer); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + myClient.Connect("127.0.0.1", kListenPort); + + while (!isTestDone) + { + yield return null; + } + } + + public void OnAddPlayer(NetworkMessage netMsg) + { + var msg = netMsg.ReadMessage(); + + GameObject obj = OnSpawnPlayer(Vector3.zero, playerHash); + NetworkServer.AddPlayerForConnection(netMsg.conn, obj, msg.playerControllerId, playerHash); + + CommandTestPlayerBehaviour beh = obj.GetComponent(); + Assert.IsNotNull(beh, "No component CommandTestPlayerBehaviour"); + + string args = "foo"; + beh.RpcTestOnClient(args); + + beh.TargetTestOnOne(netMsg.conn, "one"); + } + + public void OnClientConnected(NetworkMessage netMsg) + { + ClientScene.AddPlayer(netMsg.conn, 1); + } + + public void OnClientError(NetworkMessage netMsg) + { + Assert.Fail("Connect Error"); + } + + // extra NetworkBehaviour component on the player, to check for multiple NetworkBehaviour issues + public class CommandTestPlayerBehaviourExtra : NetworkBehaviour + { + [SyncVar] + int extraData; + } + + public class CommandTestPlayerBehaviour : NetworkBehaviour + { + public struct Inner + { + public string aString; + public double aDouble; + } + public struct Outer + { + public float aFloat; + public int aInt; + public Inner aInner; + } + + public static int numEvents = 0; + + public delegate void IntegerEventDelegate(int value); + + private int testInt = 77; + private float testFloat = 55.5f; + private int testValue = 100; + private int testCmdCount = 0; + private int testCmdValidate = 0; + + [SyncEvent] + public event IntegerEventDelegate EventDoInt1; + + [SyncEvent] + public event IntegerEventDelegate EventDoInt2; + + void Awake() + { + // test multiple events in this script + EventDoInt1 += OnIntegerEvent1; + EventDoInt1 += OnIntegerEvent2; + + EventDoInt2 += OnIntegerEvent2; + } + + void OnIntegerEvent1(int value) + { + Debug.Log("OnIntegerEvent1"); + Assert.AreEqual(testValue, value); + numEvents += 1; + } + + void OnIntegerEvent2(int value) + { + Debug.Log("OnIntegerEvent2"); + Assert.AreEqual(testValue, value); + numEvents += 1; + } + + private void Update() + { + // 3 = 2 events from EventDo1 + 1 event from EventDo2 + if (numEvents == 3 && isClient) + { + // this tests that all commands arrive in the correct order + CmdCount(testCmdCount++); + if (testCmdCount == 100) + { + isTestDone = true; + } + + Outer outer = new Outer(); + outer.aInt = 99; + outer.aInner = new Inner(); + outer.aInner.aDouble = 1.2; + CmdDoOuter(outer); + } + } + + [Command] + void CmdCount(int count) + { + Assert.AreEqual(count, testCmdValidate++); + } + + [Command] + void CmdDoOuter(Outer outer) + { + Assert.AreEqual(99, outer.aInt); + Assert.AreEqual(1.2, outer.aInner.aDouble, 0.001); + } + + [Command] + public void CmdTestCommandOnServer(int arg1, float arg2) + { + Assert.AreEqual(testInt, arg1); + Assert.AreEqual(testFloat, arg2); + + if (EventDoInt1 != null) + { + EventDoInt1(testValue); + } + + if (EventDoInt2 != null) + { + EventDoInt2(testValue); + } + } + + [TargetRpc] + public void TargetTestOnOne(NetworkConnection target, string arg) + { + Assert.AreEqual(arg, "one"); + } + + [ClientRpc] + public void RpcTestOnClient(string arg) + { + Assert.AreEqual(arg, "foo"); + CmdTestCommandOnServer(testInt, testFloat); + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork/CommandsAndRPCCallsWork.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork/CommandsAndRPCCallsWork.cs.meta new file mode 100644 index 00000000..013987d5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/CommandsAndRPCCallsWork/CommandsAndRPCCallsWork.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e962d4a1b7f605e40b7e3b048802e83a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks.meta new file mode 100644 index 00000000..6ab1aa71 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cae34c8fbe1149147bb8caeed9a142e7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks/ConnectLocalClientWorks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks/ConnectLocalClientWorks.cs new file mode 100644 index 00000000..44585204 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks/ConnectLocalClientWorks.cs @@ -0,0 +1,106 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class ConnectLocalClientWorks +{ + const int kMsgTest = 555; + const int kMsgTest2 = 556; + bool isTestDone; + + public class TestMessage : MessageBase + { + public int number; + public string str; + }; + + [UnityTest] + public IEnumerator ConnectLocalClientWorksTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + NetworkServer.RegisterHandler(MsgType.Connect, OnServerConnected); + NetworkServer.RegisterHandler(MsgType.AddPlayer, OnAddPlayer); + NetworkServer.RegisterHandler(kMsgTest, OnServerTestMsg); + + NetworkServer.Listen(9999); + NetworkClient client = ClientScene.ConnectLocalServer(); + + client.RegisterHandler(MsgType.Connect, OnClientConnected); + client.RegisterHandler(MsgType.Disconnect, OnClientDisconnected); + client.RegisterHandler(kMsgTest, OnClientTestMsg); + client.RegisterHandler(kMsgTest2, OnClientTestMsg2); + + while (!isTestDone) + { + yield return null; + } + } + + public void OnServerConnected(NetworkMessage netMsg) + { + Debug.Log("Server received client connection."); + } + + public void OnAddPlayer(NetworkMessage netMsg) + { + GameObject go = new GameObject(); + go.AddComponent(); + NetworkServer.AddPlayerForConnection(netMsg.conn, go, 0); + + TestMessage outMsg = new TestMessage(); + outMsg.number = 99; + outMsg.str = "addPlayer"; + NetworkServer.SendToAll(kMsgTest2, outMsg); + } + + public void OnClientConnected(NetworkMessage netMsg) + { + Debug.Log("Client connected to server."); + + TestMessage msg = new TestMessage(); + msg.number = 77; + msg.str = "testFromClient"; + + NetworkClient.allClients[0].Send(kMsgTest, msg); + } + + public void OnServerTestMsg(NetworkMessage netMsg) + { + TestMessage msg = netMsg.ReadMessage(); + Assert.AreEqual(77, msg.number); + Assert.AreEqual("testFromClient", msg.str); + + TestMessage outMsg = new TestMessage(); + outMsg.number = 99; + outMsg.str = "testFromServer"; + + NetworkServer.SendToAll(kMsgTest, outMsg); + } + + public void OnClientTestMsg(NetworkMessage netMsg) + { + Debug.Log("Client received test message"); + TestMessage msg = netMsg.ReadMessage(); + Assert.AreEqual(99, msg.number); + Assert.AreEqual("testFromServer", msg.str); + ClientScene.AddPlayer(netMsg.conn, 0); + } + + public void OnClientTestMsg2(NetworkMessage netMsg) + { + Assert.AreEqual(ClientScene.localPlayers.Count, 1); + NetworkClient.allClients[0].Disconnect(); + } + + public void OnClientDisconnected(NetworkMessage netMsg) + { + Debug.Log("Client disconnected from server."); + isTestDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks/ConnectLocalClientWorks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks/ConnectLocalClientWorks.cs.meta new file mode 100644 index 00000000..05881823 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectLocalClientWorks/ConnectLocalClientWorks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a7b294b022e152640a39ce86f057e160 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks.meta new file mode 100644 index 00000000..0ab4fca9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1fb369b01822def488de9141c08a2839 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks/ConnectWithDNSWorks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks/ConnectWithDNSWorks.cs new file mode 100644 index 00000000..fdd66e49 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks/ConnectWithDNSWorks.cs @@ -0,0 +1,82 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class ConnectWithDNSWorks +{ + int kListenPort = 7073; + int steps = 0; + + [UnityTest] + public IEnumerator ConnectWithDNSWorksTest() + { + NetworkServer.Reset(); + NetworkClient.ShutdownAll(); + + ConnectionConfig config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + + NetworkClient client1 = new NetworkClient(); + if (!client1.Configure(config, 20)) + { + Assert.Fail("client1 configure failed"); + } + client1.RegisterHandler(MsgType.Error, OnError1); + + NetworkClient client2 = new NetworkClient(); + if (!client2.Configure(config, 20)) + { + Assert.Fail("client2 configure failed"); + } + client2.RegisterHandler(MsgType.Connect, OnConnectIncrementStep); + + NetworkClient client3 = new NetworkClient(); + if (!client3.Configure(config, 20)) + { + Assert.Fail("client3 configure failed"); + } + client3.RegisterHandler(MsgType.Connect, OnConnectIncrementStep); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + // wait for errors from client1 +#if PLATFORM_WINRT && !ENABLE_IL2CPP + LogAssert.Expect(LogType.Error, "DNS resolution failed: HostNotFound"); + LogAssert.Expect(LogType.Error, "UNet Client Error Connect Error: 11"); +#else + LogAssert.Expect(LogType.Error, "DNS resolution failed: 11001"); + LogAssert.Expect(LogType.Error, "UNet Client Error Connect Error: 11"); +#endif + client1.Connect("444.555.444.333", kListenPort); + + // These are successful and should increment the step counter + client2.Connect("localhost", kListenPort); + client3.Connect("127.0.0.1", kListenPort); + + while (steps < 3) + { + yield return null; + } + } + + void OnError1(NetworkMessage netMsg) + { + UnityEngine.Networking.NetworkSystem.ErrorMessage msg = netMsg.ReadMessage(); + Assert.AreEqual(NetworkError.DNSFailure, (NetworkError)msg.errorCode); + steps += 1; + } + + void OnConnectIncrementStep(NetworkMessage netMsg) + { + steps += 1; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks/ConnectWithDNSWorks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks/ConnectWithDNSWorks.cs.meta new file mode 100644 index 00000000..bfb1115e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ConnectWithDNSWorks/ConnectWithDNSWorks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a1f261cdb8b5ff1438b1953bdce7ef31 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks.meta new file mode 100644 index 00000000..6be9e5de --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 74c867feff01a77489135ba397d687e8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks/DisconnectAllWorks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks/DisconnectAllWorks.cs new file mode 100644 index 00000000..667ac144 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks/DisconnectAllWorks.cs @@ -0,0 +1,77 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class DisconnectAllWorks +{ + int kListenPort = 7073; + int maxConnections = 10; + int numClients = 5; + int clientsConnected = 0; + int serverConnections = 0; + int clientsDisccnnected = 0; + + [UnityTest] + public IEnumerator DisconnectAllWorksTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + ConnectionConfig config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + + NetworkServer.Configure(config, maxConnections); + NetworkServer.RegisterHandler(MsgType.Connect, OnServerConnected); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + for (int i = 0; i < numClients; ++i) + { + NetworkClient myClient = new NetworkClient(); + if (!myClient.Configure(config, maxConnections)) + { + Assert.Fail("Client configure failed"); + } + myClient.RegisterHandler(MsgType.Connect, OnClientConnected); + myClient.RegisterHandler(MsgType.Disconnect, OnClientDisconnected); + myClient.Connect("127.0.0.1", kListenPort); + } + + while (serverConnections != numClients || clientsConnected != numClients) + { + yield return null; + } + NetworkServer.DisconnectAll(); + + while (clientsDisccnnected != numClients) + { + yield return null; + } + + Assert.IsTrue(NetworkServer.active, "NetworkServer should still be active after DisconnectAll()"); + } + + public void OnServerConnected(NetworkMessage netMsg) + { + serverConnections += 1; + } + + public void OnClientConnected(NetworkMessage netMsg) + { + clientsConnected += 1; + } + + public void OnClientDisconnected(NetworkMessage netMsg) + { + clientsDisccnnected += 1; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks/DisconnectAllWorks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks/DisconnectAllWorks.cs.meta new file mode 100644 index 00000000..d9fa9a9d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/DisconnectAllWorks/DisconnectAllWorks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e050781af7ae7dd41977605a5a9af78b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.meta new file mode 100644 index 00000000..26c08bc2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 69d621dc076c65b47848c93b9e5c939f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.cs new file mode 100644 index 00000000..cf9287c3 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.cs @@ -0,0 +1,46 @@ +using System.Collections; +using UnityEngine.TestTools; +using NUnit.Framework; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class GetCurrentRTTCallDoesntCrashWhenUseWebSockets +{ + [UnityTest] + [UnityPlatform(RuntimePlatform.WindowsPlayer)] + [UnityPlatform(RuntimePlatform.LinuxPlayer)] + [UnityPlatform(RuntimePlatform.OSXPlayer)] + public IEnumerator GetCurrentRTTCallDoesntCrashWhenUseWebSocketsTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + GameObject nmObject = new GameObject(); + NetworkManager nmanager = nmObject.AddComponent(); + nmanager.playerPrefab = Resources.Load("GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab", typeof(GameObject)) as GameObject; + nmanager.networkAddress = "localhost"; + nmanager.useWebSockets = true; + + LogAssert.Expect(LogType.Error, "the function called has not been supported for web sockets communication"); + nmanager.StartHost(); + yield return null; + + Assert.IsTrue(NetworkServer.active, "Server is not active after StartHost"); + Assert.IsTrue(NetworkClient.active, "Client is not active after StartHost"); + + yield return null; + GameObject player = GameObject.Find("GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab(Clone)"); + + while (!player.GetComponent().isDone) + { + yield return null; + } + nmanager.StopHost(); + yield return null; + Assert.IsNull(GameObject.Find("GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab(Clone)"), "PlayerPrefab(Clone) object should be destroyed after calling StopHost"); + + Object.Destroy(nmObject); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.cs.meta new file mode 100644 index 00000000..4ab2f7f5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/GetCurrentRTTCallDoesntCrashWhenUseWebSockets.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 07cc76779138b7a4dbd7c4794867d59c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources.meta new file mode 100644 index 00000000..7477aea6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d786feb51ad1ebb4c8da04204cc12575 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources/GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources/GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab.prefab new file mode 100644 index 00000000..5a2c47dc --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources/GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab.prefab @@ -0,0 +1,144 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1902095678767368} + m_IsPrefabParent: 1 +--- !u!1 &1902095678767368 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4934951114835214} + - component: {fileID: 33422791935304546} + - component: {fileID: 23298508799286280} + - component: {fileID: 65564879027641614} + - component: {fileID: 114483071129414552} + - component: {fileID: 114330367389354536} + m_Layer: 0 + m_Name: GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4934951114835214 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1902095678767368} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23298508799286280 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1902095678767368} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33422791935304546 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1902095678767368} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65564879027641614 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1902095678767368} + 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!114 &114330367389354536 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1902095678767368} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70fd9431a22924742bf19e22aeeaa118, type: 3} + m_Name: + m_EditorClassIdentifier: + isDone: 0 +--- !u!114 &114483071129414552 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1902095678767368} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 84 + i1: 129 + i2: 11 + i3: 217 + i4: 137 + i5: 118 + i6: 55 + i7: 228 + i8: 153 + i9: 20 + i10: 82 + i11: 183 + i12: 249 + i13: 172 + i14: 186 + i15: 19 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 1 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources/GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources/GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab.prefab.meta new file mode 100644 index 00000000..95f6dfe3 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources/GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 54810bd9897637e4991452b7f9acba13 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/UnetPlayerWithGetCurrentRTTCallScript.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/UnetPlayerWithGetCurrentRTTCallScript.cs new file mode 100644 index 00000000..7ef8565e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/UnetPlayerWithGetCurrentRTTCallScript.cs @@ -0,0 +1,19 @@ +using UnityEngine.Networking; + +#pragma warning disable 618 +public class UnetPlayerWithGetCurrentRTTCallScript : NetworkBehaviour +{ + public bool isDone; + + public void Start() + { + byte error; + if (isServer) + { + NetworkTransport.GetCurrentRTT(NetworkServer.serverHostId, connectionToClient.connectionId, out error); + if ((NetworkError)error != NetworkError.Ok) + isDone = true; + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/UnetPlayerWithGetCurrentRTTCallScript.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/UnetPlayerWithGetCurrentRTTCallScript.cs.meta new file mode 100644 index 00000000..b5264c26 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/UnetPlayerWithGetCurrentRTTCallScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70fd9431a22924742bf19e22aeeaa118 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks.meta new file mode 100644 index 00000000..2cdbd85e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4568cf3a2262d3d4fbef1d7ed13e10dc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks/HavingManyLocalClientsSimultaneouslyWorks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks/HavingManyLocalClientsSimultaneouslyWorks.cs new file mode 100644 index 00000000..3631ec7e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks/HavingManyLocalClientsSimultaneouslyWorks.cs @@ -0,0 +1,96 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking.NetworkSystem; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class HavingManyLocalClientsSimultaneouslyWorks +{ + int kListenPort = 7073; + int maxConnections = 100; + const int kMsgTest = 555; + public class TestMessage : MessageBase + { + public int number; + public string str; + }; + private int numClients = 15; // Maximum hosts per process is 16 so 15 client + 1 server + int clientsConnected = 0; + int serverConnections = 0; + int msgCountClientRecieved = 0; + + [UnityTest] + public IEnumerator HavingManyLocalClientsSimultaneouslyWorksTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + ConnectionConfig config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + + NetworkServer.Configure(config, maxConnections); + NetworkServer.RegisterHandler(MsgType.Connect, OnServerConnected); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + for (int i = 0; i < numClients; ++i) + { + NetworkClient myClient = new NetworkClient(); + if (!myClient.Configure(config, maxConnections)) + { + Assert.Fail("Client configure failed"); + } + myClient.RegisterHandler(MsgType.Connect, OnClientConnected); + myClient.RegisterHandler(MsgType.Error, OnError); + myClient.RegisterHandler(kMsgTest, OnClientTest); + myClient.Connect("127.0.0.1", kListenPort); + } + + while (serverConnections != numClients || clientsConnected != numClients) + { + yield return null; + } + + TestMessage testMsg = new TestMessage(); + testMsg.number = 98756; + testMsg.str = "teststring"; + + NetworkServer.SendToAll(kMsgTest, testMsg); + + while (msgCountClientRecieved != numClients) + { + yield return null; + } + } + + public void OnServerConnected(NetworkMessage netMsg) + { + serverConnections += 1; + } + + public void OnClientTest(NetworkMessage netMsg) + { + msgCountClientRecieved += 1; + var receivedMessage = netMsg.reader.ReadMessage(); + StringAssert.IsMatch("teststring", receivedMessage.str, "Received message has invalid sting"); + } + + public void OnClientConnected(NetworkMessage netMsg) + { + clientsConnected += 1; + } + + public void OnError(NetworkMessage netMsg) + { + ErrorMessage msg = netMsg.ReadMessage(); + Assert.Fail("Error: " + msg.errorCode); + } +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks/HavingManyLocalClientsSimultaneouslyWorks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks/HavingManyLocalClientsSimultaneouslyWorks.cs.meta new file mode 100644 index 00000000..60ec0e80 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/HavingManyLocalClientsSimultaneouslyWorks/HavingManyLocalClientsSimultaneouslyWorks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dc71d5d62b5635745b3025f7169ffe80 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients.meta new file mode 100644 index 00000000..4a540c56 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 01f26976b1c20564dbef7b54146f2392 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients/IsConnectedPropertyWorksOnDifferentClients.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients/IsConnectedPropertyWorksOnDifferentClients.cs new file mode 100644 index 00000000..c1e9084d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients/IsConnectedPropertyWorksOnDifferentClients.cs @@ -0,0 +1,68 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class IsConnectedPropertyWorksOnDifferentClients +{ + int kListenPort = 7073; + NetworkClient remoteClient; + NetworkClient localClient = null; + bool isTestDone; + + [UnityTest] + public IEnumerator IsConnectedPropertyWorksOnDifferentClientsTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + ConnectionConfig config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + + remoteClient = new NetworkClient(); + if (!remoteClient.Configure(config, 10)) + { + Assert.Fail("Client configure failed"); + } + + remoteClient.RegisterHandler(MsgType.Connect, OnClientConnected); + Assert.IsFalse(remoteClient.isConnected); + + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + remoteClient.Connect("127.0.0.1", kListenPort); + + while (!isTestDone) + { + yield return null; + } + } + + public void OnClientConnected(NetworkMessage netMsg) + { + Assert.IsTrue(remoteClient.isConnected); + + if (localClient == null) + { + localClient = ClientScene.ConnectLocalServer(); + Assert.IsTrue(localClient.isConnected); + + remoteClient.Disconnect(); + localClient.Disconnect(); + + Assert.IsFalse(remoteClient.isConnected); + Assert.IsFalse(localClient.isConnected); + + isTestDone = true; + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients/IsConnectedPropertyWorksOnDifferentClients.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients/IsConnectedPropertyWorksOnDifferentClients.cs.meta new file mode 100644 index 00000000..c2154c23 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/IsConnectedPropertyWorksOnDifferentClients/IsConnectedPropertyWorksOnDifferentClients.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ed9e30042043dde4e970cdd5e5c182a2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost.meta new file mode 100644 index 00000000..2c79ece9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c84cd279bf44b54daab4fdd4f334ffe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/NetworkBehaviourCallbacksOrderOnTheHost.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/NetworkBehaviourCallbacksOrderOnTheHost.cs new file mode 100644 index 00000000..d5d800f2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/NetworkBehaviourCallbacksOrderOnTheHost.cs @@ -0,0 +1,54 @@ +using UnityEngine; +using UnityEngine.TestTools; +using NUnit.Framework; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkBehaviourCallbacksOrderOnTheHost +{ + public static List expectedListOfCallbacks = new List() + { + "OnStartServer", + "OnStartClient", + "OnRebuildObservers", + "OnStartAuthority", + "OnStartLocalPlayer", + "Start", + "OnSetLocalVisibility", + "OnSetLocalVisibility" + }; + + //[KnownFailure(855941, "OnSetLocalVisibility callback should appear only once ")] + [UnityTest] + public IEnumerator CallbacksOrderInNetworkBehaviourOnTheHostIsCorrect() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + GameObject nmObject = new GameObject(); + NetworkManager nmanager = nmObject.AddComponent(); + nmanager.playerPrefab = Resources.Load("PlayerCallbacksOrderOnTheHost_PlayerPrefab", typeof(GameObject)) as GameObject; + + Assert.IsNotNull(nmanager.playerPrefab, "Player prefab field is not set on NetworkManager"); + + nmanager.StartHost(); + yield return null; + + Assert.IsTrue(NetworkServer.active, "Server is not active after StartHost"); + Assert.IsTrue(NetworkClient.active, "Client is not active after StartHost"); + yield return null; + GameObject player = GameObject.Find("PlayerCallbacksOrderOnTheHost_PlayerPrefab(Clone)"); + yield return null; + + while (!player.GetComponent().isDone) + { + yield return null; + } + nmanager.StopHost(); + CollectionAssert.AreEqual(expectedListOfCallbacks, player.GetComponent().actualListOfCallbacks, "Wrong order of callbacks or some callback is missing"); + Object.Destroy(nmObject); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/NetworkBehaviourCallbacksOrderOnTheHost.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/NetworkBehaviourCallbacksOrderOnTheHost.cs.meta new file mode 100644 index 00000000..1d67ef01 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/NetworkBehaviourCallbacksOrderOnTheHost.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 31a7dc69d05292340a8f775a38edc9c3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/PlayerCallbacksOrderOnTheHostScript.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/PlayerCallbacksOrderOnTheHostScript.cs new file mode 100644 index 00000000..c7569df9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/PlayerCallbacksOrderOnTheHostScript.cs @@ -0,0 +1,47 @@ +using System.Collections.Generic; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class PlayerCallbacksOrderOnTheHostScript : NetworkBehaviour +{ + public List actualListOfCallbacks = new List(); + public bool isDone = false; + + public void Start() + { + actualListOfCallbacks.Add("Start"); + } + + public override void OnStartServer() + { + actualListOfCallbacks.Add("OnStartServer"); + } + + public override void OnStartClient() + { + actualListOfCallbacks.Add("OnStartClient"); + } + + public override void OnStartLocalPlayer() + { + actualListOfCallbacks.Add("OnStartLocalPlayer"); + } + + public override void OnStartAuthority() + { + actualListOfCallbacks.Add("OnStartAuthority"); + } + + public override bool OnRebuildObservers(HashSet observers, bool initialize) + { + actualListOfCallbacks.Add("OnRebuildObservers"); + return false; + } + + public override void OnSetLocalVisibility(bool vis) + { + actualListOfCallbacks.Add("OnSetLocalVisibility"); + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/PlayerCallbacksOrderOnTheHostScript.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/PlayerCallbacksOrderOnTheHostScript.cs.meta new file mode 100644 index 00000000..5edd654c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/PlayerCallbacksOrderOnTheHostScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 77a7432320518724092f03d1e2eee645 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources.meta new file mode 100644 index 00000000..3cfd3321 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7d171b35257529540ada2ae3550ce8b2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources/PlayerCallbacksOrderOnTheHost_PlayerPrefab.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources/PlayerCallbacksOrderOnTheHost_PlayerPrefab.prefab new file mode 100644 index 00000000..11d32ead --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources/PlayerCallbacksOrderOnTheHost_PlayerPrefab.prefab @@ -0,0 +1,145 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1502327695165466} + m_IsPrefabParent: 1 +--- !u!1 &1502327695165466 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4906103838815550} + - component: {fileID: 33168895557203384} + - component: {fileID: 23726883161695556} + - component: {fileID: 65213150513755038} + - component: {fileID: 114253944624540912} + - component: {fileID: 114975380025643044} + m_Layer: 0 + m_Name: PlayerCallbacksOrderOnTheHost_PlayerPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4906103838815550 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1502327695165466} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23726883161695556 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1502327695165466} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33168895557203384 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1502327695165466} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65213150513755038 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1502327695165466} + 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!114 &114253944624540912 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1502327695165466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 220 + i1: 151 + i2: 179 + i3: 118 + i4: 73 + i5: 177 + i6: 13 + i7: 164 + i8: 184 + i9: 216 + i10: 254 + i11: 199 + i12: 56 + i13: 103 + i14: 117 + i15: 82 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 1 +--- !u!114 &114975380025643044 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1502327695165466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77a7432320518724092f03d1e2eee645, type: 3} + m_Name: + m_EditorClassIdentifier: + actualListOfCallbacks: [] + isDone: 0 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources/PlayerCallbacksOrderOnTheHost_PlayerPrefab.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources/PlayerCallbacksOrderOnTheHost_PlayerPrefab.prefab.meta new file mode 100644 index 00000000..8acd6321 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkBehaviourCallbacksOrderOnTheHost/Resources/PlayerCallbacksOrderOnTheHost_PlayerPrefab.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc97b37649b10da4b8d8fec738677552 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients.meta new file mode 100644 index 00000000..8e94613a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42453beef1563e54997029d2a58f1019 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients/NetworkClientActiveWorksWithManyClients.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients/NetworkClientActiveWorksWithManyClients.cs new file mode 100644 index 00000000..8e0252d8 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients/NetworkClientActiveWorksWithManyClients.cs @@ -0,0 +1,67 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkClientActiveWorksWithManyClients +{ + int kListenPort = 7073; + bool isTestDone; + int m_ClientConnectionCount = 0; + + [UnityTest] + public IEnumerator NetworkClientActiveWorksWithManyClientsTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + ConnectionConfig config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + + for (int i = 0; i < 3; ++i) + { + NetworkClient myClient = new NetworkClient(); + if (!myClient.Configure(config, 10)) + { + Assert.Fail("Client configure failed"); + } + myClient.RegisterHandler(MsgType.Connect, OnClientConnected); + } + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + Assert.IsFalse(NetworkClient.active, "NetworkClient.active should be false as there is no clients yet"); + NetworkClient.allClients[0].Connect("127.0.0.1", kListenPort); + Assert.IsTrue(NetworkClient.active, "NetworkClient.active should be true as there is one client"); + NetworkClient.allClients[1].Connect("127.0.0.1", kListenPort); + NetworkClient.allClients[2].Connect("127.0.0.1", kListenPort); + + while (!isTestDone) + { + yield return null; + } + } + + public void OnClientConnected(NetworkMessage netMsg) + { + if (++m_ClientConnectionCount == 3) + { + NetworkClient.allClients[1].Shutdown(); + Assert.IsTrue(NetworkClient.active, "NetworkClient.active should be true as there are two clients"); + NetworkClient.allClients[0].Shutdown(); + Assert.IsTrue(NetworkClient.active, "NetworkClient.active should be true as there is one client"); + // The 2nd basic client instance is now 0, since they are removed from the list on shut down... + NetworkClient.allClients[0].Shutdown(); + Assert.IsFalse(NetworkClient.active, "NetworkClient.active should be false as all clients were shut down"); + isTestDone = true; + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients/NetworkClientActiveWorksWithManyClients.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients/NetworkClientActiveWorksWithManyClients.cs.meta new file mode 100644 index 00000000..89053616 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientActiveWorksWithManyClients/NetworkClientActiveWorksWithManyClients.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0182e524edf874445b025d8613445cb2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks.meta new file mode 100644 index 00000000..91c5b0d2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f698532450f273e4895050eb70006d1e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks/NetworkClientDisconnectWorks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks/NetworkClientDisconnectWorks.cs new file mode 100644 index 00000000..4414c92c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks/NetworkClientDisconnectWorks.cs @@ -0,0 +1,82 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkClientDisconnectWorks +{ + int kListenPort = 7073; + private const int totalConnects = 2; + private int numConnects = 0; + bool isClientConnected = false; + bool isServerRecivedConnection = false; + ConnectionConfig config; + NetworkClient myClient; + + [UnityTest] + public IEnumerator NetworkClientDisconnectWorksTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + NetworkServer.RegisterHandler(MsgType.Connect, OnServerConnected); + NetworkServer.RegisterHandler(MsgType.Disconnect, OnClientDisconnected); + + config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + + myClient = new NetworkClient(); + if (!myClient.Configure(config, 20)) + { + Assert.Fail("Client configure failed"); + } + + myClient.RegisterHandler(MsgType.Connect, OnClientConnected); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + myClient.Connect("127.0.0.1", kListenPort); + + while (numConnects != totalConnects) + { + if (isServerRecivedConnection && isClientConnected) + { + myClient.Disconnect(); + isClientConnected = false; + } + yield return null; + } + } + + public void OnServerConnected(NetworkMessage netMsg) + { + isServerRecivedConnection = true; + } + + public void OnClientConnected(NetworkMessage netMsg) + { + isClientConnected = true; + } + + public void OnClientDisconnected(NetworkMessage netMsg) + { + numConnects++; + Assert.IsTrue(isServerRecivedConnection); + isServerRecivedConnection = false; + isClientConnected = false; + myClient = new NetworkClient(); + if (!myClient.Configure(config, 20)) + { + Assert.Fail("Client configure failed"); + } + myClient.RegisterHandler(MsgType.Connect, OnClientConnected); + myClient.Connect("127.0.0.1", kListenPort); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks/NetworkClientDisconnectWorks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks/NetworkClientDisconnectWorks.cs.meta new file mode 100644 index 00000000..84c145db --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkClientDisconnectWorks/NetworkClientDisconnectWorks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5b8b68d6f8d366944883797f387bdc37 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks.meta new file mode 100644 index 00000000..1824ea0e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 72044a90c9270dc48991fe29109dc6e6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks/NetworkDiscoveryWorks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks/NetworkDiscoveryWorks.cs new file mode 100644 index 00000000..7c22fcc0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks/NetworkDiscoveryWorks.cs @@ -0,0 +1,61 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkDiscoveryWorks +{ + const string testData = "TESTING"; + GameObject clientObj; + GameObject serverObj; + + [UnityTest] + public IEnumerator NetworkDiscoveryWorksTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + bool result; + + serverObj = new GameObject(); + var serverDiscovery = serverObj.AddComponent(); + serverDiscovery.useNetworkManager = false; + serverDiscovery.broadcastData = testData; + result = serverDiscovery.Initialize(); + Assert.IsTrue(result, "serverDiscovery.Initialize() returned false"); + + result = serverDiscovery.StartAsServer(); + Assert.IsTrue(result, "serverDiscovery.StartAsServer() returned false"); + + clientObj = new GameObject(); + var clientDiscovery = clientObj.AddComponent(); + + result = clientDiscovery.Initialize(); + Assert.IsTrue(result, "clientDiscovery.Initialize() returned false"); + + result = clientDiscovery.StartAsClient(); + Assert.IsTrue(result, "clientDiscovery.StartAsClient() returned false"); + + + while (clientDiscovery.broadcastsReceived.Count <= 0) + { + yield return null; + } + + foreach (var dis in clientDiscovery.broadcastsReceived.Values) + { + char[] chars = new char[dis.broadcastData.Length / sizeof(char)]; + System.Buffer.BlockCopy(dis.broadcastData, 0, chars, 0, dis.broadcastData.Length); + var str = new string(chars); + + Assert.AreEqual(testData, str, "Sent and received data are different"); + } + serverDiscovery.StopBroadcast(); + clientDiscovery.StopBroadcast(); + Object.Destroy(serverDiscovery); + Object.Destroy(clientDiscovery); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks/NetworkDiscoveryWorks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks/NetworkDiscoveryWorks.cs.meta new file mode 100644 index 00000000..af895c91 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkDiscoveryWorks/NetworkDiscoveryWorks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4d787f3d2115626489b2e336c35b9c59 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost.meta new file mode 100644 index 00000000..6c3d6ce6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5637db9ae647565488192b212d2a1920 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/CustomNetworkManagerWithCallbacks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/CustomNetworkManagerWithCallbacks.cs new file mode 100644 index 00000000..d478be65 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/CustomNetworkManagerWithCallbacks.cs @@ -0,0 +1,70 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class CustomNetworkManagerWithCallbacks : NetworkManager +{ + public List actualListOfCallbacks = new List(); + public bool isStartHostPartDone; + public bool isStopHostPartDone; + + // ----- Start Host ----- + public override void OnStartHost() + { + actualListOfCallbacks.Add("OnStartHost"); + } + + public override void OnStartServer() + { + actualListOfCallbacks.Add("OnStartServer"); + } + + public override void OnServerConnect(NetworkConnection conn) + { + base.OnServerConnect(conn); + actualListOfCallbacks.Add("OnServerConnect"); + } + + public override void OnStartClient(NetworkClient client) + { + actualListOfCallbacks.Add("OnStartClient"); + } + + public override void OnClientConnect(NetworkConnection conn) + { + base.OnClientConnect(conn); + actualListOfCallbacks.Add("OnClientConnect"); + isStartHostPartDone = true; + } + + public override void OnServerReady(NetworkConnection conn) + { + actualListOfCallbacks.Add("OnServerReady"); + base.OnServerReady(conn); + } + + public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) + { + base.OnServerAddPlayer(conn, playerControllerId); + actualListOfCallbacks.Add("OnServerAddPlayer"); + } + + // ----- Stop Host ----- + public override void OnStopHost() + { + actualListOfCallbacks.Add("OnStopHost"); + } + + public override void OnStopServer() + { + actualListOfCallbacks.Add("OnStopServer"); + } + + public override void OnStopClient() + { + actualListOfCallbacks.Add("OnStopClient"); + isStopHostPartDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/CustomNetworkManagerWithCallbacks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/CustomNetworkManagerWithCallbacks.cs.meta new file mode 100644 index 00000000..184ae7db --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/CustomNetworkManagerWithCallbacks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8526ecf3aefbf3c498823db0f7511080 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/NetworkManagerCallbacksOrderOnTheHost.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/NetworkManagerCallbacksOrderOnTheHost.cs new file mode 100644 index 00000000..ec4dcdd6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/NetworkManagerCallbacksOrderOnTheHost.cs @@ -0,0 +1,60 @@ +using System.Collections; +using System.Collections.Generic; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkManagerCallbacksOrderOnTheHost +{ + public static List resultListOfCallbacks = new List() + { + "OnStartHost", + "OnStartServer", + "OnServerConnect", + "OnStartClient", + "OnServerReady", + "OnServerAddPlayer", + "OnClientConnect", + "OnStopHost", + "OnStopServer", + "OnStopClient" + }; + + [UnityTest] + public IEnumerator CallbacksOrderInNetworkManagerOnTheHostIsCorrect() + { + NetworkServer.Reset(); + NetworkClient.ShutdownAll(); + + GameObject nmObject = new GameObject(); + CustomNetworkManagerWithCallbacks nmanager = nmObject.AddComponent(); + nmanager.playerPrefab = Resources.Load("CleanPlayerPrefab", typeof(GameObject)) as GameObject; + + yield return null; + Assert.IsNotNull(nmanager.playerPrefab, "Player prefab field is not set on NetworkManager"); + + nmanager.StartHost(); + yield return null; + + Assert.IsTrue(NetworkServer.active, "Server is not active after StartHost"); + Assert.IsTrue(NetworkClient.active, "Client is not active after StartHost"); + yield return null; + + while (!nmanager.isStartHostPartDone) + { + yield return null; + } + + nmanager.StopHost(); + while (!nmanager.isStopHostPartDone) + { + yield return null; + } + + CollectionAssert.AreEqual(resultListOfCallbacks, nmanager.actualListOfCallbacks, "Wrong order of callbacks or some callback is missing"); + Object.Destroy(nmObject); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/NetworkManagerCallbacksOrderOnTheHost.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/NetworkManagerCallbacksOrderOnTheHost.cs.meta new file mode 100644 index 00000000..87b893cc --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/NetworkManagerCallbacksOrderOnTheHost.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f5e6cc3ef4cddd449ae8322957e2040 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources.meta new file mode 100644 index 00000000..b281e7f8 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 83e8dc4d65d58d14cb4101875667ed23 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources/CleanPlayerPrefab.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources/CleanPlayerPrefab.prefab new file mode 100644 index 00000000..6ce373f4 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources/CleanPlayerPrefab.prefab @@ -0,0 +1,131 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1257315088113390} + m_IsPrefabParent: 1 +--- !u!1 &1257315088113390 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4088004896237320} + - component: {fileID: 33049133014149440} + - component: {fileID: 23902480328168034} + - component: {fileID: 65237091255332572} + - component: {fileID: 114457817983725144} + m_Layer: 0 + m_Name: CleanPlayerPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4088004896237320 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1257315088113390} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23902480328168034 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1257315088113390} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33049133014149440 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1257315088113390} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65237091255332572 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1257315088113390} + 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!114 &114457817983725144 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1257315088113390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 33 + i1: 118 + i2: 84 + i3: 125 + i4: 76 + i5: 229 + i6: 172 + i7: 164 + i8: 24 + i9: 35 + i10: 11 + i11: 204 + i12: 175 + i13: 163 + i14: 232 + i15: 234 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 1 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources/CleanPlayerPrefab.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources/CleanPlayerPrefab.prefab.meta new file mode 100644 index 00000000..870e8986 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerCallbacksOrderOnTheHost/Resources/CleanPlayerPrefab.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2176547d4ce5aca418230bccafa3e8ea +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks.meta new file mode 100644 index 00000000..662094c5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fbcb83db637a14b74abb031224a15fb7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks/NetworkManagerConfigWorksTest.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks/NetworkManagerConfigWorksTest.cs new file mode 100644 index 00000000..486643f5 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks/NetworkManagerConfigWorksTest.cs @@ -0,0 +1,87 @@ +using NUnit.Framework; +using System; +using System.Collections; +using UnityEngine; +using UnityEngine.TestTools; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkManagerConfigWorksTest +{ + NetworkManager netManager; + + [UnityTest] + public IEnumerator NetworkManagerConfigCheck() + { + NetworkServer.Reset(); + + var netManagerObj = new GameObject(); + netManager = netManagerObj.AddComponent(); + + netManager.GetComponent().customConfig = true; + + foreach (QosType channel in Enum.GetValues(typeof(QosType))) + { + netManager.GetComponent(). + connectionConfig.AddChannel(channel); + } + + Assert.AreEqual(netManager.connectionConfig.ChannelCount, Enum.GetValues(typeof(QosType)).Length, "Not all channels are added"); + + netManager.connectionConfig.AckDelay = 33; + netManager.connectionConfig.AcksType = ConnectionAcksType.Acks32; + netManager.connectionConfig.AllCostTimeout = 20; + netManager.connectionConfig.FragmentSize = 500; + netManager.connectionConfig.ConnectTimeout = 500; + netManager.connectionConfig.DisconnectTimeout = 2000; + + NetworkHostCanBeStartedWithConfig(); + NetworkServerClientCanBeStartedWithConfig(); + + yield return null; + UnityEngine.Object.Destroy(netManager); + } + + //check that Host can be started + public IEnumerator NetworkHostCanBeStartedWithConfig() + { + NetworkClient netClient = new NetworkClient(); + + if (!netManager.isNetworkActive) + netClient = netManager.StartHost(); + + if (!netClient.isConnected) + yield return null; + + Assert.IsTrue(netClient.isConnected, + "Network is not active."); + + netManager.StopHost(); + } + + //check that Server/Client can be started + public IEnumerator NetworkServerClientCanBeStartedWithConfig() + { + string netAddress = "127.0.0.1"; + int netPort = 8887; + netManager.networkAddress = netAddress; + netManager.networkPort = netPort; + + netManager.StartServer(); + + NetworkClient netClient = netManager.StartClient(); + + netClient.Connect(netAddress, netPort); + + if (!netClient.isConnected) + { + yield return null; + } + + Assert.IsTrue(netClient.isConnected, + "Client did not connect to server"); + + netManager.StopServer(); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks/NetworkManagerConfigWorksTest.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks/NetworkManagerConfigWorksTest.cs.meta new file mode 100644 index 00000000..916fb9d0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerConfigWorks/NetworkManagerConfigWorksTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c9cc8b4fa7bcf45129c3cf811a27352a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.meta new file mode 100644 index 00000000..f79fef7b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eea41879e2ba3be46b084caceee6ce87 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.cs new file mode 100644 index 00000000..4b5aa5ff --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.cs @@ -0,0 +1,50 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkManagerGivesErrorWhenNoPlayerPrefabSet +{ + public class CustomNetworkManagerGivesErrorWhenNoPlayerPrefabSet : NetworkManager + { + public bool isDone = false; + public override void OnServerReady(NetworkConnection conn) + { + base.OnServerReady(conn); + isDone = true; + } + } + + [UnityTest] + public IEnumerator NetworkManagerGivesErrorWhenNoPlayerPrefabSetTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + GameObject nmObject = new GameObject(); + CustomNetworkManagerGivesErrorWhenNoPlayerPrefabSet nmanager = nmObject.AddComponent(); + nmanager.networkAddress = "localhost"; + + yield return null; + Assert.IsNull(nmanager.playerPrefab, "Player prefab field is set on NetworkManager, but shouldn't be"); + + nmanager.StartHost(); + yield return null; + + LogAssert.Expect(LogType.Error, "The PlayerPrefab is empty on the NetworkManager. Please setup a PlayerPrefab object."); + Assert.IsTrue(NetworkServer.active, "Server is not active after StartHost"); + Assert.IsTrue(NetworkClient.active, "Client is not active after StartHost"); + yield return null; + + while (!nmanager.isDone) + { + yield return null; + } + + nmanager.StopHost(); + Object.Destroy(nmObject); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.cs.meta new file mode 100644 index 00000000..f8e73b5b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerGivesErrorWhenNoPlayerPrefabSet/NetworkManagerGivesErrorWhenNoPlayerPrefabSet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 02f6c0ddfe848a74e896b9d9aaa2da6d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket.meta new file mode 100644 index 00000000..39deea43 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e376da92649bef04cbcb9f4c569b8f28 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket/NetworkManagerHandlesLargePacket.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket/NetworkManagerHandlesLargePacket.cs new file mode 100644 index 00000000..e505dfba --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket/NetworkManagerHandlesLargePacket.cs @@ -0,0 +1,85 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkManagerHandlesLargePacket +{ + public bool isDone = false; + const short MsgIdBig = 99; + const int MsgSize = 10397;// increasing it to bigger number will cause failure + + class BigMessage : MessageBase + { + public byte[] data; + } + + [UnityTest] + public IEnumerator NetworkManagerHandlesLargePacketTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + GameObject nmObject = new GameObject(); + NetworkManagerWithLargePacket nmanager = nmObject.AddComponent(); + nmanager.networkAddress = "localhost"; + nmanager.autoCreatePlayer = false; + + nmanager.customConfig = true; + nmanager.connectionConfig.MinUpdateTimeout = 1; + nmanager.connectionConfig.MaxSentMessageQueueSize = 200; + nmanager.channels.Add(QosType.UnreliableFragmented); + + nmanager.StartServer(); + nmanager.StartClient(); + yield return null; + NetworkServer.RegisterHandler(MsgIdBig, OnBigMessage); + + yield return null; + + Assert.IsTrue(NetworkServer.active, "Server is not started"); + Assert.IsTrue(NetworkClient.active, "Client is not started"); + yield return null; + + while (!isDone) + { + yield return null; + } + + NetworkManager.singleton.StopServer(); + NetworkManager.singleton.StopClient(); + + Object.Destroy(nmObject); + } + + public void OnBigMessage(NetworkMessage netMsg) + { + Debug.Log("OnBigMessage"); + var bigMsg = netMsg.ReadMessage(); + Assert.AreEqual(MsgSize, bigMsg.data.Length); + isDone = true; + } + + public class NetworkManagerWithLargePacket : NetworkManager + { + public override void OnClientConnect(NetworkConnection conn) + { + Debug.Log("OnClient Connect"); + base.OnClientConnect(conn); + + var bigMsg = new BigMessage(); + bigMsg.data = new byte[MsgSize]; + + var writer = new NetworkWriter(); + writer.StartMessage(MsgIdBig); + bigMsg.Serialize(writer); + writer.FinishMessage(); + var data = writer.ToArray(); + + client.SendBytes(data, data.Length, 0); + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket/NetworkManagerHandlesLargePacket.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket/NetworkManagerHandlesLargePacket.cs.meta new file mode 100644 index 00000000..96010883 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerHandlesLargePacket/NetworkManagerHandlesLargePacket.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fea4eb01c3d45c54f89e5ed004729da0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab.meta new file mode 100644 index 00000000..9a02641c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1e7580d6ac8905e4693bd89bfe7d7dad +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab/NetworkManagerSpawnSpecialPrefab.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab/NetworkManagerSpawnSpecialPrefab.cs new file mode 100644 index 00000000..aa9bcf0b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab/NetworkManagerSpawnSpecialPrefab.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections; +using NUnit.Framework; +using UnityEditor; +using UnityEngine; +using UnityEngine.Networking; +using UnityEngine.TestTools; +using UnityEngine.Windows; + +#pragma warning disable 618 +class NetworkManagerSpawnSpecialPrefab : IPrebuildSetup +{ + public void Setup() + { +#if UNITY_EDITOR + GameObject obj = new GameObject("NetworkManagerSpawnSpecialPrefab_player"); + var netId = obj.AddComponent(); + // Certain conditions can lead to a prefab containing a set scene ID + // for example if you set up a scene object linked to a prefab, start playmode (which + // assigns a new scene ID) and then click apply changes to prefab on the scene object + netId.ForceSceneId(1); + obj.AddComponent(); + var netTransform = obj.AddComponent(); + netTransform.transformSyncMode = NetworkTransform.TransformSyncMode.SyncCharacterController; + obj.AddComponent(); + var prefab = PrefabUtility.CreatePrefab("Assets/UNetManagerSpawnSpecialPrefab.prefab", obj, ReplacePrefabOptions.ConnectToPrefab); + GameObject.DestroyImmediate(obj); + + obj = new GameObject("NetworkManagerSpawnerScript"); + var manager = obj.AddComponent(); + manager.playerPrefab = prefab; + GameObject.DestroyImmediate(obj); + //File.Delete("Assets/UNetManagerSpawnSpecialPrefab.prefab"); +#endif + } + + // TODO: Disabled for now as something went wrong in the transition from runtime to playmode tests (in test setup part) + //[UnityTest] + public IEnumerator NetworkManagerSpawnSpecialPrefabTest() + { + NetworkManager.singleton.StartHost(); + + DateTime timelimit = DateTime.Now; + while (!NetworkManagerSpawnerScript.serverReady) + { + if ((DateTime.Now - timelimit).TotalSeconds > 30) + { + Assert.Fail("Network manager didn't get to ready state"); + } + yield return null; + } + + // If invalid scene ID (forced to 1) has not been corrected in the prefab we have a problem (the bug this test covers only happened on standalone players) + if (!NetworkManagerSpawnSpecialPrefabObject.didSpawnWithValidSceneId) + { + Assert.Fail("Server ready but scene ID is invalid."); + } + + NetworkManager.singleton.StopServer(); + } + + public class NetworkManagerSpawnerScript : NetworkManager + { + public static bool serverReady; + + public override void OnServerReady(NetworkConnection conn) + { + base.OnServerReady(conn); + serverReady = true; + } + } + + public class NetworkManagerSpawnSpecialPrefabObject : NetworkBehaviour + { + public static bool didSpawnWithValidSceneId; + + public override void OnStartServer() + { + // The scene ID was forced to 1 on the prefab, it should have been corrected to 0 on this intantiated copy of that prafab + if (GetComponent().sceneId.Value == 0) + { + didSpawnWithValidSceneId = true; + } + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab/NetworkManagerSpawnSpecialPrefab.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab/NetworkManagerSpawnSpecialPrefab.cs.meta new file mode 100644 index 00000000..e7aa17c2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerSpawnSpecialPrefab/NetworkManagerSpawnSpecialPrefab.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6642d0724cccbfb4585c9c66120d6980 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake.meta new file mode 100644 index 00000000..2ef9f5e6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 41e7f7e4ada63774698f8dd7bb845a2c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake/NetworkManagerStillWorksWhenUserUseStartAndAwake.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake/NetworkManagerStillWorksWhenUserUseStartAndAwake.cs new file mode 100644 index 00000000..73724844 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake/NetworkManagerStillWorksWhenUserUseStartAndAwake.cs @@ -0,0 +1,64 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkManagerStillWorksWhenUserUseStartAndAwake +{ + public class CustomNetworkManagerWithAwakeAndStart : NetworkManager + { + public bool isDone = false; + public int counter; + + public void Awake() + { + counter++; + } + + public void Start() + { + counter++; + } + + public override void OnClientConnect(NetworkConnection conn) + { + base.OnClientConnect(conn); + counter++; + isDone = true; + } + } + + [UnityTest] + public IEnumerator NetworkManagerStillWorksWhenUserUseStartAndAwakeTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + GameObject nmObject = new GameObject(); + CustomNetworkManagerWithAwakeAndStart nmanager = nmObject.AddComponent(); + nmanager.networkAddress = "localhost"; + + yield return null; + Assert.IsNull(nmanager.playerPrefab, "Player prefab field is set on NetworkManager, but shouldn't be"); + + nmanager.StartHost(); + yield return null; + + LogAssert.Expect(LogType.Error, "The PlayerPrefab is empty on the NetworkManager. Please setup a PlayerPrefab object."); + Assert.IsTrue(NetworkServer.active, "Server is not active after StartHost"); + Assert.IsTrue(NetworkClient.active, "Client is not active after StartHost"); + yield return null; + + while (!nmanager.isDone) + { + yield return null; + } + + nmanager.StopHost(); + Assert.AreEqual(3, nmanager.counter, "Start or Awake was not called on NetwotkManager"); + Object.Destroy(nmObject); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake/NetworkManagerStillWorksWhenUserUseStartAndAwake.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake/NetworkManagerStillWorksWhenUserUseStartAndAwake.cs.meta new file mode 100644 index 00000000..9811ac8f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStillWorksWhenUserUseStartAndAwake/NetworkManagerStillWorksWhenUserUseStartAndAwake.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ec3cd8ea8a82a2c45a2f5f65b320da83 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks.meta new file mode 100644 index 00000000..dc05d360 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f2a5b7f524a28844097339a4028395cb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks/NetworkManagerStopServerAndClientWorks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks/NetworkManagerStopServerAndClientWorks.cs new file mode 100644 index 00000000..8c4d141f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks/NetworkManagerStopServerAndClientWorks.cs @@ -0,0 +1,54 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkManagerStopServerAndClientWorks +{ + public class TestNetworkManagerStop : NetworkManager + { + public bool isDone; + + public override void OnClientConnect(NetworkConnection conn) + { + StopServer(); + StopClient(); + + Assert.IsFalse(NetworkServer.active, "Server should not be active at this point"); + Assert.IsFalse(NetworkClient.active, "Client should not be active at this point"); + isDone = true; + } + } + + [UnityTest] + public IEnumerator NetworkManagerStopServerAndClientWorksTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + GameObject nmObject = new GameObject(); + TestNetworkManagerStop nmanager = nmObject.AddComponent(); + + nmanager.networkAddress = "localhost"; + nmanager.StartServer(); + nmanager.StartClient(); + yield return null; + + Assert.IsTrue(NetworkServer.active, "Server is not started"); + Assert.IsTrue(NetworkClient.active, "Client is not started"); + yield return null; + + while (!nmanager.isDone) + { + yield return null; + } + + NetworkManager.singleton.StopServer(); + NetworkManager.singleton.StopClient(); + + Object.Destroy(nmObject); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks/NetworkManagerStopServerAndClientWorks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks/NetworkManagerStopServerAndClientWorks.cs.meta new file mode 100644 index 00000000..08fbf07d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerStopServerAndClientWorks/NetworkManagerStopServerAndClientWorks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 05fdfba5fd7efe6488c121868e7446cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes.meta new file mode 100644 index 00000000..c404c745 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3a9c7ac5a41d4507bcb6430ef4afdb0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes/NetworkManagerWorksWithNullScenesTest.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes/NetworkManagerWorksWithNullScenesTest.cs new file mode 100644 index 00000000..f1a56b7c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes/NetworkManagerWorksWithNullScenesTest.cs @@ -0,0 +1,38 @@ +using UnityEngine; +using UnityEngine.TestTools; +using NUnit.Framework; +using System.Collections; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkManagerWorksWithNullScenesTest +{ + [UnityTest] + public IEnumerator TestNetworkManageNullScenes() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + var networkManagerObj = new GameObject(); + NetworkManager nmanager = networkManagerObj.AddComponent(); + nmanager.playerPrefab = Resources.Load("CleanPlayerPrefab", typeof(GameObject)) as GameObject; + + nmanager.offlineScene = null; + nmanager.onlineScene = null; + + NetworkServer.Reset(); + + if (!nmanager.isNetworkActive) + { + nmanager.StartHost(); + yield return null; + } + + Assert.IsTrue(nmanager.isNetworkActive, + "Network is not active."); + + nmanager.StopHost(); + Object.Destroy(networkManagerObj); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes/NetworkManagerWorksWithNullScenesTest.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes/NetworkManagerWorksWithNullScenesTest.cs.meta new file mode 100644 index 00000000..0912b8fd --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkManagerWorksWithNullScenes/NetworkManagerWorksWithNullScenesTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 45ed083f428ea4c24ae9a58af9bc4109 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork.meta new file mode 100644 index 00000000..cf3cb854 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d316c8450f9ba4076a7904c25e1d0398 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessages.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessages.cs new file mode 100644 index 00000000..4568ddbc --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessages.cs @@ -0,0 +1,88 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class MessageTypes +{ + public const short CSHelloMsgType = MsgType.Highest + 1; + public const short CSUpdateMsgType = MsgType.Highest + 2; + public const short SCUpdateMsgType = MsgType.Highest + 3; +} + +public class CSHelloMessage : MessageBase +{ + public int connectionID; + + public CSHelloMessage() {} + public CSHelloMessage(int ID) { this.connectionID = ID; } + + public override void Deserialize(NetworkReader reader) + { + connectionID = reader.ReadInt32(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.StartMessage(MessageTypes.CSHelloMsgType); + writer.Write(connectionID); + writer.FinishMessage(); + } +} + +public class CSUpdateMessage : MessageBase +{ + public byte ID; + public Vector3 position; + + public CSUpdateMessage() {} + public CSUpdateMessage(byte ID, Vector3 position) + { + this.ID = ID; + this.position = position; + } + + public override void Deserialize(NetworkReader reader) + { + ID = reader.ReadByte(); + position = reader.ReadVector3(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.StartMessage(MessageTypes.CSUpdateMsgType); + writer.Write(ID); + writer.Write(position); + writer.FinishMessage(); + } +} + +public class SCUpdateMessage : MessageBase +{ + public byte ID; + public bool status; + + public SCUpdateMessage() {} + public SCUpdateMessage(byte ID, bool status) + { + this.ID = ID; + this.status = status; + } + + public override void Deserialize(NetworkReader reader) + { + ID = reader.ReadByte(); + status = reader.ReadBoolean(); + } + + public override void Serialize(NetworkWriter writer) + { + writer.StartMessage(MessageTypes.SCUpdateMsgType); + writer.Write(ID); + writer.Write(status); + writer.FinishMessage(); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessages.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessages.cs.meta new file mode 100644 index 00000000..562c7308 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessages.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5322ee280b9494e4c84bf8175393aff9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessagesWorkTest.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessagesWorkTest.cs new file mode 100644 index 00000000..07c9426f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessagesWorkTest.cs @@ -0,0 +1,95 @@ +using NUnit.Framework; +using System; +using System.Collections; +using UnityEngine; +using UnityEngine.TestTools; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkMessagesWorkTest +{ + string m_ip = "127.0.0.1"; + int m_port0 = 8888; + + bool isDone = false; + NetworkClient client; + + [UnityTest] + public IEnumerator NetworkMessagesWorkCheck() + { + NetworkServer.Reset(); + + ConnectionConfig connectionConfig = new ConnectionConfig(); + connectionConfig.AddChannel(QosType.Reliable); + connectionConfig.AddChannel(QosType.AllCostDelivery); + connectionConfig.AcksType = ConnectionAcksType.Acks96; + NetworkServer.Configure(connectionConfig, 4); + + NetworkServer.RegisterHandler(MessageTypes.CSUpdateMsgType, OnClientUpdate); + NetworkServer.RegisterHandler(MsgType.Connect, OnClientConnect); + NetworkServer.RegisterHandler(MessageTypes.CSHelloMsgType, OnClientHello); + + bool isServerStarted = NetworkServer.Listen(m_ip, m_port0); + Assert.IsTrue(isServerStarted, "Server is not started."); + + client = new NetworkClient(); + client.Configure(connectionConfig, 4); + client.Connect(m_ip, m_port0); + while (!client.isConnected) + { + yield return null; + } + + client.RegisterHandler(MessageTypes.SCUpdateMsgType, OnServerUpdate); + + CSHelloMessage msg = new CSHelloMessage(client.connection.connectionId); + client.Send(MessageTypes.CSHelloMsgType, msg); + + while (!isDone) + { + yield return null; + } + } + + public void SendServerUpdateMessage() + { + NetworkServer.SendToAll(MessageTypes.SCUpdateMsgType, + new SCUpdateMessage((byte)NetworkServer.serverHostId, + NetworkServer.active)); + } + + public void SendClientUpdateMessage(NetworkClient client) + { + Vector3 vec = new Vector3(1, 1, 1); + client.Send(MessageTypes.CSUpdateMsgType, + new CSUpdateMessage((byte)client.connection.hostId, vec)); + } + + public void OnClientHello(NetworkMessage msg) + { + Assert.AreEqual(msg.msgType, MessageTypes.CSHelloMsgType); + SendServerUpdateMessage(); + } + + public void OnClientConnect(NetworkMessage msg) + { + Assert.AreEqual(msg.msgType, MsgType.Connect); + } + + public void OnServerUpdate(NetworkMessage msg) + { + Assert.AreEqual(msg.msgType, MessageTypes.SCUpdateMsgType); + SendClientUpdateMessage(client); + } + + public void OnClientUpdate(NetworkMessage msg) + { + Assert.AreEqual(msg.msgType, MessageTypes.CSUpdateMsgType); + msg.reader.SeekZero(); + Vector3 recVecor = msg.ReadMessage().position; + Vector3 vec = new Vector3(1, 1, 1); + Assert.AreEqual(vec, recVecor); + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessagesWorkTest.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessagesWorkTest.cs.meta new file mode 100644 index 00000000..3f26ac7b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMessagesWork/NetworkMessagesWorkTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c564a816e615045b99d3dea31adf2563 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks.meta new file mode 100644 index 00000000..44e92a72 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8b486952aeb5449cbf24d2c1b496bd5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/NetworkMigrationWorksTest.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/NetworkMigrationWorksTest.cs new file mode 100644 index 00000000..0aae67d8 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/NetworkMigrationWorksTest.cs @@ -0,0 +1,69 @@ +using NUnit.Framework; +using System; +using System.Collections; +using UnityEngine; +using UnityEngine.TestTools; +using UnityEngine.Networking; +using UnityEngine.Networking.NetworkSystem; + +#pragma warning disable 618 +public class NetworkMigrationWorksTest +{ + private GameObject netManagerObj; + NetworkManager networkManager; + NetworkMigrationManager networkMigrManager; + private NetworkClient client; + int _port = 8888; + string _ip = "127.0.0.1"; + + [UnityTest] + public IEnumerator NetworkMigrationWorksCheck() + { + NetworkServer.Reset(); + + SetupNetwork(); + + yield return new WaitUntil(() => networkMigrManager.peers != null); + + networkManager.StopServer(); + + PeerInfoMessage newHostInfo; + bool youAreNewHost; + Assert.IsTrue( + networkMigrManager.FindNewHost(out newHostInfo, out youAreNewHost), + "New host was not found."); + + Assert.IsTrue( + client.ReconnectToNewHost(newHostInfo.address, newHostInfo.port), + "Old client did not reconnect to new host."); + + yield return null; + UnityEngine.Object.Destroy(netManagerObj); + } + + public void SetupNetwork() + { + netManagerObj = new GameObject(); + networkManager = netManagerObj.AddComponent(); + networkManager.playerPrefab = Resources.Load("PlayerGameObject", typeof(GameObject)) as GameObject; + + Assert.IsNotNull(networkManager.playerPrefab); + + networkManager.customConfig = true; + networkManager.networkAddress = _ip; + networkManager.networkPort = _port; + networkManager.autoCreatePlayer = false; + + networkMigrManager = netManagerObj.AddComponent(); + Assert.IsTrue(networkManager.StartServer(), "Server was not started!"); + networkManager.SetupMigrationManager(networkMigrManager); + + client = networkManager.StartClient(); + client.Connect(_ip, _port); + Assert.IsNull(client.connection, "Client is not connected"); + + networkMigrManager.Initialize(client, networkManager.matchInfo); + networkMigrManager.SendPeerInfo(); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/NetworkMigrationWorksTest.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/NetworkMigrationWorksTest.cs.meta new file mode 100644 index 00000000..f4ed463c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/NetworkMigrationWorksTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ff9c8b6ebcca04b8fb14b2f9454ba5b8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources.meta new file mode 100644 index 00000000..7198b762 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a3e5ef27ca9344ccba2b572a1ff7e9a6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources/PlayerGameObject.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources/PlayerGameObject.prefab new file mode 100644 index 00000000..b5ef4ccc --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources/PlayerGameObject.prefab @@ -0,0 +1,74 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1600669219956046} + m_IsPrefabParent: 1 +--- !u!1 &1600669219956046 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4779181925345128} + - component: {fileID: 114606075425375630} + m_Layer: 0 + m_Name: PlayerGameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4779181925345128 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1600669219956046} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114606075425375630 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1600669219956046} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 234 + i1: 158 + i2: 182 + i3: 71 + i4: 221 + i5: 1 + i6: 4 + i7: 190 + i8: 232 + i9: 175 + i10: 63 + i11: 36 + i12: 58 + i13: 50 + i14: 5 + i15: 86 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 1 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources/PlayerGameObject.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources/PlayerGameObject.prefab.meta new file mode 100644 index 00000000..0d33214d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkMigrationWorks/Resources/PlayerGameObject.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea9eb647dd0104bee8af3f243a320556 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork.meta new file mode 100644 index 00000000..51812af4 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 63ff0fb03e8d84e1193b307c3c1ac80e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork/NetworkObserversObjectsWork.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork/NetworkObserversObjectsWork.cs new file mode 100644 index 00000000..98208742 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork/NetworkObserversObjectsWork.cs @@ -0,0 +1,69 @@ +using NUnit.Framework; +using System.Collections; +using UnityEngine; +using UnityEngine.TestTools; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class NetworkObserversObjectsWork : SpawningTestBase +{ + private GameObject observerFar, observerClose; + bool isDone = false; + + [UnityTest] + public IEnumerator NetworkObserversObjectsCheck() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + StartLocalClient(); + + observerClose = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + observerClose.AddComponent(); + observerClose.gameObject.name = "RockClose"; + + observerFar = (GameObject)Instantiate(rockPrefab, new Vector3(100, 100, 100), Quaternion.identity); + observerFar.AddComponent(); + observerFar.gameObject.name = "RockFar"; + + NetworkServer.Spawn(observerClose); + NetworkServer.Spawn(observerFar); + + while (!isDone) + { + yield return null; + } + + ClientScene.DestroyAllClientObjects(); + yield return null; + NetworkServer.Destroy(observerClose); + NetworkServer.Destroy(observerFar); + } + + public override void OnServerReady(GameObject player) + { + // add physics collider to player so proximity check will find it + player.AddComponent(); + var box = player.AddComponent(); + box.bounds.SetMinMax(Vector3.zero, new Vector3(1, 1, 1)); + + // rebuild observer lists + observerClose.GetComponent().RebuildObservers(false); + observerFar.GetComponent().RebuildObservers(false); + } + + public override void OnClientReady(short playerId) + { + Assert.AreEqual(1, observerClose.GetComponent().observers.Count, "Player sees observerClose object as it is close"); + Assert.AreEqual(0, observerFar.GetComponent().observers.Count, "Player doesn't see observerFar object as it is far away"); + + observerFar.transform.position = Vector3.zero; + observerFar.GetComponent().RebuildObservers(false); + Assert.AreEqual(1, observerFar.GetComponent().observers.Count, "Player sees observerFar object as it is close now"); + + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork/NetworkObserversObjectsWork.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork/NetworkObserversObjectsWork.cs.meta new file mode 100644 index 00000000..4214e69c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/NetworkObserversObjectsWork/NetworkObserversObjectsWork.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: afcb8f2cf34994cef9a2d921c80f0fc0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState.meta new file mode 100644 index 00000000..199a7d00 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 095cab0d74417904396ef060bbab36a7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState/PlayWithReadyState.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState/PlayWithReadyState.cs new file mode 100644 index 00000000..bf3a5c84 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState/PlayWithReadyState.cs @@ -0,0 +1,216 @@ +using System.Collections; +using System.Collections.Generic; +using System; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; +using UnityEngine.Networking.NetworkSystem; + +#pragma warning disable 618 +public class PlayWithReadyState +{ + public bool isDone = false; + static NetworkHash128 playerHash = NetworkHash128.Parse("abcd1"); + NetworkClient client1; + NetworkClient client2; + + const short MsgId1 = 99; + const short MsgId2 = 98; + const short MsgId3 = 97; + const short FromClientMsg1 = 95; + const short FromClientMsg2 = 94; + const short FromClientMsg3 = 93; + + public int numClientsConnected = 0; + + public int msg1Count = 0; + public int msg3Count = 0; + + public List actualListOfCallbacks = new List(); + public List resultListOfCallbacks = new List() + { + "CheckClientsConnected:1", + "CheckClientsConnected:2", + "OnServerFromClientMsg1", + "Msg1", + "Msg1", + "OnServerFromClientMsg2", + "Msg3", + "Msg3", + "OnServerFromClientMsg3" + }; + + [UnityTest] + public IEnumerator PlayWithReadyStateTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + GameObject nmObject = new GameObject(); + PlayWithReadyStateNetworkManager nmanager = nmObject.AddComponent(); + nmanager.networkAddress = "localhost"; + + ClientScene.RegisterSpawnHandler(playerHash, PlayWithReadyStateNetworkManager.OnSpawnPlayer, PlayWithReadyStateNetworkManager.OnUnSpawnPlayer); + + NetworkServer.RegisterHandler(FromClientMsg1, OnServerFromClientMsg1); + NetworkServer.RegisterHandler(FromClientMsg2, OnServerFromClientMsg2); + NetworkServer.RegisterHandler(FromClientMsg3, OnServerFromClientMsg3); + + nmanager.StartServer(); + client1 = nmanager.StartClient(); + client1.RegisterHandler(MsgType.Connect, OnClient1Connect); + client1.RegisterHandler(MsgId1, OnMsg1); + client1.RegisterHandler(MsgId2, OnMsg2); + client1.RegisterHandler(MsgId3, OnMsg3); + + // client2 is never ready, so should not recieve msgs + client2 = new NetworkClient(); + client2.RegisterHandler(MsgType.Connect, OnClient2Connect); + client2.RegisterHandler(MsgId1, OnMsg1); + client2.RegisterHandler(MsgId2, OnMsg2); + client2.RegisterHandler(MsgId3, OnMsg3); + client2.RegisterHandler(MsgType.NotReady, OnNotReady); + + Assert.IsTrue(NetworkServer.active, "Server is not started"); + Assert.IsTrue(NetworkClient.active, "Client is not started"); + + client2.Connect(NetworkManager.singleton.networkAddress, NetworkManager.singleton.networkPort); + + yield return null; + + while (!isDone) + { + yield return null; + } + + CollectionAssert.AreEqual(resultListOfCallbacks, actualListOfCallbacks, "Wrong order of callbacks or some callback is missing"); + + nmanager.StopServer(); + nmanager.StopClient(); + NetworkClient.ShutdownAll(); + UnityEngine.Object.Destroy(nmObject); + } + + //need to handle this message as it is sent by NetworkManager, + //but it can appear with delay - so we can't guarantee order + void OnNotReady(NetworkMessage netMsg) + { + } + + // Server Flow + // This block results in Msg1 printed twice (sent to same client twice) + void OnServerFromClientMsg1(NetworkMessage netMsg) + { + // both clients are connected now + actualListOfCallbacks.Add("OnServerFromClientMsg1"); + NetworkServer.SetClientReady(netMsg.conn); + + // this will go to only 1 client + NetworkServer.SendToReady(null, MsgId1, new EmptyMessage()); + + // this will go to only 1 client + var tm = NetworkManager.singleton as PlayWithReadyStateNetworkManager; + NetworkServer.SendToReady(tm.thePlayer, MsgId1, new EmptyMessage()); + } + + // This block results in Msg2 printed twice (sent to both clients) + void OnServerFromClientMsg2(NetworkMessage netMsg) + { + actualListOfCallbacks.Add("OnServerFromClientMsg2"); + NetworkServer.SetAllClientsNotReady(); + + // clients should NOT receive this + NetworkServer.SendToReady(null, MsgId2, new EmptyMessage()); + + // both clients SHOULD receive this + NetworkServer.SendToAll(MsgId3, new EmptyMessage()); + } + + private void OnServerFromClientMsg3(NetworkMessage netMsg) + { + actualListOfCallbacks.Add("OnServerFromClientMsg3"); + isDone = true; + } + + // Client Flow + void OnClient1Connect(NetworkMessage netMsg) + { + numClientsConnected += 1; + CheckClientsConnected(netMsg.conn); + } + + void OnClient2Connect(NetworkMessage netMsg) + { + numClientsConnected += 1; + CheckClientsConnected(netMsg.conn); + } + + void CheckClientsConnected(NetworkConnection conn) + { + actualListOfCallbacks.Add("CheckClientsConnected:" + numClientsConnected); + if (numClientsConnected == 2) + { + conn.Send(FromClientMsg1, new EmptyMessage()); + } + } + + void OnMsg1(NetworkMessage netMsg) + { + actualListOfCallbacks.Add("Msg1"); + msg1Count += 1; + if (msg1Count == 2) + { + netMsg.conn.Send(FromClientMsg2, new EmptyMessage()); + } + } + + void OnMsg2(NetworkMessage netMsg) + { + // should not ever be received! + Assert.Fail("This message should not be received: Msg2 " + netMsg.conn.connectionId); + } + + void OnMsg3(NetworkMessage netMsg) + { + actualListOfCallbacks.Add("Msg3"); + msg3Count += 1; + if (msg3Count == 2) + { + netMsg.conn.Send(FromClientMsg3, new EmptyMessage()); + } + } + + public class PlayWithReadyStateNetworkManager : NetworkManager + { + public GameObject thePlayer; + + public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) + { + thePlayer = (GameObject)OnSpawnPlayer(Vector3.zero, playerHash); + NetworkServer.AddPlayerForConnection(conn, thePlayer, playerControllerId, playerHash); + } + + public static GameObject OnSpawnPlayer(Vector3 pos, NetworkHash128 assetId) + { + try + { + GameObject thePlayer = new GameObject(); + thePlayer.name = "PlayWithReadyStatePrefab"; + thePlayer.AddComponent(); + return thePlayer; + } + catch (Exception e) + { + Assert.Fail("Spawn exception " + e); + return null; + } + } + + public static void OnUnSpawnPlayer(GameObject unspawned) + { + Destroy(unspawned); + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState/PlayWithReadyState.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState/PlayWithReadyState.cs.meta new file mode 100644 index 00000000..48352d53 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/PlayWithReadyState/PlayWithReadyState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9f9cb0f2515a7444e9b12f17b1b8dccc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly.meta new file mode 100644 index 00000000..534f1121 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8891212d87dfff04ab9521e0e9a44619 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly/ReadyStateBehavesCorrectly.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly/ReadyStateBehavesCorrectly.cs new file mode 100644 index 00000000..b5e1d46c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly/ReadyStateBehavesCorrectly.cs @@ -0,0 +1,108 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking.NetworkSystem; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class ReadyStateBehavesCorrectly +{ + int kListenPort = 7073; + bool isDone = false; + ConnectionConfig config; + NetworkClient myClient; + NetworkClient localClient; + + private int numClientConnects = 0; + private bool doDisconnect = false; + + [UnityTest] + public IEnumerator ReadyStateBehavesCorrectlyTest() + { + NetworkServer.Reset(); + NetworkClient.ShutdownAll(); + + NetworkServer.RegisterHandler(MsgType.Ready, OnServerReady); + + config = new ConnectionConfig(); + config.AddChannel(QosType.ReliableSequenced); + config.AddChannel(QosType.Unreliable); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++kListenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + + myClient = new NetworkClient(); + if (!myClient.Configure(config, 10)) + { + Assert.Fail("Client configure failed"); + } + + myClient.RegisterHandler(MsgType.Connect, OnClient1Connected); + myClient.RegisterHandler(MsgType.Disconnect, OnClient1Disconnected); + myClient.Connect("127.0.0.1", kListenPort); + + while (!isDone) + { + yield return null; + if (doDisconnect) + { + ClientDisconnect(); + doDisconnect = false; + } + } + } + + public void OnServerReady(NetworkMessage netMsg) + { + if (numClientConnects == 1) + { + // server disconnects client + netMsg.conn.Disconnect(); + } + else if (numClientConnects <= 3) + { + // client will disconnect from server + doDisconnect = true; + } + } + + public void OnClient1Connected(NetworkMessage netMsg) + { + numClientConnects += 1; + ClientScene.Ready(netMsg.conn); + } + + public void OnClient1Disconnected(NetworkMessage netMsg) + { + //is called only for clients 1 and 3 + if (numClientConnects == 1) + { + myClient.Connect("127.0.0.1", kListenPort); + } + + if (numClientConnects == 3) + { + isDone = true; + } + } + + private void ClientDisconnect() + { + if (numClientConnects == 2) + { + myClient.Disconnect(); + localClient = ClientScene.ConnectLocalServer(); + localClient.RegisterHandler(MsgType.Connect, OnClient1Connected); + localClient.RegisterHandler(MsgType.Disconnect, OnClient1Disconnected); + } + else //for numClientConnects == 3 + { + localClient.Disconnect(); + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly/ReadyStateBehavesCorrectly.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly/ReadyStateBehavesCorrectly.cs.meta new file mode 100644 index 00000000..bc6d3cc0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/ReadyStateBehavesCorrectly/ReadyStateBehavesCorrectly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e74104454fac7cc4ab699188b28ffe3a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts.meta new file mode 100644 index 00000000..fea03143 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a8b2c21e0855323449ffaf0a63effc20 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts/RecursionDetectionHandlesComplexScripts.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts/RecursionDetectionHandlesComplexScripts.cs new file mode 100644 index 00000000..599f5a97 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts/RecursionDetectionHandlesComplexScripts.cs @@ -0,0 +1,415 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class RecursionDetectionHandlesComplexScripts +{ + [UnityTest] + public IEnumerator RecursionDetectionHandlesComplexScriptsTest() + { + NetworkServer.Reset(); + NetworkClient.ShutdownAll(); + + GameObject go = new GameObject(); + go.name = "objectWithComplexScript"; + go.AddComponent(); + yield return null; + Assert.IsNotNull(GameObject.Find("objectWithComplexScript")); + yield return null; + + Object.Destroy(go); + } + + // Script with MANY MANY network attributes. Checks that the recursion detection in UNetWeaver wont generate a false positive on complex scripts. + public partial class UNetRecursionBehaviour : NetworkBehaviour + { + // 31 syncvars + [SyncVar] + public int var000; + [SyncVar] + public int var001; + [SyncVar] + public int var002; + [SyncVar] + public int var003; + [SyncVar] + public int var004; + [SyncVar] + public int var005; + [SyncVar] + public int var006; + [SyncVar] + public int var007; + [SyncVar] + public int var008; + [SyncVar] + public int var009; + + [SyncVar] + public int var010; + [SyncVar] + public int var011; + [SyncVar] + public int var012; + [SyncVar] + public int var013; + [SyncVar] + public int var014; + [SyncVar] + public int var015; + [SyncVar] + public int var016; + [SyncVar] + public int var017; + [SyncVar] + public int var018; + [SyncVar] + public int var019; + + [SyncVar] + public int var020; + [SyncVar] + public int var021; + [SyncVar] + public int var022; + [SyncVar] + public int var023; + [SyncVar] + public int var024; + [SyncVar] + public int var025; + [SyncVar] + public int var026; + [SyncVar] + public int var027; + [SyncVar] + public int var028; + [SyncVar] + public int var029; + + [SyncVar] + public int var030; + + // 50 Commands + [Command] + void CmdTest000(int p1, string p2) {} + [Command] + void CmdTest001(int p1, string p2) {} + [Command] + void CmdTest002(int p1, string p2) {} + [Command] + void CmdTest003(int p1, string p2) {} + [Command] + void CmdTest004(int p1, string p2) {} + [Command] + void CmdTest005(int p1, string p2) {} + [Command] + void CmdTest006(int p1, string p2) {} + [Command] + void CmdTest007(int p1, string p2) {} + [Command] + void CmdTest008(int p1, string p2) {} + [Command] + void CmdTest009(int p1, string p2) {} + + [Command] + void CmdTest010(int p1, string p2) {} + [Command] + void CmdTest011(int p1, string p2) {} + [Command] + void CmdTest012(int p1, string p2) {} + [Command] + void CmdTest013(int p1, string p2) {} + [Command] + void CmdTest014(int p1, string p2) {} + [Command] + void CmdTest015(int p1, string p2) {} + [Command] + void CmdTest016(int p1, string p2) {} + [Command] + void CmdTest017(int p1, string p2) {} + [Command] + void CmdTest018(int p1, string p2) {} + [Command] + void CmdTest019(int p1, string p2) {} + + [Command] + void CmdTest020(int p1, string p2) {} + [Command] + void CmdTest021(int p1, string p2) {} + [Command] + void CmdTest022(int p1, string p2) {} + [Command] + void CmdTest023(int p1, string p2) {} + [Command] + void CmdTest024(int p1, string p2) {} + [Command] + void CmdTest025(int p1, string p2) {} + [Command] + void CmdTest026(int p1, string p2) {} + [Command] + void CmdTest027(int p1, string p2) {} + [Command] + void CmdTest028(int p1, string p2) {} + [Command] + void CmdTest029(int p1, string p2) {} + + [Command] + void CmdTest030(int p1, string p2) {} + [Command] + void CmdTest031(int p1, string p2) {} + [Command] + void CmdTest032(int p1, string p2) {} + [Command] + void CmdTest033(int p1, string p2) {} + [Command] + void CmdTest034(int p1, string p2) {} + [Command] + void CmdTest035(int p1, string p2) {} + [Command] + void CmdTest036(int p1, string p2) {} + [Command] + void CmdTest037(int p1, string p2) {} + [Command] + void CmdTest038(int p1, string p2) {} + [Command] + void CmdTest039(int p1, string p2) {} + + [Command] + void CmdTest040(int p1, string p2) {} + [Command] + void CmdTest041(int p1, string p2) {} + [Command] + void CmdTest042(int p1, string p2) {} + [Command] + void CmdTest043(int p1, string p2) {} + [Command] + void CmdTest044(int p1, string p2) {} + [Command] + void CmdTest045(int p1, string p2) {} + [Command] + void CmdTest046(int p1, string p2) {} + [Command] + void CmdTest047(int p1, string p2) {} + [Command] + void CmdTest048(int p1, string p2) {} + [Command] + void CmdTest049(int p1, string p2) {} + + // 100 ClientRpcs + + [ClientRpc] + void RpcTest000(int p1, string p2) {} + [ClientRpc] + void RpcTest001(int p1, string p2) {} + [ClientRpc] + void RpcTest002(int p1, string p2) {} + [ClientRpc] + void RpcTest003(int p1, string p2) {} + [ClientRpc] + void RpcTest004(int p1, string p2) {} + [ClientRpc] + void RpcTest005(int p1, string p2) {} + [ClientRpc] + void RpcTest006(int p1, string p2) {} + [ClientRpc] + void RpcTest007(int p1, string p2) {} + [ClientRpc] + void RpcTest008(int p1, string p2) {} + [ClientRpc] + void RpcTest009(int p1, string p2) {} + + [ClientRpc] + void RpcTest010(int p1, string p2) {} + [ClientRpc] + void RpcTest011(int p1, string p2) {} + [ClientRpc] + void RpcTest012(int p1, string p2) {} + [ClientRpc] + void RpcTest013(int p1, string p2) {} + [ClientRpc] + void RpcTest014(int p1, string p2) {} + [ClientRpc] + void RpcTest015(int p1, string p2) {} + [ClientRpc] + void RpcTest016(int p1, string p2) {} + [ClientRpc] + void RpcTest017(int p1, string p2) {} + [ClientRpc] + void RpcTest018(int p1, string p2) {} + [ClientRpc] + void RpcTest019(int p1, string p2) {} + + [ClientRpc] + void RpcTest020(int p1, string p2) {} + [ClientRpc] + void RpcTest021(int p1, string p2) {} + [ClientRpc] + void RpcTest022(int p1, string p2) {} + [ClientRpc] + void RpcTest023(int p1, string p2) {} + [ClientRpc] + void RpcTest024(int p1, string p2) {} + [ClientRpc] + void RpcTest025(int p1, string p2) {} + [ClientRpc] + void RpcTest026(int p1, string p2) {} + [ClientRpc] + void RpcTest027(int p1, string p2) {} + [ClientRpc] + void RpcTest028(int p1, string p2) {} + [ClientRpc] + void RpcTest029(int p1, string p2) {} + + [ClientRpc] + void RpcTest030(int p1, string p2) {} + [ClientRpc] + void RpcTest031(int p1, string p2) {} + [ClientRpc] + void RpcTest032(int p1, string p2) {} + [ClientRpc] + void RpcTest033(int p1, string p2) {} + [ClientRpc] + void RpcTest034(int p1, string p2) {} + [ClientRpc] + void RpcTest035(int p1, string p2) {} + [ClientRpc] + void RpcTest036(int p1, string p2) {} + [ClientRpc] + void RpcTest037(int p1, string p2) {} + [ClientRpc] + void RpcTest038(int p1, string p2) {} + [ClientRpc] + void RpcTest039(int p1, string p2) {} + + [ClientRpc] + void RpcTest040(int p1, string p2) {} + [ClientRpc] + void RpcTest041(int p1, string p2) {} + [ClientRpc] + void RpcTest042(int p1, string p2) {} + [ClientRpc] + void RpcTest043(int p1, string p2) {} + [ClientRpc] + void RpcTest044(int p1, string p2) {} + [ClientRpc] + void RpcTest045(int p1, string p2) {} + [ClientRpc] + void RpcTest046(int p1, string p2) {} + [ClientRpc] + void RpcTest047(int p1, string p2) {} + [ClientRpc] + void RpcTest048(int p1, string p2) {} + [ClientRpc] + void RpcTest049(int p1, string p2) {} + + [ClientRpc] + void RpcTest100(int p1, string p2) {} + [ClientRpc] + void RpcTest101(int p1, string p2) {} + [ClientRpc] + void RpcTest102(int p1, string p2) {} + [ClientRpc] + void RpcTest103(int p1, string p2) {} + [ClientRpc] + void RpcTest104(int p1, string p2) {} + [ClientRpc] + void RpcTest105(int p1, string p2) {} + [ClientRpc] + void RpcTest106(int p1, string p2) {} + [ClientRpc] + void RpcTest107(int p1, string p2) {} + [ClientRpc] + void RpcTest108(int p1, string p2) {} + [ClientRpc] + void RpcTest109(int p1, string p2) {} + + [ClientRpc] + void RpcTest110(int p1, string p2) {} + [ClientRpc] + void RpcTest111(int p1, string p2) {} + [ClientRpc] + void RpcTest112(int p1, string p2) {} + [ClientRpc] + void RpcTest113(int p1, string p2) {} + [ClientRpc] + void RpcTest114(int p1, string p2) {} + [ClientRpc] + void RpcTest115(int p1, string p2) {} + [ClientRpc] + void RpcTest116(int p1, string p2) {} + [ClientRpc] + void RpcTest117(int p1, string p2) {} + [ClientRpc] + void RpcTest118(int p1, string p2) {} + [ClientRpc] + void RpcTest119(int p1, string p2) {} + + [ClientRpc] + void RpcTest120(int p1, string p2) {} + [ClientRpc] + void RpcTest121(int p1, string p2) {} + [ClientRpc] + void RpcTest122(int p1, string p2) {} + [ClientRpc] + void RpcTest123(int p1, string p2) {} + [ClientRpc] + void RpcTest124(int p1, string p2) {} + [ClientRpc] + void RpcTest125(int p1, string p2) {} + [ClientRpc] + void RpcTest126(int p1, string p2) {} + [ClientRpc] + void RpcTest127(int p1, string p2) {} + [ClientRpc] + void RpcTest128(int p1, string p2) {} + [ClientRpc] + void RpcTest129(int p1, string p2) {} + + [ClientRpc] + void RpcTest130(int p1, string p2) {} + [ClientRpc] + void RpcTest131(int p1, string p2) {} + [ClientRpc] + void RpcTest132(int p1, string p2) {} + [ClientRpc] + void RpcTest133(int p1, string p2) {} + [ClientRpc] + void RpcTest134(int p1, string p2) {} + [ClientRpc] + void RpcTest135(int p1, string p2) {} + [ClientRpc] + void RpcTest136(int p1, string p2) {} + [ClientRpc] + void RpcTest137(int p1, string p2) {} + [ClientRpc] + void RpcTest138(int p1, string p2) {} + [ClientRpc] + void RpcTest139(int p1, string p2) {} + + [ClientRpc] + void RpcTest140(int p1, string p2) {} + [ClientRpc] + void RpcTest141(int p1, string p2) {} + [ClientRpc] + void RpcTest142(int p1, string p2) {} + [ClientRpc] + void RpcTest143(int p1, string p2) {} + [ClientRpc] + void RpcTest144(int p1, string p2) {} + [ClientRpc] + void RpcTest145(int p1, string p2) {} + [ClientRpc] + void RpcTest146(int p1, string p2) {} + [ClientRpc] + void RpcTest147(int p1, string p2) {} + [ClientRpc] + void RpcTest148(int p1, string p2) {} + [ClientRpc] + void RpcTest149(int p1, string p2) {} + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts/RecursionDetectionHandlesComplexScripts.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts/RecursionDetectionHandlesComplexScripts.cs.meta new file mode 100644 index 00000000..3e64b8ad --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/RecursionDetectionHandlesComplexScripts/RecursionDetectionHandlesComplexScripts.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 75be83ad764e2e649a7267bce9704cac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks.meta new file mode 100644 index 00000000..c8ad8558 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 851761cc03791df40896158a9d9d9e6b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks/SettingNetworkStartPositionWorks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks/SettingNetworkStartPositionWorks.cs new file mode 100644 index 00000000..e23f832a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks/SettingNetworkStartPositionWorks.cs @@ -0,0 +1,58 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SettingNetworkStartPositionWorks +{ + public static Vector3 startpos = new Vector3(1.4f, 6.3f, 6.23f); + + public class TestNetworkManagerStartPos : NetworkManager + { + public bool isDone = false; + + public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) + { + base.OnServerAddPlayer(conn, playerControllerId); + StringAssert.IsMatch(conn.playerControllers[0].gameObject.transform.position.ToString(), startpos.ToString()); + isDone = true; + } + } + + [UnityTest] + public IEnumerator SettingNetworkStartPositionWorksTest() + { + NetworkServer.Reset(); + NetworkClient.ShutdownAll(); + + GameObject nmObject = new GameObject(); + TestNetworkManagerStartPos nmanager = nmObject.AddComponent(); + nmanager.playerPrefab = Resources.Load("CleanPlayerPrefab", typeof(GameObject)) as GameObject; + nmanager.networkAddress = "localhost"; + + var start = new GameObject(); + start.transform.position = startpos; + start.AddComponent(); + + nmanager.StartServer(); + nmanager.StartClient(); + yield return null; + + Assert.IsTrue(NetworkServer.active, "Server is not started"); + Assert.IsTrue(NetworkClient.active, "Client is not started"); + yield return null; + + while (!nmanager.isDone) + { + yield return null; + } + + NetworkManager.singleton.StopServer(); + NetworkManager.singleton.StopClient(); + + Object.Destroy(nmObject); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks/SettingNetworkStartPositionWorks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks/SettingNetworkStartPositionWorks.cs.meta new file mode 100644 index 00000000..baea30bf --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SettingNetworkStartPositionWorks/SettingNetworkStartPositionWorks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f9b4bb5a735ad242be1f88e4466a9cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests.meta new file mode 100644 index 00000000..86ea9415 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c6c47d586eeea3941b0709382fd67c57 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass.meta new file mode 100644 index 00000000..8bf85f58 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5bdb0cd123d3d7741a599fdad292594c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass/SpawningTestBase.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass/SpawningTestBase.cs new file mode 100644 index 00000000..df71b658 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass/SpawningTestBase.cs @@ -0,0 +1,153 @@ +using NUnit.Framework; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SpawningTestBase : MonoBehaviour +{ + // CreateNamedPrefab - simply use prefabs in Resources folder + + int listenPort = 7073; + private const short kReadyMsgId = 55; + public const short kStringMsgId = 56; + + // One player per client by default + int m_PlayerCount = 1; + protected NetworkClient myClient; + public GameObject playerObj; + + protected static GameObject playerPrefab; + protected static GameObject rockPrefab; + public static int numStartServer = 0; + public static int numStartClient = 0; + public static int numDestroyClient = 0; + + public static void IncrementStartServer() + { + numStartServer += 1; + } + + public static void IncrementStartClient() + { + numStartClient += 1; + } + + public static void IncrementDestroyClient() + { + numDestroyClient += 1; + } + + public void SetupPrefabs() + { + playerPrefab = Resources.Load("SpawningBase_PlayerPrefab", typeof(GameObject)) as GameObject; + rockPrefab = Resources.Load("SpawningBase_SpawnableObjectPrefab", typeof(GameObject)) as GameObject; + + numStartServer = 0; + numStartClient = 0; + numDestroyClient = 0; + } + + public void StartServer() + { + NetworkServer.Reset(); + NetworkServer.RegisterHandler(MsgType.Disconnect, OnServerDisconnected); + NetworkServer.RegisterHandler(MsgType.AddPlayer, OnAddPlayer); + NetworkServer.RegisterHandler(kStringMsgId, OnServerStringMessage); + + int retries = 0; + while (!NetworkServer.Listen("127.0.0.1", ++listenPort)) + { + Assert.IsTrue(retries++ < 10, "Couldn't Listen for more than 10 retries"); + } + } + + internal void RegisterClientData() + { + // Just use default handler + myClient.RegisterHandler(MsgType.Connect, OnClientConnected); + myClient.RegisterHandler(kReadyMsgId, OnClientReadyInternal); + myClient.RegisterHandler(kStringMsgId, OnClientStringMessage); + + ClientScene.RegisterPrefab(playerPrefab); + ClientScene.RegisterPrefab(rockPrefab); + } + + public void StartClientAndConnect() + { + myClient = new NetworkClient(); + // not sure if we need custom config + // if (!myClient.Configure(config, maxConnections)) + // { + // Assert.Fail("Client configure failed"); + // } + + RegisterClientData(); + myClient.Connect("127.0.0.1", listenPort); + } + + public void StartLocalClient() + { + StartLocalClient(1); + } + + public void StartLocalClient(int playerCount) + { + m_PlayerCount = playerCount; + myClient = ClientScene.ConnectLocalServer(); + RegisterClientData(); + } + + public void OnServerDisconnected(NetworkMessage netMsg) + { + NetworkServer.DestroyPlayersForConnection(netMsg.conn); + } + + public void OnAddPlayer(NetworkMessage netMsg) + { + var msg = netMsg.ReadMessage(); + playerObj = (GameObject)Instantiate(playerPrefab, Vector3.zero, Quaternion.identity); + + SpawningBase_PlayerScript script = playerObj.GetComponent(); // need to add this script ot prefab in Resources + script.intValue = 999; + script.floatValue = 55.5f; + + NetworkServer.AddPlayerForConnection(netMsg.conn, playerObj, msg.playerControllerId); + + OnServerReady(playerObj); + + NetworkServer.SendToClientOfPlayer(playerObj, kReadyMsgId, msg); + } + + public void OnClientConnected(NetworkMessage netMsg) + { + ClientScene.AddPlayer(netMsg.conn, 0); + + for (int i = 1; i < m_PlayerCount; i++) + { + ClientScene.AddPlayer((short)(i + 1)); + } + } + + public void OnClientReadyInternal(NetworkMessage netMsg) + { + var msg = netMsg.ReadMessage(); + OnClientReady(msg.playerControllerId); + } + + public virtual void OnServerReady(GameObject player) + { + } + + public virtual void OnClientReady(short playerId) + { + } + + public virtual void OnClientStringMessage(NetworkMessage netMsg) + { + } + + public virtual void OnServerStringMessage(NetworkMessage netMsg) + { + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass/SpawningTestBase.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass/SpawningTestBase.cs.meta new file mode 100644 index 00000000..472d774b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/BaseClass/SpawningTestBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2b65644ec785ce94b878ccfb55024f73 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsMultiplePlayers.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsMultiplePlayers.cs new file mode 100644 index 00000000..fe4b8fba --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsMultiplePlayers.cs @@ -0,0 +1,62 @@ +using System.Collections; +using System.Collections.Generic; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class LocalClientSpawnsMultiplePlayers : SpawningTestBase +{ + const int kPlayerCount = 2; + List m_ReadyPlayers = new List(); + private int numPlayers = 0; + GameObject obj; + + [UnityTest] + public IEnumerator LocalClientSpawnsMultiplePlayersTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + StartLocalClient(kPlayerCount); + + while (m_ReadyPlayers.Count != kPlayerCount) + { + yield return null; + } + + ClientScene.DestroyAllClientObjects(); + yield return null; + NetworkServer.Destroy(obj); + NetworkServer.Destroy(playerObj); + } + + public override void OnServerReady(GameObject player) + { + obj = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + NetworkServer.Spawn(obj); + + // rock + this player + Assert.AreEqual(numPlayers + 2, numStartServer); + Assert.AreEqual(numPlayers + 2, numStartClient); + + numPlayers += 2; + } + + public override void OnClientReady(short playerId) + { + // Sanity check. Make sure these are unique player IDs each time + if (!m_ReadyPlayers.Contains(playerId)) + { + m_ReadyPlayers.Add(playerId); + } + else + { + Assert.Fail("Player with such Id already exist"); + } + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsMultiplePlayers.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsMultiplePlayers.cs.meta new file mode 100644 index 00000000..1c999157 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsMultiplePlayers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 907e3cb162bb6f546830f0b25af6576a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectAfterConnect.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectAfterConnect.cs new file mode 100644 index 00000000..1d58fc06 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectAfterConnect.cs @@ -0,0 +1,45 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class LocalClientSpawnsObjectAfterConnect : SpawningTestBase +{ + bool isDone; + GameObject obj; + + [UnityTest] + public IEnumerator LocalClientSpawnsObjectAfterConnectTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + StartLocalClient(); + + while (!isDone) + { + yield return null; + } + + // 2 is player and rock + Assert.AreEqual(2, numStartServer); + Assert.AreEqual(2, numStartClient); + + ClientScene.DestroyAllClientObjects(); + yield return null; + NetworkServer.Destroy(obj); + NetworkServer.Destroy(playerObj); + } + + public override void OnServerReady(GameObject player) + { + obj = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + NetworkServer.Spawn(obj); + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectAfterConnect.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectAfterConnect.cs.meta new file mode 100644 index 00000000..021fe998 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectAfterConnect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3011d329c4979b74d9d79bb70cd336ec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectBeforeConnect.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectBeforeConnect.cs new file mode 100644 index 00000000..38253230 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectBeforeConnect.cs @@ -0,0 +1,46 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class LocalClientSpawnsObjectBeforeConnect : SpawningTestBase +{ + bool isDone; + GameObject obj; + + [UnityTest] + public IEnumerator LocalClientSpawnsObjectBeforeConnectTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + + obj = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + NetworkServer.Spawn(obj); + + StartLocalClient(); + + while (!isDone) + { + yield return null; + } + + ClientScene.DestroyAllClientObjects(); + yield return null; + NetworkServer.Destroy(obj); + NetworkServer.Destroy(playerObj); + } + + public override void OnServerReady(GameObject player) + { + // 2 is player and rock + Assert.AreEqual(2, numStartServer); + Assert.AreEqual(2, numStartClient); + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectBeforeConnect.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectBeforeConnect.cs.meta new file mode 100644 index 00000000..99d1d822 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/LocalClientSpawnsObjectBeforeConnect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c973a9688b818a64d9f7537a1b0377e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources.meta new file mode 100644 index 00000000..81fbe62f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc9efd587dfff9d41bb75e7b46091764 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerPrefab.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerPrefab.prefab new file mode 100644 index 00000000..2f909720 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerPrefab.prefab @@ -0,0 +1,145 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1873923016790054} + m_IsPrefabParent: 1 +--- !u!1 &1873923016790054 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4724899533531532} + - component: {fileID: 33138031125937212} + - component: {fileID: 23215592827078678} + - component: {fileID: 65412238776160816} + - component: {fileID: 114224568570801332} + - component: {fileID: 114515388448827666} + m_Layer: 0 + m_Name: SpawningBase_PlayerPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4724899533531532 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1873923016790054} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23215592827078678 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1873923016790054} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33138031125937212 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1873923016790054} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65412238776160816 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1873923016790054} + 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!114 &114224568570801332 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1873923016790054} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 28 + i1: 204 + i2: 14 + i3: 67 + i4: 65 + i5: 209 + i6: 128 + i7: 244 + i8: 40 + i9: 252 + i10: 81 + i11: 221 + i12: 202 + i13: 181 + i14: 94 + i15: 234 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 1 +--- !u!114 &114515388448827666 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1873923016790054} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec2008c107e8a1b4b8222ddb5f7ffbf0, type: 3} + m_Name: + m_EditorClassIdentifier: + intValue: 0 + floatValue: 0 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerPrefab.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerPrefab.prefab.meta new file mode 100644 index 00000000..0828edc6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerPrefab.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1ccc0e4341d180f428fc51ddcab55eea +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerScript.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerScript.cs new file mode 100644 index 00000000..7b4893cf --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerScript.cs @@ -0,0 +1,27 @@ +using NUnit.Framework; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SpawningBase_PlayerScript : NetworkBehaviour +{ + [SyncVar] + public int intValue; + + [SyncVar] + public float floatValue; + + public override void OnStartServer() + { + Assert.AreEqual(intValue, 999); + Assert.AreEqual(floatValue, 55.5f); + SpawningTestBase.IncrementStartServer(); + } + + public override void OnStartClient() + { + Assert.AreEqual(intValue, 999); + Assert.AreEqual(floatValue, 55.5f); + SpawningTestBase.IncrementStartClient(); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerScript.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerScript.cs.meta new file mode 100644 index 00000000..fd27a25f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_PlayerScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ec2008c107e8a1b4b8222ddb5f7ffbf0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectPrefab.prefab b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectPrefab.prefab new file mode 100644 index 00000000..fa43bab9 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectPrefab.prefab @@ -0,0 +1,143 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1825730589472640} + m_IsPrefabParent: 1 +--- !u!1 &1825730589472640 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4350670242350864} + - component: {fileID: 33483871696536668} + - component: {fileID: 23883713217033572} + - component: {fileID: 135279845048574246} + - component: {fileID: 114236485685277416} + - component: {fileID: 114143015368681524} + m_Layer: 0 + m_Name: SpawningBase_SpawnableObjectPrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4350670242350864 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1825730589472640} + 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: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23883713217033572 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1825730589472640} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 &33483871696536668 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1825730589472640} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114143015368681524 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1825730589472640} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f2edb38790e9884ea9580b5060a9f5e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114236485685277416 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1825730589472640} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SceneId: + m_Value: 0 + m_AssetId: + i0: 172 + i1: 232 + i2: 70 + i3: 72 + i4: 218 + i5: 76 + i6: 126 + i7: 84 + i8: 202 + i9: 2 + i10: 212 + i11: 172 + i12: 217 + i13: 78 + i14: 202 + i15: 94 + m_ServerOnly: 0 + m_LocalPlayerAuthority: 0 +--- !u!135 &135279845048574246 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1825730589472640} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectPrefab.prefab.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectPrefab.prefab.meta new file mode 100644 index 00000000..58efe4d0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectPrefab.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ace84648da4c7e54ca02d4acd94eca5e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectScript.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectScript.cs new file mode 100644 index 00000000..cf43a36c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectScript.cs @@ -0,0 +1,21 @@ +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SpawningBase_SpawnableObjectScript : NetworkBehaviour +{ + public override void OnStartServer() + { + SpawningTestBase.IncrementStartServer(); + } + + public override void OnStartClient() + { + SpawningTestBase.IncrementStartClient(); + } + + public override void OnNetworkDestroy() + { + SpawningTestBase.IncrementDestroyClient(); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectScript.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectScript.cs.meta new file mode 100644 index 00000000..30784d6e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/Resources/SpawningBase_SpawnableObjectScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0f2edb38790e9884ea9580b5060a9f5e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectAfterConnect.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectAfterConnect.cs new file mode 100644 index 00000000..f23328d2 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectAfterConnect.cs @@ -0,0 +1,48 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SpawnObjectAfterConnect : SpawningTestBase +{ + bool isDone; + GameObject obj; + + [UnityTest] + public IEnumerator SpawnObjectAfterConnectTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + NetworkServer.SpawnObjects(); + StartClientAndConnect(); + + while (!isDone) + { + yield return null; + } + ClientScene.DestroyAllClientObjects(); + yield return null; + NetworkServer.Destroy(obj); + NetworkServer.Destroy(playerObj); + } + + public override void OnServerReady(GameObject player) + { + obj = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + NetworkServer.Spawn(obj); + + Assert.AreEqual(2, numStartServer); + } + + public override void OnClientReady(short playerId) + { + Assert.AreEqual(2, numStartClient); + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectAfterConnect.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectAfterConnect.cs.meta new file mode 100644 index 00000000..846b82c6 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectAfterConnect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8f34a6436f1c1cb4b89dedc1e3b0916a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectBeforeConnect.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectBeforeConnect.cs new file mode 100644 index 00000000..4d105f2f --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectBeforeConnect.cs @@ -0,0 +1,47 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SpawnObjectBeforeConnect : SpawningTestBase +{ + bool isDone; + + [UnityTest] + public IEnumerator SpawnObjectBeforeConnectTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + + GameObject obj = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + NetworkServer.Spawn(obj); + StartClientAndConnect(); + + while (!isDone) + { + yield return null; + } + + ClientScene.DestroyAllClientObjects(); + yield return null; + NetworkServer.Destroy(obj); + NetworkServer.Destroy(playerObj); + } + + public override void OnServerReady(GameObject player) + { + Assert.AreEqual(2, numStartServer); + } + + public override void OnClientReady(short playerId) + { + Assert.AreEqual(2, numStartClient); + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectBeforeConnect.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectBeforeConnect.cs.meta new file mode 100644 index 00000000..1d52b605 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectBeforeConnect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0522b4117d6be844ea3799f186036ad0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectOnServerOnly.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectOnServerOnly.cs new file mode 100644 index 00000000..440a53d8 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectOnServerOnly.cs @@ -0,0 +1,31 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SpawnObjectOnServerOnly : SpawningTestBase +{ + GameObject obj; + + [UnityTest] + public IEnumerator SpawnObjectOnServerOnlyTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + + obj = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + NetworkServer.Spawn(obj); + yield return null; + + // 1 is rock, there is no player + Assert.AreEqual(1, numStartServer); + + NetworkServer.Destroy(obj); + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectOnServerOnly.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectOnServerOnly.cs.meta new file mode 100644 index 00000000..2c92b287 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectOnServerOnly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 483b7e4a095e05d419ac90a48978cb41 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItAfterConnect.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItAfterConnect.cs new file mode 100644 index 00000000..a1f4f327 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItAfterConnect.cs @@ -0,0 +1,49 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SpawnObjectThenDeleteItAfterConnect : SpawningTestBase +{ + private GameObject deleteMe; + bool isDone = false; + + [UnityTest] + public IEnumerator SpawnObjectThenDeleteItAfterConnectTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + + deleteMe = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + NetworkServer.Spawn(deleteMe); + + StartClientAndConnect(); + + while (!isDone) + { + yield return null; + } + + ClientScene.DestroyAllClientObjects(); + yield return null; + NetworkServer.Destroy(playerObj); + } + + public override void OnServerReady(GameObject player) + { + NetworkServer.Destroy(deleteMe); + Assert.AreEqual(2, numStartServer, "StartServer should be called 2 times - for player and SpawnableObject"); + } + + public override void OnClientReady(short playerId) + { + Assert.AreEqual(2, numStartClient, "StartClient should be called 2 times - for player and SpawnableObject"); + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItAfterConnect.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItAfterConnect.cs.meta new file mode 100644 index 00000000..1d6e516e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItAfterConnect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1ba71ceb92a7ec1448c88bc53771f85e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItBeforeConnect.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItBeforeConnect.cs new file mode 100644 index 00000000..bf40b43b --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItBeforeConnect.cs @@ -0,0 +1,47 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class SpawnObjectThenDeleteItBeforeConnect : SpawningTestBase +{ + bool isDone = false; + + [UnityTest] + public IEnumerator SpawnObjectThenDeleteItBeforeConnectTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + SetupPrefabs(); + StartServer(); + NetworkServer.SpawnObjects(); + + GameObject obj = (GameObject)Instantiate(rockPrefab, Vector3.zero, Quaternion.identity); + NetworkServer.Spawn(obj); + yield return new WaitForSeconds(2); + NetworkServer.Destroy(obj); + + StartClientAndConnect(); + + while (!isDone) + { + yield return null; + } + + ClientScene.DestroyAllClientObjects(); + yield return null; + NetworkServer.Destroy(playerObj); + } + + public override void OnClientReady(short playerId) + { + Assert.AreEqual(2, numStartServer, "StartServer should be called 2 times - for player and SpawnableObject"); + Assert.AreEqual(1, numStartClient, "StartClient should be called 1 time - for player only"); // 1 for player + Assert.AreEqual(0, numDestroyClient, "numDestroyClient should be 0, as there was no SpawnableObject on the Client"); //no rock on client + isDone = true; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItBeforeConnect.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItBeforeConnect.cs.meta new file mode 100644 index 00000000..8a49a579 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/SpawningTests/SpawnObjectThenDeleteItBeforeConnect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ea07ef86d8ad652498ce495f7bd5b903 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess.meta new file mode 100644 index 00000000..0c6b9e08 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ff690a29d810ea6439dd1a500825c7e0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess/TwoInstancesOfServerSimpleWorkInOneProcess.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess/TwoInstancesOfServerSimpleWorkInOneProcess.cs new file mode 100644 index 00000000..271a4909 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess/TwoInstancesOfServerSimpleWorkInOneProcess.cs @@ -0,0 +1,99 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; +using UnityEngine; +using UnityEngine.Networking; +using UnityEngine.Networking.NetworkSystem; + +#pragma warning disable 618 +public class TwoInstancesOfServerSimpleWorkInOneProcess +{ + NetworkServerSimple server1; + NetworkServerSimple server2; + NetworkClient client1; + NetworkClient client2; + + const int port1 = 7003; + const int port2 = 7004; + + const short TestMsgId = 1000; + int actualMsgCount = 0; + int expectedMsgCount = 0; + + [UnityTest] + public IEnumerator TwoInstancesOfServerSimpleWorkInOneProcessTest() + { + NetworkClient.ShutdownAll(); + NetworkServer.Reset(); + + server1 = new NetworkServerSimple(); + server1.RegisterHandler(MsgType.Connect, OnServerConnect1); + server1.RegisterHandler(TestMsgId, OnServerMsg1); + + server2 = new NetworkServerSimple(); + server2.RegisterHandler(MsgType.Connect, OnServerConnect2); + server2.RegisterHandler(TestMsgId, OnServerMsg2); + + Assert.IsTrue(server1.Listen(port1), "Server1 Listen failed"); + Assert.IsTrue(server2.Listen(port2), "Server2 Listen failed"); + + client1 = new NetworkClient(); + client1.RegisterHandler(MsgType.Connect, OnClientConnect1); + client1.RegisterHandler(TestMsgId, OnClientMsg1); + + client2 = new NetworkClient(); + client2.RegisterHandler(MsgType.Connect, OnClientConnect2); + client2.RegisterHandler(TestMsgId, OnClientMsg2); + + client1.Connect("localhost", port1); + client2.Connect("localhost", port2); + + while (actualMsgCount != expectedMsgCount) + { + yield return null; + } + } + + void OnServerConnect1(NetworkMessage netMsg) + { + actualMsgCount += 1; + } + + void OnServerConnect2(NetworkMessage netMsg) + { + actualMsgCount += 1; + } + + void OnServerMsg1(NetworkMessage netMsg) + { + actualMsgCount += 1; + netMsg.conn.Send(TestMsgId, new EmptyMessage()); + } + + void OnServerMsg2(NetworkMessage netMsg) + { + actualMsgCount += 1; + netMsg.conn.Send(TestMsgId, new EmptyMessage()); + } + + void OnClientConnect1(NetworkMessage netMsg) + { + netMsg.conn.Send(TestMsgId, new EmptyMessage()); + } + + void OnClientConnect2(NetworkMessage netMsg) + { + netMsg.conn.Send(TestMsgId, new EmptyMessage()); + } + + void OnClientMsg1(NetworkMessage netMsg) + { + actualMsgCount += 1; + } + + void OnClientMsg2(NetworkMessage netMsg) + { + actualMsgCount += 1; + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess/TwoInstancesOfServerSimpleWorkInOneProcess.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess/TwoInstancesOfServerSimpleWorkInOneProcess.cs.meta new file mode 100644 index 00000000..166ba06e --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/TwoInstancesOfServerSimpleWorkInOneProcess/TwoInstancesOfServerSimpleWorkInOneProcess.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 27ca854adf07c0e4eadf9374d369a8bc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes.meta new file mode 100644 index 00000000..0190665c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eaa8390ecb2e840dea7bba9309b40519 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_SyncLists.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_SyncLists.cs new file mode 100644 index 00000000..eb8576b1 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_SyncLists.cs @@ -0,0 +1,29 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class WeaverILGenerationTests_SyncLists_Base : NetworkBehaviour +{ + [SyncVar] public GameObject baseSyncObject; + void Awake() + { + Debug.Log("just here so compiler does not optimize away this"); + } +} + +public class WeaverILGenerationTests_SyncLists : WeaverILGenerationTests_SyncLists_Base +{ + public SyncListInt Inited = new SyncListInt(); + + // This can't be enabled by default as it will issue a warning from the weaver at compile time. This + // warning will appear in all projects including the package and can mess with CI or automation which checks for output + // in the editor log. + //[SyncVar] + //public SyncListInt NotInited; + + [SyncVar] + public GameObject syncObject; +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_SyncLists.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_SyncLists.cs.meta new file mode 100644 index 00000000..5faceb1d --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_SyncLists.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3fc423c9fffdc40888dd3d1eb72b30c9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_TargetRPCServerClientChecks.cs b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_TargetRPCServerClientChecks.cs new file mode 100644 index 00000000..68a131c0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_TargetRPCServerClientChecks.cs @@ -0,0 +1,19 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Networking; + +#pragma warning disable 618 +public class WeaverILGenerationTests_TargetRPCServerClientChecks : NetworkBehaviour +{ + [TargetRpc] + public void TargetRpcTest(NetworkConnection connection) + { + } + + [ClientRpc] + public void RpcWithEnumArray(System.AttributeTargets[] array) + { + } +} +#pragma warning restore 618 diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_TargetRPCServerClientChecks.cs.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_TargetRPCServerClientChecks.cs.meta new file mode 100644 index 00000000..0ed373c0 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/WeaverILGenerationTests_Classes/WeaverILGenerationTests_TargetRPCServerClientChecks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ddcb7916f054d4458bf77130fb839749 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/com.unity.multiplayer-hlapi.Tests.asmdef b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/com.unity.multiplayer-hlapi.Tests.asmdef new file mode 100644 index 00000000..dfb59bfc --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/com.unity.multiplayer-hlapi.Tests.asmdef @@ -0,0 +1,11 @@ +{ + "name": "com.unity.multiplayer-hlapi.Tests", + "references": [ + "com.unity.multiplayer-hlapi.Runtime" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/com.unity.multiplayer-hlapi.Tests.asmdef.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/com.unity.multiplayer-hlapi.Tests.asmdef.meta new file mode 100644 index 00000000..5a217f2a --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Tests/Runtime/com.unity.multiplayer-hlapi.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bfacb3ca089124d95963e1ebe9a83ae5 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/package.json b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/package.json new file mode 100644 index 00000000..cb08a104 --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/package.json @@ -0,0 +1,22 @@ +{ + "name": "com.unity.multiplayer-hlapi", + "displayName": "Multiplayer HLAPI", + "version": "1.0.2", + "unity": "2019.1", + "description": "The high level API component of the Unity Multiplayer system.", + "keywords": [ + "multiplayer", + "networking", + "hlapi", + "high-level", + "api" + ], + "dependencies": { + "nuget.mono-cecil": "0.1.5-preview" + }, + "repository": { + "type": "git", + "url": "https://gitlab.cds.internal.unity3d.com/upm-packages/multiplayer/com.unity.multiplayer-hlapi.git", + "revision": "a46e55980cbb98565c4634779a8f7b98cce67736" + } +} diff --git a/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/package.json.meta b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/package.json.meta new file mode 100644 index 00000000..b2a8dc2c --- /dev/null +++ b/Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bdd47853ebfe747c3b8264a789d9b57e +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/.npmignore b/Library/PackageCache/com.unity.purchasing@2.0.1/.npmignore new file mode 100644 index 00000000..5ca0973f --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/.npmignore @@ -0,0 +1,2 @@ +.DS_Store + diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/CHANGELOG.md b/Library/PackageCache/com.unity.purchasing@2.0.1/CHANGELOG.md new file mode 100644 index 00000000..0051b884 --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/CHANGELOG.md @@ -0,0 +1,2 @@ +[2.0.0] 2018-02-07 +Fixed issue with IAP_PURCHASING flag not set on project load diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/CHANGELOG.md.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/CHANGELOG.md.meta new file mode 100644 index 00000000..d2412048 --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/CHANGELOG.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bb15697a279504a90b825c44dc355047 +timeCreated: 1518046607 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/Editor.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor.meta new file mode 100644 index 00000000..fa8ed063 --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d929147d9f78c487397abb40f2c257b0 +folderAsset: yes +timeCreated: 1492551707 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll new file mode 100644 index 00000000..e928038a Binary files /dev/null and b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll differ diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.mdb b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.mdb new file mode 100644 index 00000000..9cc32f73 Binary files /dev/null and b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.mdb differ diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.mdb.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.mdb.meta new file mode 100644 index 00000000..c8920939 --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.mdb.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9de9e8523c82543c5b3e40a4b51aa2c9 +timeCreated: 1492551707 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.meta new file mode 100644 index 00000000..a9664b7a --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/Editor/UnityEditor.Purchasing.dll.meta @@ -0,0 +1,25 @@ +fileFormatVersion: 2 +guid: f1045c695c5bf4fb7b8509687bc60fc0 +timeCreated: 1492551710 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/License.md b/Library/PackageCache/com.unity.purchasing@2.0.1/License.md new file mode 100644 index 00000000..27c17ac4 --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/License.md @@ -0,0 +1,32 @@ +**Unity Companion Package License v1.0 ("_License_")** + +Copyright © 2017 Unity Technologies ApS ("**_Unity_**") + +Unity hereby grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available with this License ("**_Software_**"), subject to the following terms and conditions: + +1. *Unity Companion Use Only*. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity development engine software license ("**_Engine License_**"). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted. + +1. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way. + +1. *Ownership & Grant Back to You*. + + 3.1. You own your content. In this License, "derivative works" means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content. + + 3.2. Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity. + + 3.3. You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License. + +1. *Trademarks*. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates ("**_Trademarks_**"). Descriptive uses of Trademarks are permitted; see, for example, Unity’s Branding Usage Guidelines at [https://unity3d.com/public-relations/brand](https://unity3d.com/public-relations/brand). + +1. *Notices & Third-Party Rights*. This License, including the copyright notice above, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity "third-party notices" or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms. + +1. *DISCLAIMER, LIMITATION OF LIABILITY*. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +1. *USE IS ACCEPTANCE and License Versions*. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License. + +1. *Use in Compliance with Law and Termination*. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License. + +1. *Severability*. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect. + +1. *Governing Law and Venue*. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License ("**_Dispute_**"). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute. + diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/License.md.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/License.md.meta new file mode 100644 index 00000000..a183744e --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/License.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 65d58d50c3db54f979b1ffae3777d74b +timeCreated: 1504642585 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/README.md b/Library/PackageCache/com.unity.purchasing@2.0.1/README.md new file mode 100644 index 00000000..109b773a --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/README.md @@ -0,0 +1,9 @@ +# Unity In App Purchasing + +Implementation of the Unity In App Purchasing API. + +## Release Notes + +- Adding Readme file +- Adding local plugin importer callbacks. +- Removing Bintray references in package.json \ No newline at end of file diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/README.md.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/README.md.meta new file mode 100644 index 00000000..8a63b28b --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/README.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90791303b72ec4ae198f99d637dfdf6c +timeCreated: 1493316726 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll b/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll new file mode 100644 index 00000000..3c9e1e85 Binary files /dev/null and b/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll differ diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.mdb b/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.mdb new file mode 100644 index 00000000..001a4bc7 Binary files /dev/null and b/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.mdb differ diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.mdb.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.mdb.meta new file mode 100644 index 00000000..ec41327b --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.mdb.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86c18994495874297b469aaa57ef9b44 +timeCreated: 1492551707 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.meta new file mode 100644 index 00000000..f4e31be3 --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll.meta @@ -0,0 +1,34 @@ +fileFormatVersion: 2 +guid: b5f4343795a0e4626ac1fe4a9e6fce59 +timeCreated: 1491256195 +licenseType: Pro +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 1 + platformData: + data: + first: + Any: + second: + enabled: 1 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + data: + first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/package.json b/Library/PackageCache/com.unity.purchasing@2.0.1/package.json new file mode 100644 index 00000000..c177bd42 --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/package.json @@ -0,0 +1,13 @@ +{ + "name": "com.unity.purchasing", + "displayName": "In App Purchasing", + "version": "2.0.1", + "unity": "2018.1", + "description": "Unity IAP supports the iOS, Mac, tvOS, Google Play, Facebook Gameroom, Windows, Amazon, Samsung Galaxy, Tizen, Cloud Moolah MOO, Xiaomi Mi Game Pay App Stores.\n\nWith Unity IAP, setting up in-app purchases for your game across multiple app stores has never been easier.\n\nUse one common API to access all stores for free. With just a few lines of code, you can fully understand and optimize your in-game economy.\n\nUnity IAP automatically couples with Unity Analytics enabling you to monitor and act on trends in your revenue and purchase data across multiple platforms.\n\nIncludes client-side receipt validation for Apple, Google Play, and Xiaomi Mi Game Pay.", + "keywords": [ + "purchasing", + "iap", + "unity" + ], + "license" : "Unity Companion Package License v1.0" +} diff --git a/Library/PackageCache/com.unity.purchasing@2.0.1/package.json.meta b/Library/PackageCache/com.unity.purchasing@2.0.1/package.json.meta new file mode 100644 index 00000000..c291d855 --- /dev/null +++ b/Library/PackageCache/com.unity.purchasing@2.0.1/package.json.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 44f39a74ca5ee4bf5936b17e901f251c +timeCreated: 1491258786 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/.gitlab-ci.yml b/Library/PackageCache/com.unity.textmeshpro@2.0.0/.gitlab-ci.yml new file mode 100644 index 00000000..45a43a13 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/.gitlab-ci.yml @@ -0,0 +1,12 @@ +image: node:6.10.0 + +stages: + - push_to_packman_staging + +push_to_packman_staging: + stage: push_to_packman_staging + only: + - tags + script: + - curl -u $USER_NAME:$API_KEY https://staging-packages.unity.com/auth > .npmrc + - npm publish diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/CHANGELOG.md b/Library/PackageCache/com.unity.textmeshpro@2.0.0/CHANGELOG.md new file mode 100644 index 00000000..8999bf37 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/CHANGELOG.md @@ -0,0 +1,164 @@ +# Changelog +These are the release notes for the TextMesh Pro UPM package which was first introduced with Unity 2018.1. Please see the following link for the Release Notes for prior versions of TextMesh Pro. http://digitalnativestudios.com/forum/index.php?topic=1363.0 + +## [2.0.0] - 2019-03-01 +### Changes +- Added dependency on the UGUI package version 1.0.0. + +## [1.4.0-preview.3a] - 2019-02-28 +### Changes +- Improved performance of the Project Files GUID Remapping Tool. +- Fixed an issue with the TMP_FontAsset.TryAddCharacters() functions which was resulting in an error when added characters exceeded the capacity of the atlas texture. +- Updated TMP_FontAsset.TryAddCharacters functions to add new overloads returning list of characters that could not be added. +- Added function in OnEnable of FontAsset Editor's to clean up Fallback list to remove any null / empty entries. +- Added support for Stereo rendering to the TMP Distance Field and Mobile Distance Field shaders. + +## [1.4.0-preview.2a] - 2019-02-14 +### Changes +- Fixed an issue with SDF Scale handling where the text object would not render correctly after the object scale had been set to zero. +- Fixed an issue with the TMP_UpdateManager where text objects were not getting unregistered correctly. +- Any changes to Font Asset Creation Settings' padding, atlas width and / or atlas height will now result in all Material Presets for the given font asset to also be updated. +- Added new section in the TMP Settings related to the new Dynamic Font System. +- Added new property in the Dynamic Font System section to determine if OpenType Font Features will be retrieved from source font files at runtime as new characters are added to font assets. Glyph Adjustment Data (Kerning) is the only feature currently supported. +- Fix an issue where font assets created at runtime were not getting their asset version number set to "1.1.0". +- Improved parsing of the text file used in the Font Asset Creator and "Characters from File" option to handle UTF16 "\u" and UTF32 "\U" escape character sequences. +- Fixed a Null Reference Error (NRE) that could occur when using the <font> tag with an invalid font name followed by the <sprite> tag. +- The Glyph Adjustment Table presentation and internal data structure has been changed to facilitate the future addition of OpenType font features. See https://forum.unity.com/threads/version-1-4-0-preview-with-dynamic-sdf-for-unity-2018-3-now-available.622420/#post-4206595 for more details. +- Fixed an issue with the <rotate> tag incorrectly affecting character spacing. + +## [1.4.0-preview.1] - 2019-01-30 +### Changes +- Renamed TMPro_FontUtilities to TMP_FontAssetCommon to more accurately reflect the content of this file. +- Accessing the TextMesh Pro Settings via the new Edit - Settings menu when TMP Essential Resources have not yet been imported in the project will no longer open a new window to provide the options to import these resources. +- Fixed an issue where using int.MaxValue, int.MinValue, float.MaxValue and float.MinValue in conjunction with SetText() would display incorrect numerical values. Case #1078521. +- Added public setter to the TMP Settings' missingGlyphCharacter to allow changing which character will be used for missing characters via scripting. +- Fixed a potential Null Reference Exception related to loading the Default Style Sheet. +- Added compiler conditional to TMP_UpdateManager.cs to address changes to SRP. +- Improved the <margin> tag to make it possible to define both left and right margin values. Example: <margin left=10% right=10px>. +- Added new menu option to allow the quick creation of a UI Button using TMP. New menu option is located in Create - UI - Button (TextMeshPro). +- Renamed TMP related create menu options. +- Fixed TMP object creation handling when using Prefab isolation mode. Case #1077392 +- Fixed another issue related to Prefabs where some serialized properties of the text object would incorrectly show up in the Overrides prefab options. Case #1093101 +- Fixed issue where changing the Sorting Layer or Sorting Order of a object would not dirty the scene. Case #1069776 +- Fixed a text alignment issue when setting text alignment on disabled text objects. Case #1047771 +- Fixed an issue where text object bounds were not set correctly on newly created text objects or in some cases when setting the text to null or string.empty. Case #1093388 +- Fixed an issue in the IntToString() function that could result in Index Out Of Bounds error. Case #1102007 +- Changed the TMP_InputField IsValidChar function to protected virtual. +- The "Allow Rich Text Editing" property of the TMP_InputField is now set to false by default. +- Added new option to the Sprite Asset context menu to make it easier to update sprite glyphs edited via the Unity Sprite Editor. +- Added new Sharpness slider in the Debug section of the SDF Material inspector. +- Fixed an error that would occur when using the context menu Reset on text component. Case #1044726 +- Fixed issue where CharacterInfo.index would be incorrect as a result of using Surrogate Pairs in the text. Case #1037828 +- The TMP_EditorPanel and TMP_UiEditorPanel now have their "UseForChildren" flag set to true to enable user / custom inspectors to inherit from them. +- Fixed an issue where rich text tags using pixel (px) or font units (em) were not correctly accounting for orthographic camera mode. This change only affects the normal TMP text component. +- Fixed an inspector issue related to changes to the margin in the TMP Extra Settings panel. Case #1114253 +- Added new property to Glyph Adjustment Pairs which determines if Character Spacing Adjustments should affect the given pair. +- Updated the Glyph Adjustment Table where ID now represents the unicode (hex) value for the character instead of its decimal value. +- Added new SetValueWithoutNotify() function to TMP_DropDown and SetTextWithoutNotify() function to TMP_InputField allowing these to be set without triggering OnValueChanged event. +- Geometry buffer deallocation which normally takes place when current allocations exceed those of the new text by more than 256 characters will no longer occur if the new text is set to null or string.empty. +- Fixed a minor issue where the underline SDF scale would be incorrect when the underline text sequence contained normal size characters and ended with a subscript or superscript character. +- Fixed an error that would occur when using the Reset Context menu on a Material using the SDF Surface or Mobile SDF Surface Shaders. Case #1122279 +- Resolved a Null Reference Error that would appear when cycling through the text overflow modes. Case #1121624 + +## [1.3.0] - 2018-08-09 +### Changes +- Revamped UI to conform to Unity Human Interface Guidelines. +- Updated the title text on the Font Asset Creator window tab to "Font Asset Creator". +- Using TMP_Text.SetCharArray() with an empty char[] array will now clear the text. +- Made a small improvement to the TMP Input Field when using nested 2d RectMasks. +- Renamed symbol defines used by TMP to append TMP_ in front of the define to avoid potential conflicts with user defines. +- Improved the Project Files GUID Remapping tool to allow specifying a target folder to scan. +- Added the ability to cancel the scanning process used by the Project Files GUID Remapping tool. +- Moved TMP Settings to universal settings window in 2018.3 and above. +- Changing style sheet in the TMP Settings will now be reflected automatically on existing text objects in the editor. +- Added new function TMP_StyleSheet.UpdateStyleSheet() to update the internal reference to which style sheet text objects should be using in conjunction with the style tag. + +## [1.2.4] - 2018-06-10 +### Changes +- Fixed a minor issue when using Justified and Flush alignment in conjunction with \u00A0. +- The Font Asset creationSettings field is no longer an Editor only serialized field. + +## [1.2.3] - 2018-05-29 +### Changes +- Added new bitmap shader with support for Custom Font Atlas texture. This shader also includes a new property "Padding" to provide control over the geometry padding to closely fit a modified / custom font atlas texture. +- Fixed an issue with ForceMeshUpdate(bool ignoreActiveState) not being handled correctly. +- Cleaned up memory allocations from repeated use of the Font Asset Creator. +- Sprites are now scaled based on the current font instead of the primary font asset assigned to the text object. +- It is now possible to recall the most recent settings used when creating a font asset in the Font Asset Creator. +- Newly created font assets now contain the settings used when they were last created. This will make the process of updating / regenerating font assets much easier. +- New context menu "Update Font Asset" was added to the Font Asset inspector which will open the Font Asset Creator with the most recently used settings for that font asset. +- New Context Menu "Create Font Asset" was added to the Font inspector panel which will open the Font Asset Creator with this source font file already selected. +- Fixed 3 compiler warnings that would appear when using .Net 4.x. +- Modified the TMP Settings to place the Missing Glyph options in their own section. +- Renamed a symbol used for internal debugging to avoid potential conflicts with other user project defines. +- TMP Sprite Importer "Create Sprite Asset" and "Save Sprite Asset" options are disabled unless a Sprite Data Source, Import Format and Sprite Texture Atlas are provided. +- Improved the performance of the Project Files GUID Remapping tool. +- Users will now be prompted to import the TMP Essential Resources when using the Font Asset Creator if such resources have not already been imported. + +## [1.2.2] - 2018-03-28 +### Changes +- Calling SetAllDirty() on a TMP text component will now force a regeneration of the text object including re-parsing of the text. +- Fixed potential Null Reference Exception that could occur when assigning a new fallback font asset. +- Removed public from test classes. +- Fixed an issue where using nested links (which doesn't make sense conceptually) would result in an error. Should accidental use of nested links occurs, the last / most nested ends up being used. +- Fixed a potential text alignment issue where an hyphen at the end of a line followed by a new line containing a single word too long to fit the text container would result in miss alignment of the hyphen. +- Updated package license. +- Non-Breaking Space character (0xA0) will now be excluded from word spacing adjustments when using Justified or Flush text alignment. +- Improved handling of Underline, Strikethrough and Mark tag with regards to vertex color and Color tag alpha. +- Improved TMP_FontAsset.HasCharacter(char character, bool searchFallbacks) to include a recursive search of fallbacks as well as TMP Settings fallback list and default font asset. +- The <gradient> tag will now also apply to sprites provided the sprite tint attribute is set to a value of 1. Ex. <sprite="Sprite Asset" index=0 tint=1>. +- Updated Font Asset Creator Plugin to allow for cancellation of the font asset generation process. +- Added callback to support the Scriptable Render Pipeline (SRP) with the normal TextMeshPro component. +- Improved handling of some non-breaking space characters which should not be ignored at the end of a line. +- Sprite Asset fallbacks will now be searched when using the <sprite> tag and referencing a sprite by Unicode or by Name. +- Updated EmojiOne samples from https://www.emojione.com/ and added attribution. +- Removed the 32bit versions of the TMP Plugins used by the Font Asset Creator since the Unity Editor is now only available as 64bit. +- The isTextTruncated property is now serialized. +- Added new event handler to the TMP_TextEventHandler.cs script included in Example 12a to allow tracking of interactions with Sprites. + +## [1.2.1] - 2018-02-14 +### Changes +- Package is now backwards compatible with Unity 2018.1. +- Renamed Assembly Definitions (.asmdef) to new UPM package conventions. +- Added DisplayName for TMP UPM package. +- Revised Editor and Playmode tests to ignore / skip over the tests if the required resources are not present in the project. +- Revised implementation of Font Asset Creator progress bar to use Unity's EditorGUI.ProgressBar instead of custom texture. +- Fixed an issue where using the material tag in conjunction with fallback font assets was not handled correctly. +- Fixed an issue where changing the fontStyle property in conjunction with using alternative typefaces / font weights would not correctly trigger a regeneration of the text object. + +## [1.2.0] - 2018-01-23 +### Changes +- Package version # increased to 1.2.0 which is the first release for Unity 2018.2. + +## [1.1.0] - 2018-01-23 +### Changes +- Package version # increased to 1.1.0 which is the first release for Unity 2018.1. + +## [1.0.27] - 2018-01-16 +### Changes +- Fixed an issue where setting the TMP_InputField.text property to null would result in an error. +- Fixed issue with Raycast Target state not getting serialized properly when saving / reloading a scene. +- Changed reference to PrefabUtility.GetPrefabParent() to PrefabUtility.GetCorrespondingObjectFromSource() to reflect public API change in 2018.2 +- Option to import package essential resources will only be presented to users when accessing a TMP component or the TMP Settings file via the project menu. + +## [1.0.26] - 2018-01-10 +### Added +- Removed Tizen player references in the TMP_InputField as the Tizen player is no longer supported as of Unity 2018.1. + +## [1.0.25] - 2018-01-05 +### Added +- Fixed a minor issue with PreferredValues calculation in conjunction with using text auto-sizing. +- Improved Kerning handling where it is now possible to define positional adjustments for the first and second glyph in the pair. +- Renamed Kerning Info Table to Glyph Adjustment Table to better reflect the added functionality of this table. +- Added Search toolbar to the Glyph Adjustment Table. +- Fixed incorrect detection / handling of Asset Serialization mode in the Project Conversion Utility. +- Removed SelectionBase attribute from TMP components. +- Revised TMP Shaders to support the new UNITY_UI_CLIP_RECT shader keyword which can provide a performance improvement of up to 30% on some devices. +- Added TMP_PRESENT define as per the request of several third party asset publishers. + +## [1.0.23] - 2017-11-14 +### Added +- New menu option added to Import Examples and additional content like Font Assets, Materials Presets, etc for TextMesh Pro. This new menu option is located in "Window -> TextMeshPro -> Import Examples and Extra Content". +- New menu option added to Convert existing project files and assets created with either the Source Code or DLL only version of TextMesh Pro. Please be sure to backup your project before using this option. The new menu option is located in "Window -> TextMeshPro -> Project Files GUID Remapping Tool". +- Added Assembly Definitions for the TMP Runtime and Editor scripts. +- Added support for the UI DirtyLayoutCallback, DirtyVerticesCallback and DirtyMaterialCallback. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/CHANGELOG.md.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/CHANGELOG.md.meta new file mode 100644 index 00000000..edf5c327 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 22464cf7ab0243a6bf9c79851183b002 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Documentation~/TextMeshPro.md b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Documentation~/TextMeshPro.md new file mode 100644 index 00000000..8f8c0926 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Documentation~/TextMeshPro.md @@ -0,0 +1,35 @@ +# **_TextMesh Pro User Guide_** + +#### **Overview** +This User Guide was designed to provide first time users of TextMesh Pro with a basic overview of the features and functionality of the tool. + +#### **Installation** +The TextMesh Pro UPM package is already included with the Unity Editor and as such does not require installation. TextMesh Pro "TMP" does however require adding resources to your project which are essential for using TextMesh Pro. + +To import the "*TMP Essential Resources*", please use the "*Window -> TextMeshPro -> Import TMP Essential Resources*" menu option. These resources will be added at the root of your project in the "*TextMesh Pro*" folder. + +The TextMesh Pro package also includes additional resources and examples that will make discovering and learning about TextMesh Pro's powerful features easier. It is strongly recommended that first time users import these additional resources. + +To import the "*TMP Examples & Extras*", please use the "*Window -> TextMeshPro -> Import TMP Examples & Extras*" menu option. These resources will also be added in the same "*TextMesh Pro*" folder inside your project. + + +#### **Quick Start** +There are two TextMesh Pro components available. The first TMP text component is of type <TextMeshPro> and designed to work with the MeshRenderer. This component is an ideal replacement for the legacy TextMesh component. + +To add a new <TextMeshPro> text object, go to: *GameObject->3D Object->TextMeshPro Text*. + +The second TMP text component is of type <TextMeshProUGUI> and designed to work with the CanvasRenderer and Canvas system. This component is an ideal replacement for the UI.Text component. + +To add a new <TextMeshProUGUI> text object, go to: *GameObject->UI->TextMeshPro Text*. + +You may also wish to watch this [Getting Started](https://youtu.be/olnxlo-Wri4) short video which covers this topic. + +We strongly recommend that you also watch the [Font Asset Creation](https://youtu.be/qzJNIGCFFtY) video as well as the [Working with Material Presets](https://youtu.be/d2MARbDNeaA) as these two topics is also key to working and getting the most out of TextMesh Pro. + +As mentionned in the Installation section of this guide, it is recommended that you import the "*TMP Examples & Extras*" and take the time to explore each of the examples as they provide a great overview of the functionality of the tool and the many text layout and [rich text tags](http://digitalnativestudios.com/textmeshpro/docs/rich-text/) available in TextMesh Pro. + +#### **Support & API Documentation** +Should you have questions or require assistance, please visit the [Unity UI & TextMesh Pro](https://forum.unity.com/forums/unity-ui-textmesh-pro.60/) section of the Unity forum as well as the [TextMesh Pro User Forum](http://digitalnativestudios.com/forum/index.php) where you will find additional information, [Video Tutorials](http://digitalnativestudios.com/forum/index.php?board=4.0) and [FAQ](http://digitalnativestudios.com/forum/index.php?topic=890.0). In the event you are unable to find the information you seek, always feel free to post on the [Unity UI & TextMesh Pro](https://forum.unity.com/forums/unity-ui-textmesh-pro.60/) section user forum. + +[Online Documentation](http://digitalnativestudios.com/textmeshpro/docs/) is also available on TextMesh Pro including Rich Text tags, Shaders, Scripting API and more. + diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Documentation~/TextMeshPro.md.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Documentation~/TextMeshPro.md.meta new file mode 100644 index 00000000..8c72f725 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Documentation~/TextMeshPro.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ca77d26d10b9455ca5a4b22c93be2a31 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources.meta new file mode 100644 index 00000000..7c07b007 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d1a0a27327b54c3bac52a08929c33f81 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos.meta new file mode 100644 index 00000000..f2596c78 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e93ec7eb6de342aabd156833e253f838 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Dropdown Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Dropdown Icon.psd new file mode 100644 index 00000000..93f5a2cb Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Dropdown Icon.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta new file mode 100644 index 00000000..7bdb473e --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: a7ec9e7ad8b847b7ae4510af83c5d868 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + 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: -2 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + 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: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: 2 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 1 + pSDShowRemoveMatteOption: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Font Asset Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Font Asset Icon.psd new file mode 100644 index 00000000..2fb1164d Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Font Asset Icon.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta new file mode 100644 index 00000000..bd64ad7d --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: ee148e281f3c41c5b4ff5f8a5afe5a6c +timeCreated: 1463559213 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Input Field Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Input Field Icon.psd new file mode 100644 index 00000000..f0360d34 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Input Field Icon.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta new file mode 100644 index 00000000..eb2e1ce2 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 3ee40aa79cd242a5b53b0b0ca4f13f0f +timeCreated: 1457860876 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd new file mode 100644 index 00000000..7036296e Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta new file mode 100644 index 00000000..a22cdf1c --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: ec7c645d93308c04d8840982af12101e +timeCreated: 1463559213 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Text Component Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Text Component Icon.psd new file mode 100644 index 00000000..3cc41630 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Text Component Icon.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta new file mode 100644 index 00000000..623993d2 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 2fd6421f253b4ef1a19526541f9ffc0c +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders.meta new file mode 100644 index 00000000..95efe2ba --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2da27f5fe80a3a549ac7331d9f52f5f0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_Properties.cginc b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_Properties.cginc new file mode 100644 index 00000000..2e962588 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_Properties.cginc @@ -0,0 +1,85 @@ +// UI Editable properties +uniform sampler2D _FaceTex; // Alpha : Signed Distance +uniform float _FaceUVSpeedX; +uniform float _FaceUVSpeedY; +uniform fixed4 _FaceColor; // RGBA : Color + Opacity +uniform float _FaceDilate; // v[ 0, 1] +uniform float _OutlineSoftness; // v[ 0, 1] + +uniform sampler2D _OutlineTex; // RGBA : Color + Opacity +uniform float _OutlineUVSpeedX; +uniform float _OutlineUVSpeedY; +uniform fixed4 _OutlineColor; // RGBA : Color + Opacity +uniform float _OutlineWidth; // v[ 0, 1] + +uniform float _Bevel; // v[ 0, 1] +uniform float _BevelOffset; // v[-1, 1] +uniform float _BevelWidth; // v[-1, 1] +uniform float _BevelClamp; // v[ 0, 1] +uniform float _BevelRoundness; // v[ 0, 1] + +uniform sampler2D _BumpMap; // Normal map +uniform float _BumpOutline; // v[ 0, 1] +uniform float _BumpFace; // v[ 0, 1] + +uniform samplerCUBE _Cube; // Cube / sphere map +uniform fixed4 _ReflectFaceColor; // RGB intensity +uniform fixed4 _ReflectOutlineColor; +//uniform float _EnvTiltX; // v[-1, 1] +//uniform float _EnvTiltY; // v[-1, 1] +uniform float3 _EnvMatrixRotation; +uniform float4x4 _EnvMatrix; + +uniform fixed4 _SpecularColor; // RGB intensity +uniform float _LightAngle; // v[ 0,Tau] +uniform float _SpecularPower; // v[ 0, 1] +uniform float _Reflectivity; // v[ 5, 15] +uniform float _Diffuse; // v[ 0, 1] +uniform float _Ambient; // v[ 0, 1] + +uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity +uniform float _UnderlayOffsetX; // v[-1, 1] +uniform float _UnderlayOffsetY; // v[-1, 1] +uniform float _UnderlayDilate; // v[-1, 1] +uniform float _UnderlaySoftness; // v[ 0, 1] + +uniform fixed4 _GlowColor; // RGBA : Color + Intesity +uniform float _GlowOffset; // v[-1, 1] +uniform float _GlowOuter; // v[ 0, 1] +uniform float _GlowInner; // v[ 0, 1] +uniform float _GlowPower; // v[ 1, 1/(1+4*4)] + +// API Editable properties +uniform float _ShaderFlags; +uniform float _WeightNormal; +uniform float _WeightBold; + +uniform float _ScaleRatioA; +uniform float _ScaleRatioB; +uniform float _ScaleRatioC; + +uniform float _VertexOffsetX; +uniform float _VertexOffsetY; + +//uniform float _UseClipRect; +uniform float _MaskID; +uniform sampler2D _MaskTex; +uniform float4 _MaskCoord; +uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w) +//uniform float _MaskWipeControl; +//uniform float _MaskEdgeSoftness; +//uniform fixed4 _MaskEdgeColor; +//uniform bool _MaskInverse; + +uniform float _MaskSoftnessX; +uniform float _MaskSoftnessY; + +// Font Atlas properties +uniform sampler2D _MainTex; +uniform float _TextureWidth; +uniform float _TextureHeight; +uniform float _GradientScale; +uniform float _ScaleX; +uniform float _ScaleY; +uniform float _PerspectiveFilter; +uniform float _Sharpness; diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_Properties.cginc.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_Properties.cginc.meta new file mode 100644 index 00000000..e6dcc0a0 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_Properties.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3c6c403084eacec478a1129ce20061ea +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_SDF Internal SSD.shader b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_SDF Internal SSD.shader new file mode 100644 index 00000000..7e28d745 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_SDF Internal SSD.shader @@ -0,0 +1,126 @@ +// Simplified SDF shader: +// - No Shading Option (bevel / bump / env map) +// - No Glow Option +// - Softness is applied on both side of the outline + +Shader "Hidden/TextMeshPro/Internal/Distance Field SSD" { + +Properties { + _FaceColor ("Face Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0.02 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = .5 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5 + _ScaleX ("Scale X", float) = 1 + _ScaleY ("Scale Y", float) = 1 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _ColorMask ("Color Mask", Float) = 15 +} + +SubShader { + Tags + { + "ForceSupported" = "True" + } + + Lighting Off + Blend One OneMinusSrcAlpha + Cull Off + ZWrite Off + ZTest Always + + Pass { + CGPROGRAM + #pragma vertex VertShader + #pragma fragment PixShader + + #include "UnityCG.cginc" + #include "TMP_Properties.cginc" + + sampler2D _GUIClipTexture; + uniform float4x4 unity_GUIClipTextureMatrix; + + struct vertex_t { + float4 vertex : POSITION; + float3 normal : NORMAL; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + struct pixel_t { + float4 vertex : SV_POSITION; + fixed4 faceColor : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 clipUV : TEXCOORD1; + }; + + + pixel_t VertShader(vertex_t input) + { + // Does not handle simulated bold correctly. + + float4 vert = input.vertex; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + float4 vPosition = UnityObjectToClipPos(vert); + + float opacity = input.color.a; + + fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; + faceColor.rgb *= faceColor.a; + + // Generate UV for the Clip Texture + float3 eyePos = UnityObjectToViewPos(input.vertex); + float2 clipUV = mul(unity_GUIClipTextureMatrix, float4(eyePos.xy, 0, 1.0)); + + // Structure for pixel shader + pixel_t output = { + vPosition, + faceColor, + float2(input.texcoord0.x, input.texcoord0.y), + clipUV, + }; + + return output; + } + + half transition(half2 range, half distance) + { + return smoothstep(range.x, range.y, distance); + } + + // PIXEL SHADER + fixed4 PixShader(pixel_t input) : SV_Target + { + half distanceSample = tex2D(_MainTex, input.texcoord0).a; + half smoothing = fwidth(distanceSample) * (1 - _Sharpness) + _OutlineSoftness; + half contour = 0.5 - _FaceDilate * 0.5; + half2 edgeRange = half2(contour - smoothing, contour + smoothing); + + half4 c = input.faceColor; + + half edgeTransition = transition(edgeRange, distanceSample); + c *= edgeTransition; + + c *= tex2D(_GUIClipTexture, input.clipUV).a; + + return c; + } + ENDCG + } +} + +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta new file mode 100644 index 00000000..7845e119 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ce4ec0f498d1b1a4f90fe94e115b6f9a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures.meta new file mode 100644 index 00000000..d6754b05 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8e6a2d47aba4c6c9b3c5a72d9f48da5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Dark.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Dark.psd new file mode 100644 index 00000000..8ebaa27a Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Dark.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Dark.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Dark.psd.meta new file mode 100644 index 00000000..ed7250a7 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Dark.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: fb5730e24283d0c489e5c7d0bee023d9 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Light.psd new file mode 100644 index 00000000..e598e6d9 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Light.psd.meta new file mode 100644 index 00000000..1e747b22 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/SectionHeader_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: e3b0f810fdea84e40ab4ba20f256f7e8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine.psd new file mode 100644 index 00000000..3da358a1 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine.psd.meta new file mode 100644 index 00000000..09deb3c8 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 8bc445bb79654bf496c92d0407840a92 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine_Light.psd new file mode 100644 index 00000000..cf49b6cb Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta new file mode 100644 index 00000000..78e14cba --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 18775b51e3bd42299fd30bd036ea982f +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom.psd new file mode 100644 index 00000000..1f35779e Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom.psd.meta new file mode 100644 index 00000000..8e79b489 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: ca51b19024094d1b87f3e07edb0a75fb +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom_Light.psd new file mode 100644 index 00000000..d8af55bd Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta new file mode 100644 index 00000000..9c9a6fc0 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 585b70cb75dd43efbfead809c30a1731 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine.psd new file mode 100644 index 00000000..7eefe6b2 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine.psd.meta new file mode 100644 index 00000000..0455a2fc --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine.psd.meta @@ -0,0 +1,58 @@ +fileFormatVersion: 2 +guid: 0d9a36012a224080966c7b55896aa0f9 +timeCreated: 1467964791 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine_Light.psd new file mode 100644 index 00000000..f08bb6ce Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta new file mode 100644 index 00000000..dfd05a11 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta @@ -0,0 +1,58 @@ +fileFormatVersion: 2 +guid: 49679f302ac6408697f6b9314a38985c +timeCreated: 1467964413 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter.psd new file mode 100644 index 00000000..939bc6dc Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter.psd.meta new file mode 100644 index 00000000..d189fc27 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 81ed8c76d2bc4a4c95d092c98af4e58f +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo.psd new file mode 100644 index 00000000..f9ce9a8b Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta new file mode 100644 index 00000000..555bb1bb --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: c76700ea0062413d9f69409b4e9e151b +timeCreated: 1484171296 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd new file mode 100644 index 00000000..e37b2e25 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta new file mode 100644 index 00000000..044d0c21 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 35ff0937876540d3bd4b6a941df62a92 +timeCreated: 1484171296 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter_Light.psd new file mode 100644 index 00000000..7274887f Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta new file mode 100644 index 00000000..d98d3772 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 6ace62d30f494c948b71d5594afce11d +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush.psd new file mode 100644 index 00000000..eeeea67b Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush.psd.meta new file mode 100644 index 00000000..84ed28c0 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 691475c57a824010be0c6f474caeb7e1 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush_Light.psd new file mode 100644 index 00000000..b69f6a2e Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta new file mode 100644 index 00000000..b9e61247 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 64b9fad609434c489c32b1cdf2004a1c +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified.psd new file mode 100644 index 00000000..3ce55c49 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified.psd.meta new file mode 100644 index 00000000..f8a90b42 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified.psd.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 92027f7f8cfc4feaa477da0dc38d3d46 +timeCreated: 1472535271 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified_Light.psd new file mode 100644 index 00000000..d7fd5c82 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta new file mode 100644 index 00000000..e5b5aa85 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: fa6bd40a216346b783a4cce741d277a5 +timeCreated: 1472535778 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft.psd new file mode 100644 index 00000000..fc7e10b2 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft.psd.meta new file mode 100644 index 00000000..8023379e --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 9288066c33474b94b6ee5465f4df1cc0 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft_Light.psd new file mode 100644 index 00000000..5522c373 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta new file mode 100644 index 00000000..aaa8b81d --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 12736c98af174f91827a26b66d2b01b9 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidLine.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidLine.psd new file mode 100644 index 00000000..14d28a2d Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidLine.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidLine.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidLine.psd.meta new file mode 100644 index 00000000..e481463b --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidLine.psd.meta @@ -0,0 +1,58 @@ +fileFormatVersion: 2 +guid: c2f7f6a88b4c4f20a53deb72f3d9144c +timeCreated: 1426240649 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle.psd new file mode 100644 index 00000000..c4483dbd Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle.psd.meta new file mode 100644 index 00000000..d1ec5285 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 41b96614b2e6494ba995ddcd252d11ae +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle_Light.psd new file mode 100644 index 00000000..4263bf9b Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta new file mode 100644 index 00000000..7cda20b7 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 066619c9c9c84f89acb1b48c11a7efe2 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidline_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidline_Light.psd new file mode 100644 index 00000000..a5bed371 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidline_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta new file mode 100644 index 00000000..6fabec54 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta @@ -0,0 +1,58 @@ +fileFormatVersion: 2 +guid: bb42b2d967d6427983c901a4ffc8ecd9 +timeCreated: 1426240650 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight.psd new file mode 100644 index 00000000..4ef1998b Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight.psd.meta new file mode 100644 index 00000000..cf5c7649 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 342a0f8aca7f4f0691338912faec0494 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight_Light.psd new file mode 100644 index 00000000..bdeff413 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight_Light.psd.meta new file mode 100644 index 00000000..dab7997c --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignRight_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: e05ace3bd15740cda0bad60d89092a5b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop.psd new file mode 100644 index 00000000..b00d4585 Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop.psd.meta new file mode 100644 index 00000000..74931bf8 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 48d034c499ee4697af9dd6e327110249 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop_Light.psd new file mode 100644 index 00000000..84f0e61c Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop_Light.psd differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop_Light.psd.meta new file mode 100644 index 00000000..bbd509d1 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Editor Resources/Textures/btn_AlignTop_Light.psd.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: ed041e68439749a69d0efa0e3d896c2e +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/LICENSE.md b/Library/PackageCache/com.unity.textmeshpro@2.0.0/LICENSE.md new file mode 100644 index 00000000..2d8ac22c --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/LICENSE.md @@ -0,0 +1,5 @@ +TextMesh Pro copyright © 2014-2018 Unity Technologies ApS + +Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). + +Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/LICENSE.md.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/LICENSE.md.meta new file mode 100644 index 00000000..1df95556 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0d2d0f36e67d4518a07df76235e91f9a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources.meta new file mode 100644 index 00000000..e8a96b82 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5ec95f4d5b2d1f14e9ff8682562553f9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Essential Resources.unitypackage b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Essential Resources.unitypackage new file mode 100644 index 00000000..f813931d Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Essential Resources.unitypackage differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Essential Resources.unitypackage.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Essential Resources.unitypackage.meta new file mode 100644 index 00000000..bc49ab30 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Essential Resources.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ce4ff17ca867d2b48b5c8a4181611901 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Examples & Extras.unitypackage b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Examples & Extras.unitypackage new file mode 100644 index 00000000..3c36ab2a Binary files /dev/null and b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Examples & Extras.unitypackage differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Examples & Extras.unitypackage.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Examples & Extras.unitypackage.meta new file mode 100644 index 00000000..aaf21f78 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Package Resources/TMP Examples & Extras.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc00e25696e4132499f56528d3fed2e3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData.json b/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData.json new file mode 100644 index 00000000..05c193e2 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData.json @@ -0,0 +1,654 @@ +{ + "assetRecords": [ + { + "referencedResource": "Blue to Purple - Vertical.asset", + "target": "guid: 1e643bbd7e13d46418da3774e72bef60", + "replacement": "guid: 479a66fa4b094512a62b0a8e553ad95a" + }, + { + "referencedResource": "Dark to Light Green - Vertical.asset", + "target": "guid: 90c9133b254e2184b8084dea4f392337", + "replacement": "guid: 4c86a3366cd840348ebe8dc438570ee4" + }, + { + "referencedResource": "Light to Dark Green - Vertical.asset", + "target": "guid: 33c745f0979f3984182a138bcc6e57ec", + "replacement": "guid: 5cf8ae092ca54931b443bec5148f3c59" + }, + { + "referencedResource": "Yellow to Orange - Vertical.asset", + "target": "guid: e002cb2a36d9e4a439a062867fa24e1e", + "replacement": "guid: 69a525efa7e6472eab268f6ea605f06e" + }, + { + "referencedResource": "Crate - Surface Shader Scene.mat", + "target": "guid: e177c46c2a091564d88df2c2ca9dcf97", + "replacement": "guid: e6b9b44320f4448d9d5e0ee634259966" + }, + { + "referencedResource": "Ground - Logo Scene.mat", + "target": "guid: 504ae362e57fc464b847f1e9fd0e4035", + "replacement": "guid: c719e38f25a9480abd2480ab621a2949" + }, + { + "referencedResource": "Ground - Surface Shader Scene.mat", + "target": "guid: 9ed9aa864ec2d7f4dad266b9534c6d85", + "replacement": "guid: aadd5a709a48466c887296bb5b1b8110" + }, + { + "referencedResource": "Small Crate_diffuse.mat", + "target": "guid: 92f161029a6d3c54a92d9d283352a135", + "replacement": "guid: 22262639920f43d6be32430e4e58350d" + }, + { + "referencedResource": "Text Popup.prefab", + "target": "guid: c879e892866c8db4f8930b25672233ac", + "replacement": "guid: b06f0e6c1dfa4356ac918da1bb32c603" + }, + { + "referencedResource": "TextMeshPro - Prefab 1.prefab", + "target": "guid: a6a60659abb4d9d4b934feebd3dcc952", + "replacement": "guid: a6e39ced0ea046bcb636c3f0b2e2a745" + }, + { + "referencedResource": "TextMeshPro - Prefab 2.prefab", + "target": "guid: 1b190e3e0ab4c8e4881656b9160c59c2", + "replacement": "guid: fdad9d952ae84cafb74c63f2e694d042" + }, + { + "referencedResource": "Anton SDF.asset", + "target": "guid: f76ef802b8b940c46a31f9027f2b0158", + "replacement": "guid: 8a89fa14b10d46a99122fd4f73fca9a2" + }, + { + "referencedResource": "Anton SDF - Drop Shadow.mat", + "target": "guid: 250a1a103b3b4914c9707e6a423446d6", + "replacement": "guid: 749b9069dc4742c5bfa5c74644049926" + }, + { + "referencedResource": "Anton SDF - Outline.mat", + "target": "guid: e077dc203e948b740859c1c0ca8b9691", + "replacement": "guid: a00013af81304728b2be1f4309ee2433" + }, + { + "referencedResource": "Bangers SDF.asset", + "target": "guid: 808aa8f1ab804104aa7d0c337a6c1481", + "replacement": "guid: 125cb55b44b24c4393181402bc6200e6" + }, + { + "referencedResource": "Bangers SDF - Drop Shadow.mat", + "target": "guid: c26f698d4eee19e4a8b8f42cd299bab5", + "replacement": "guid: f2dcf029949142e28b974630369c8b4e" + }, + { + "referencedResource": "Bangers SDF - Outline.mat", + "target": "guid: db7f2cfbf23d6d54ca4e74a9abd55326", + "replacement": "guid: f629c6e43dba4bf38cb74d8860150664" + }, + { + "referencedResource": "Bangers SDF Glow.mat", + "target": "guid: 7dd7006c58d8a3148a73aa211d8c13d0", + "replacement": "guid: d75b8f41e959450c84ac6e967084d3e1" + }, + { + "referencedResource": "Bangers SDF Logo.mat", + "target": "guid: 4fb51aa7001a2244395ddf6a15d37389", + "replacement": "guid: f4e195ac1e204eff960149d1cb34e18c" + }, + { + "referencedResource": "Electronic Highway Sign SDF.asset", + "target": "guid: 163292f6f226d954593d45b079f8aae0", + "replacement": "guid: dc36b3fdc14f47ebb36fd484a67e268a" + }, + { + "referencedResource": "LiberationSans SDF - Drop Shadow.mat", + "target": "guid: 33db60c37b63f08448ded4b385e74e38", + "replacement": "guid: e73a58f6e2794ae7b1b7e50b7fb811b0" + }, + { + "referencedResource": "LiberationSans SDF - Metalic Green.mat", + "target": "guid: 4f9843c79516ed1468b9b5a4f32e67e3", + "replacement": "guid: 8b29aaa3eec7468097ff07adfcf29ac9" + }, + { + "referencedResource": "LiberationSans SDF - Outline.mat", + "target": "guid: 83a1b0fe6c3dbac44b66f09c82e1d509", + "replacement": "guid: 79459efec17a4d00a321bdcc27bbc385" + }, + { + "referencedResource": "LiberationSans SDF - Overlay.mat", + "target": "guid: 55eb086ae18c76e4bb6cc7106d0dd6e2", + "replacement": "guid: 9ad269c99dcf42b7aedefd83dd5a7b9d" + }, + { + "referencedResource": "LiberationSans SDF - Soft Mask.mat", + "target": "guid: 74e06d99c1657fc4abd33f20685ea9ff", + "replacement": "guid: 42df1c7856584b6b8db9a509b6b10074" + }, + { + "referencedResource": "Oswald Bold SDF.asset", + "target": "guid: 09641b029dfa78843902b548a9de7553", + "replacement": "guid: 0161d805a3764c089bef00bfe00793f5" + }, + { + "referencedResource": "Roboto-Bold SDF.asset", + "target": "guid: d62a573c923f5cb47b8ff65261033b90", + "replacement": "guid: 5302535af1044152a457ed104f1f4b91" + }, + { + "referencedResource": "Roboto-Bold SDF - Drop Shadow.mat", + "target": "guid: 102e7c5c5e3b1f3468518cb166967d77", + "replacement": "guid: b246c4190f4e46ec9352fe15a7b09ce0" + }, + { + "referencedResource": "Roboto-Bold SDF - Surface.mat", + "target": "guid: e2da38ead8f8238449c54a1ef49e080f", + "replacement": "guid: e6b276ec991f467aa14ef1f3cc665993" + }, + { + "referencedResource": "DropCap Numbers.asset", + "target": "guid: c4fd2a959a50b584b92dedfefec1ffda", + "replacement": "guid: 14aa93acbb234d16aaef0e8b46814db6" + }, + { + "referencedResource": "Benchmark01.cs", + "target": "guid: c5fb1b5c24460f745be29cc0eb06a58c", + "replacement": "guid: f970ea55f9f84bf79b05dab180b8c125" + }, + { + "referencedResource": "Benchmark01_UGUI.cs", + "target": "guid: 5e6abf300e36c0a4eb43969c3f2172f8", + "replacement": "guid: 8ef7be1c625941f7ba8ed7cc71718c0d" + }, + { + "referencedResource": "Benchmark02.cs", + "target": "guid: 3467f4170568a484d8b57e2051a27363", + "replacement": "guid: e8538afcddc14efbb5d9e94b7ae50197" + }, + { + "referencedResource": "Benchmark03.cs", + "target": "guid: e6e9d20624a23da4c8b2b6fb7608bb9a", + "replacement": "guid: a73109742c8d47ac822895a473300c29" + }, + { + "referencedResource": "Benchmark04.cs", + "target": "guid: 481dd67bdedc3104ea2156ed49f3acd5", + "replacement": "guid: dc20866c0d5e413ab7559440e15333ae" + }, + { + "referencedResource": "CameraController.cs", + "target": "guid: a9f0e07aefca0cc459134ff9df622278", + "replacement": "guid: 2d687537154440a3913a9a3c7977978c" + }, + { + "referencedResource": "ChatController.cs", + "target": "guid: eba5a4db2591a5844aea5f6f3ad8548e", + "replacement": "guid: 53d91f98a2664f5cb9af11de72ac54ec" + }, + { + "referencedResource": "EnvMapAnimator.cs", + "target": "guid: 7e69f3f28c520ce4d9ab9964b2895b1a", + "replacement": "guid: a4b6f99e8bc54541bbd149b014ff441c" + }, + { + "referencedResource": "ObjectSpin.cs", + "target": "guid: 5e7872ff51989434dabf7807265ada3c", + "replacement": "guid: 4f19c7f94c794c5097d8bd11e39c750d" + }, + { + "referencedResource": "ShaderPropAnimator.cs", + "target": "guid: c56cf968fb6a5b6488e709242718845d", + "replacement": "guid: 2787a46a4dc848c1b4b7b9307b614bfd" + }, + { + "referencedResource": "SimpleScript.cs", + "target": "guid: c64808ff5137c9044a583750e5b0468a", + "replacement": "guid: 9eff140b25d64601aabc6ba32245d099" + }, + { + "referencedResource": "SkewTextExample.cs", + "target": "guid: 48d40dfeb33b717488f55ddbf676643a", + "replacement": "guid: d412675cfb3441efa3bf8dcd9b7624dc" + }, + { + "referencedResource": "TeleType.cs", + "target": "guid: 9094c5c777af3f14489e8947748e86e6", + "replacement": "guid: e32c266ee6204b21a427753cb0694c81" + }, + { + "referencedResource": "TextConsoleSimulator.cs", + "target": "guid: 45757dcc8f119454dac6365e8fd15e8b", + "replacement": "guid: 43bcd35a1c0c40ccb6d472893fe2093f" + }, + { + "referencedResource": "TextMeshProFloatingText.cs", + "target": "guid: dd0e4b969aa70504382a89d2f208ae6c", + "replacement": "guid: a4d4c76e63944cba8c7d00f56334b98c" + }, + { + "referencedResource": "TextMeshSpawner.cs", + "target": "guid: 385939aed18e82d41894437798c30ed8", + "replacement": "guid: 76c11bbcfddf44e0ba17d6c2751c8d84" + }, + { + "referencedResource": "TMP_ExampleScript_01.cs", + "target": "guid: 36bafabb5572c6347923b971425ab3be", + "replacement": "guid: 6f2c5b59b6874405865e2616e4ec276a" + }, + { + "referencedResource": "TMP_FrameRateCounter.cs", + "target": "guid: c0357609254b68d4881cab18f04dd4dc", + "replacement": "guid: 686ec78b56aa445795335fbadafcfaa4" + }, + { + "referencedResource": "TMP_TextEventCheck.cs", + "target": "guid: ba181bda76b7f6047ba2188e94bf0894", + "replacement": "guid: d736ce056cf444ca96e424f4d9c42b76" + }, + { + "referencedResource": "TMP_TextEventHandler.cs", + "target": "guid: 48a2fdbd95acd794caf78a85a0b6926a", + "replacement": "guid: 1312ae25639a4bae8e25ae223209cc50" + }, + { + "referencedResource": "TMP_TextInfoDebugTool.cs", + "target": "guid: 5eeee4467ee5b6a4884a1ec94812d93e", + "replacement": "guid: 21256c5b62f346f18640dad779911e20" + }, + { + "referencedResource": "TMP_TextSelector_A.cs", + "target": "guid: 68baf2864c88f4a43a50f16709de8717", + "replacement": "guid: 103e0a6a1d404693b9fb1a5173e0e979" + }, + { + "referencedResource": "TMP_TextSelector_B.cs", + "target": "guid: f499ff45b9a3d0840a0df48d01b2877b", + "replacement": "guid: a05dcd8be7ec4ccbb35c26219884aa37" + }, + { + "referencedResource": "TMP_UiFrameRateCounter.cs", + "target": "guid: dc33b7a34d20d5e4e8d54b6867ce81e3", + "replacement": "guid: 24b0dc2d1d494adbbec1f4db26b4cf83" + }, + { + "referencedResource": "TMPro_InstructionOverlay.cs", + "target": "guid: 53b866620ba77504eaf52cab7dbd95c9", + "replacement": "guid: c3c1afeda5e545e0b19add5373896d2e" + }, + { + "referencedResource": "VertexColorCycler.cs", + "target": "guid: c8d54cdd5913d4e4bb7b655d7d16835b", + "replacement": "guid: 91b8ba3d52e041fab2d0e0f169855539" + }, + { + "referencedResource": "VertexJitter.cs", + "target": "guid: e4769cb37968ea948a763a9a89f9e583", + "replacement": "guid: 2ed57967c52645d390a89dcf8f61ba73" + }, + { + "referencedResource": "VertexShakeA.cs", + "target": "guid: eaa12d191e718c945ac55da73fa469db", + "replacement": "guid: f7cfa58e417a46ea8889989684c2522e" + }, + { + "referencedResource": "VertexShakeB.cs", + "target": "guid: 32c83a5d3ba42b84aa26386eac47566b", + "replacement": "guid: e4e0d9ccee5f4950be8979268c9014e0" + }, + { + "referencedResource": "VertexZoom.cs", + "target": "guid: 5305493000edc7d4ea4302757dc19a99", + "replacement": "guid: 52ec835d14bd486f900952b77698b7eb" + }, + { + "referencedResource": "WarpTextExample.cs", + "target": "guid: f3eef864a10f51045a7530e2afe7c179", + "replacement": "guid: 790744c462254b7ba8038e6ed28b3db2" + }, + { + "referencedResource": "DropCap Numbers.psd", + "target": "guid: 28b41fef228d6814f90e541deaf9f262", + "replacement": "guid: fd09957580ac4326916010f1f260975b" + }, + { + "referencedResource": "Brushed Metal 3.jpg", + "target": "guid: c30270e41dccf9441ab56d94261bdcfa", + "replacement": "guid: f88677df267a41d6be1e7a6133e7d227" + }, + { + "referencedResource": "Engraved Wall.jpg", + "target": "guid: 93d6f74f2ef358e41989d4152b195f88", + "replacement": "guid: e0f91e6569da4934a48d85bf8d3063f0" + }, + { + "referencedResource": "Engraved Wall Normal.jpg", + "target": "guid: 1edd0950293e8664094053a041548c23", + "replacement": "guid: 20f91c93e7fb490f9496609c52ef3904" + }, + { + "referencedResource": "Floor Cement.jpg", + "target": "guid: ac5a0a5373b36e049bb7f98f88dbc244", + "replacement": "guid: 283f897e4925411ebbaa758b4cb13fc2" + }, + { + "referencedResource": "Floor Tiles 1 - diffuse.jpg", + "target": "guid: 7bbfb8818476e4641ba3e75f5225eb69", + "replacement": "guid: 85ac55597b97403c82fc6601a93cf241" + }, + { + "referencedResource": "Floor Tiles 1 - normal.jpg", + "target": "guid: e00d5a9a0944134448432ccacf221b95", + "replacement": "guid: c45cd05946364f32aba704f0853a975b" + }, + { + "referencedResource": "Fruit Jelly (B&W).jpg", + "target": "guid: 74d8c208a0193e14ca6916bea88a2c52", + "replacement": "guid: 1cdc5b506b1a4a33a53c30669ced1f51" + }, + { + "referencedResource": "Gradient Diagonal (Color).jpg", + "target": "guid: 2421a4955e71725448211e6bfbc7d7fb", + "replacement": "guid: 2ce5c55e85304b819a1826ecbc839aa5" + }, + { + "referencedResource": "Gradient Horizontal (Color).jpg", + "target": "guid: 0bbb43aff4f7811419ffceb1b16cf3d6", + "replacement": "guid: 6eb184de103d4b3f812b38561065192f" + }, + { + "referencedResource": "Gradient Vertical (Color).jpg", + "target": "guid: 3359915af07779e4e9a966df9eed764f", + "replacement": "guid: 03d0538de6e24c0f819bfc9ce084dfa9" + }, + { + "referencedResource": "Mask Zig-n-Zag.psd", + "target": "guid: 04eb87e72b3c1c648ba47a869ee00505", + "replacement": "guid: bb8dfcd263ad4eb383a33d74a720be6f" + }, + { + "referencedResource": "Sand Normal Map.jpg", + "target": "guid: 89e1b1c005d29cf4598ea861deb35a80", + "replacement": "guid: 8b8c8a10edf94ddc8cc4cc4fcd5696a9" + }, + { + "referencedResource": "Small Crate_diffuse.jpg", + "target": "guid: 64734c9bc6df32149a0c9cb0b18693e1", + "replacement": "guid: 602cb87b6a29443b8636370ea0751574" + }, + { + "referencedResource": "Small Crate_normal.jpg", + "target": "guid: 81b50d9cb6f3104448ec54c00a80101a", + "replacement": "guid: 8878a782f4334ecbbcf683b3ac780966" + }, + { + "referencedResource": "Stainless 03.png", + "target": "guid: 40d7f27f614cc1043a1f7e19074f461c", + "replacement": "guid: 83cb272f9ee046f6ab6636ca38af8db4" + }, + { + "referencedResource": "Text Overflow - Linked Text Image 1.png", + "target": "guid: 1fd8c568b1fcdbe43be65c1619cf3293", + "replacement": "guid: 4ccf43d26c4748c792174516f4a8fcef" + }, + { + "referencedResource": "Text Overflow - Linked Text UI Screenshot.png", + "target": "guid: 7983d2ec0427c114a916ae3c4769dc10", + "replacement": "guid: c76d18757a194d618355f05f815cb0a1" + }, + { + "referencedResource": "Wipe Pattern - Circle.psd", + "target": "guid: 6f5e9497d22a7a84193ec825e2eb41ac", + "replacement": "guid: 10c49fcd9c64421db7c0133e61e55f97" + }, + { + "referencedResource": "Wipe Pattern - Diagonal.psd", + "target": "guid: 8ee4d366b96418044aa9f94b3e2de645", + "replacement": "guid: ed5290d8df18488780e2996b9b882f01" + }, + { + "referencedResource": "Wipe Pattern - Radial Double.psd", + "target": "guid: 3e0e22da7c9570b498205179ef58ef38", + "replacement": "guid: 7631f4eff8f74ed38eb3eb9db17134e1" + }, + { + "referencedResource": "Wipe Pattern - Radial Quad.psd", + "target": "guid: 05ffd580f33f74644a6025ec196860af", + "replacement": "guid: 2b5e9ae96c5644d8bae932f8b4ca68a2" + }, + { + "referencedResource": "LiberationSans SDF.asset", + "target": "guid: 715b80e429c437e40867928a4e1fc975", + "replacement": "guid: 8f586378b4e144a9851e7b34d9b748ee" + }, + { + "referencedResource": "LineBreaking Following Characters.txt", + "target": "guid: 312ba5b9e90627940866e19549a788cf", + "replacement": "guid: fade42e8bc714b018fac513c043d323b" + }, + { + "referencedResource": "LineBreaking Leading Characters.txt", + "target": "guid: 8d713940fcbede142ae4a33ea0062b33", + "replacement": "guid: d82c1b31c7e74239bff1220585707d2b" + }, + { + "referencedResource": "TMP_Bitmap.shader", + "target": "guid: edfcf888cd11d9245b91d2883049a57e", + "replacement": "guid: 128e987d567d4e2c824d754223b3f3b0" + }, + { + "referencedResource": "TMP_Bitmap-Mobile.shader", + "target": "guid: d1cf17907700cb647aa3ea423ba38f2e", + "replacement": "guid: 1e3b057af24249748ff873be7fafee47" + }, + { + "referencedResource": "TMP_SDF.shader", + "target": "guid: dca26082f9cb439469295791d9f76fe5", + "replacement": "guid: 68e6db2ebdc24f95958faec2be5558d6" + }, + { + "referencedResource": "TMP_SDF Overlay.shader", + "target": "guid: 4a7755d6b5b67874f89c85f56f95fe97", + "replacement": "guid: dd89cf5b9246416f84610a006f916af7" + }, + { + "referencedResource": "TMP_SDF-Mobile.shader", + "target": "guid: cafd18099dfc0114896e0a8b277b81b6", + "replacement": "guid: fe393ace9b354375a9cb14cdbbc28be4" + }, + { + "referencedResource": "TMP_SDF-Mobile Masking.shader", + "target": "guid: afc255f7c2be52e41973a3d10a2e632d", + "replacement": "guid: bc1ede39bf3643ee8e493720e4259791" + }, + { + "referencedResource": "TMP_SDF-Mobile Overlay.shader", + "target": "guid: 9ecb3fe313cb5f7478141eba4a2d54ed", + "replacement": "guid: a02a7d8c237544f1962732b55a9aebf1" + }, + { + "referencedResource": "TMP_SDF-Surface.shader", + "target": "guid: 8e6b9842dbb1a5a4887378afab854e63", + "replacement": "guid: f7ada0af4f174f0694ca6a487b8f543d" + }, + { + "referencedResource": "TMP_SDF-Surface-Mobile.shader", + "target": "guid: 3c2ea7753c1425145a74d106ec1cd852", + "replacement": "guid: 85187c2149c549c5b33f0cdb02836b17" + }, + { + "referencedResource": "TMP_Sprite.shader", + "target": "guid: 3a1c68c8292caf046bd21158886c5e40", + "replacement": "guid: cf81c85f95fe47e1a27f6ae460cf182c" + }, + { + "referencedResource": "Default Sprite Asset.asset", + "target": "guid: 273ca6c80b4b5d746b5e548f532bffd8", + "replacement": "guid: fbef3c704dce48f08a44612d6c856c8d" + }, + { + "referencedResource": "EmojiOne.asset", + "target": "guid: 9a952e2781ef26940ae089f1053ef4ef", + "replacement": "guid: c41005c129ba4d66911b75229fd70b45" + }, + { + "referencedResource": "TMP Default Style Sheet.asset", + "target": "guid: 54d1085f9a2fdea4587fcfc7dddcd4bc", + "replacement": "guid: f952c082cb03451daed3ee968ac6c63e" + }, + { + "referencedResource": "TMP Settings.asset", + "target": "guid: 69ed5bac41eebaa4c97e9d2a4168c54f", + "replacement": "guid: 3f5b5dff67a942289a9defa416b206f3" + }, + { + "referencedResource": "TextContainer.cs", + "target": "guid: 3b34fc186f40e8043b977d4fa70db8c5", + "replacement": "guid: 32d40088a6124c578ad6b428df586e2e" + }, + { + "referencedResource": "TextContainer.cs", + "target": "fileID: 311004786, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 32d40088a6124c578ad6b428df586e2e" + }, + { + "referencedResource": "TextMeshPro.cs", + "target": "guid: 1a1578b9753d2604f98d608cb4239e2f", + "replacement": "guid: 9541d86e2fd84c1d9990edf0852d74ab" + }, + { + "referencedResource": "TextMeshPro.cs", + "target": "fileID: -806885394, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab" + }, + { + "referencedResource": "TextMeshProUGUI.cs", + "target": "guid: 496f2e385b0c62542b5c739ccfafd8da", + "replacement": "guid: f4688fdb7df04437aeb418b961361dc5" + }, + { + "referencedResource": "TextMeshProUGUI.cs", + "target": "fileID: 1453722849, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5" + }, + { + "referencedResource": "TMP_Asset.cs", + "target": "guid: e2c4405608b405a4680436e183e53c45", + "replacement": "guid: 3bda1886f58f4e0ab1139400b160c3ee" + }, + { + "referencedResource": "TMP_Asset.cs", + "target": "fileID: -659140726, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 3bda1886f58f4e0ab1139400b160c3ee" + }, + { + "referencedResource": "TMP_ColorGradient.cs", + "target": "guid: e90e18dd4a044ff4394833216e6bf4d2", + "replacement": "guid: 54d21f6ece3b46479f0c328f8c6007e0" + }, + { + "referencedResource": "TMP_ColorGradient.cs", + "target": "fileID: 2108210716, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0" + }, + { + "referencedResource": "TMP_Dropdown.cs", + "target": "guid: 44cb1d34ddab9d449a05fc3747876be1", + "replacement": "guid: 7b743370ac3e4ec2a1668f5455a8ef8a" + }, + { + "referencedResource": "TMP_Dropdown.cs", + "target": "fileID: 1148083418, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 7b743370ac3e4ec2a1668f5455a8ef8a" + }, + { + "referencedResource": "TMP_FontAsset.cs", + "target": "guid: 74dfce233ddb29b4294c3e23c1d3650d", + "replacement": "guid: 71c1514a6bd24e1e882cebbe1904ce04" + }, + { + "referencedResource": "TMP_FontAsset.cs", + "target": "fileID: -667331979, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04" + }, + { + "referencedResource": "TMP_InputField.cs", + "target": "guid: 7b85855a3deaa2e44ac6741a6bbc85f6", + "replacement": "guid: 2da0c512f12947e489f739169773d7ca" + }, + { + "referencedResource": "TMP_InputField.cs", + "target": "fileID: -1620774994, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca" + }, + { + "referencedResource": "TMP_Settings.cs", + "target": "guid: aafc3c7b9e915d64e8ec3d2c88b3a231", + "replacement": "guid: 2705215ac5b84b70bacc50632be6e391" + }, + { + "referencedResource": "TMP_Settings.cs", + "target": "fileID: -395462249, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391" + }, + { + "referencedResource": "TMP_SpriteAsset.cs", + "target": "guid: 90940d439ca0ef746af0b48419b92d2e", + "replacement": "guid: 84a92b25f83d49b9bc132d206b370281" + }, + { + "referencedResource": "TMP_SpriteAsset.cs", + "target": "fileID: 2019389346, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 84a92b25f83d49b9bc132d206b370281" + }, + { + "referencedResource": "TMP_StyleSheet.cs", + "target": "guid: 13259b4ce497b194eb52a33d8eda0bdc", + "replacement": "guid: ab2114bdc8544297b417dfefe9f1e410" + }, + { + "referencedResource": "TMP_StyleSheet.cs", + "target": "fileID: -1936749209, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410" + }, + { + "referencedResource": "TMP_SubMesh.cs", + "target": "guid: bd950677b2d06c74494b1c1118584fff", + "replacement": "guid: 07994bfe8b0e4adb97d706de5dea48d5" + }, + { + "referencedResource": "TMP_SubMesh.cs", + "target": "fileID: 1330537494, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 07994bfe8b0e4adb97d706de5dea48d5" + }, + { + "referencedResource": "TMP_SubMeshUI.cs", + "target": "guid: a5378e1f14d974d419f811d6b0861f20", + "replacement": "guid: 058cba836c1846c3aa1c5fd2e28aea77" + }, + { + "referencedResource": "TMP_SubMeshUI.cs", + "target": "fileID: 1908110080, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 058cba836c1846c3aa1c5fd2e28aea77" + }, + { + "referencedResource": "TMP_Text.cs", + "target": "guid: 9ec8dc9c3fa2e5d41b939b5888d2f1e8", + "replacement": "guid: 5143f58107604835ab1a5efa2d8818fd" + }, + { + "referencedResource": "TMP_Text.cs", + "target": "fileID: -1385168320, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 5143f58107604835ab1a5efa2d8818fd" + }, + { + "referencedResource": "Default Sprite Asset.png", + "target": "guid: 5b32c2d36abe44540bed74c1f787033b", + "replacement": "guid: a0fc465d6cf04254a2938578735e2383" + }, + { + "referencedResource": "EmojiOne.png", + "target": "guid: 6ec706981a919c3489f0b061a40054e2", + "replacement": "guid: dffef66376be4fa480fb02b19edbe903" + } + ] +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData.json.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData.json.meta new file mode 100644 index 00000000..a7a2790c --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 05f5bfd584002f948982a1498890f9a9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData_Assets.json b/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData_Assets.json new file mode 100644 index 00000000..f07aa23f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData_Assets.json @@ -0,0 +1,184 @@ +{ + "assetRecords": [ + { + "referencedResource": "TMP_FontAsset.cs", + "target": "guid: 74dfce233ddb29b4294c3e23c1d3650d", + "replacement": "guid: 71c1514a6bd24e1e882cebbe1904ce04" + }, + { + "referencedResource": "TMP_FontAsset.cs", + "target": "fileID: -667331979, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04" + }, + { + "referencedResource": "Anton SDF.asset", + "target": "guid: f76ef802b8b940c46a31f9027f2b0158", + "replacement": "guid: 8a89fa14b10d46a99122fd4f73fca9a2" + }, + { + "referencedResource": "Bangers SDF.asset", + "target": "guid: 808aa8f1ab804104aa7d0c337a6c1481", + "replacement": "guid: 125cb55b44b24c4393181402bc6200e6" + }, + { + "referencedResource": "Electronic Highway Sign SDF.asset", + "target": "guid: 163292f6f226d954593d45b079f8aae0", + "replacement": "guid: dc36b3fdc14f47ebb36fd484a67e268a" + }, + { + "referencedResource": "Oswald Bold SDF.asset", + "target": "guid: 09641b029dfa78843902b548a9de7553", + "replacement": "guid: 0161d805a3764c089bef00bfe00793f5" + }, + { + "referencedResource": "Roboto-Bold SDF.asset", + "target": "guid: d62a573c923f5cb47b8ff65261033b90", + "replacement": "guid: 5302535af1044152a457ed104f1f4b91" + }, + { + "referencedResource": "LiberationSans SDF.asset", + "target": "guid: 715b80e429c437e40867928a4e1fc975", + "replacement": "guid: 8f586378b4e144a9851e7b34d9b748ee" + }, + { + "referencedResource": "TMP_Bitmap.shader", + "target": "guid: edfcf888cd11d9245b91d2883049a57e", + "replacement": "guid: 128e987d567d4e2c824d754223b3f3b0" + }, + { + "referencedResource": "TMP_Bitmap-Mobile.shader", + "target": "guid: d1cf17907700cb647aa3ea423ba38f2e", + "replacement": "guid: 1e3b057af24249748ff873be7fafee47" + }, + { + "referencedResource": "TMP_SDF.shader", + "target": "guid: dca26082f9cb439469295791d9f76fe5", + "replacement": "guid: 68e6db2ebdc24f95958faec2be5558d6" + }, + { + "referencedResource": "TMP_SDF Overlay.shader", + "target": "guid: 4a7755d6b5b67874f89c85f56f95fe97", + "replacement": "guid: dd89cf5b9246416f84610a006f916af7" + }, + { + "referencedResource": "TMP_SDF-Mobile.shader", + "target": "guid: cafd18099dfc0114896e0a8b277b81b6", + "replacement": "guid: fe393ace9b354375a9cb14cdbbc28be4" + }, + { + "referencedResource": "TMP_SDF-Mobile Masking.shader", + "target": "guid: afc255f7c2be52e41973a3d10a2e632d", + "replacement": "guid: bc1ede39bf3643ee8e493720e4259791" + }, + { + "referencedResource": "TMP_SDF-Mobile Overlay.shader", + "target": "guid: 9ecb3fe313cb5f7478141eba4a2d54ed", + "replacement": "guid: a02a7d8c237544f1962732b55a9aebf1" + }, + { + "referencedResource": "TMP_SDF-Surface.shader", + "target": "guid: 8e6b9842dbb1a5a4887378afab854e63", + "replacement": "guid: f7ada0af4f174f0694ca6a487b8f543d" + }, + { + "referencedResource": "TMP_SDF-Surface-Mobile.shader", + "target": "guid: 3c2ea7753c1425145a74d106ec1cd852", + "replacement": "guid: 85187c2149c549c5b33f0cdb02836b17" + }, + { + "referencedResource": "TMP_Sprite.shader", + "target": "guid: 3a1c68c8292caf046bd21158886c5e40", + "replacement": "guid: cf81c85f95fe47e1a27f6ae460cf182c" + }, + { + "referencedResource": "TMP_ColorGradient.cs", + "target": "guid: e90e18dd4a044ff4394833216e6bf4d2", + "replacement": "guid: 54d21f6ece3b46479f0c328f8c6007e0" + }, + { + "referencedResource": "TMP_ColorGradient.cs", + "target": "fileID: 2108210716, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0" + }, + { + "referencedResource": "TMP_Settings.cs", + "target": "guid: aafc3c7b9e915d64e8ec3d2c88b3a231", + "replacement": "guid: 2705215ac5b84b70bacc50632be6e391" + }, + { + "referencedResource": "TMP_Settings.cs", + "target": "fileID: -395462249, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391" + }, + { + "referencedResource": "TMP Settings.asset", + "target": "guid: 69ed5bac41eebaa4c97e9d2a4168c54f", + "replacement": "guid: 3f5b5dff67a942289a9defa416b206f3" + }, + { + "referencedResource": "LineBreaking Following Characters.txt", + "target": "guid: 312ba5b9e90627940866e19549a788cf", + "replacement": "guid: fade42e8bc714b018fac513c043d323b" + }, + { + "referencedResource": "LineBreaking Leading Characters.txt", + "target": "guid: 8d713940fcbede142ae4a33ea0062b33", + "replacement": "guid: d82c1b31c7e74239bff1220585707d2b" + }, + { + "referencedResource": "TMP_StyleSheet.cs", + "target": "guid: 13259b4ce497b194eb52a33d8eda0bdc", + "replacement": "guid: ab2114bdc8544297b417dfefe9f1e410" + }, + { + "referencedResource": "TMP_StyleSheet.cs", + "target": "fileID: -1936749209, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410" + }, + { + "referencedResource": "TMP Default Style Sheet.asset", + "target": "guid: 54d1085f9a2fdea4587fcfc7dddcd4bc", + "replacement": "guid: f952c082cb03451daed3ee968ac6c63e" + }, + { + "referencedResource": "TMP_SpriteAsset.cs", + "target": "guid: 90940d439ca0ef746af0b48419b92d2e", + "replacement": "guid: 84a92b25f83d49b9bc132d206b370281" + }, + { + "referencedResource": "TMP_SpriteAsset.cs", + "target": "fileID: 2019389346, guid: 89f0137620f6af44b9ba852b4190e64e", + "replacement": "fileID: 11500000, guid: 84a92b25f83d49b9bc132d206b370281" + }, + { + "referencedResource": "Default Sprite Asset.asset", + "target": "guid: 273ca6c80b4b5d746b5e548f532bffd8", + "replacement": "guid: fbef3c704dce48f08a44612d6c856c8d" + }, + { + "referencedResource": "Default Sprite Asset.png", + "target": "guid: 5b32c2d36abe44540bed74c1f787033b", + "replacement": "guid: a0fc465d6cf04254a2938578735e2383" + }, + { + "referencedResource": "EmojiOne.asset", + "target": "guid: 9a952e2781ef26940ae089f1053ef4ef", + "replacement": "guid: c41005c129ba4d66911b75229fd70b45" + }, + { + "referencedResource": "EmojiOne.png", + "target": "guid: 6ec706981a919c3489f0b061a40054e2", + "replacement": "guid: dffef66376be4fa480fb02b19edbe903" + }, + { + "referencedResource": "DropCap Numbers.asset", + "target": "guid: c4fd2a959a50b584b92dedfefec1ffda", + "replacement": "guid: 14aa93acbb234d16aaef0e8b46814db6" + }, + { + "referencedResource": "DropCap Numbers.psd", + "target": "guid: 28b41fef228d6814f90e541deaf9f262", + "replacement": "guid: fd09957580ac4326916010f1f260975b" + } + ] +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData_Assets.json.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData_Assets.json.meta new file mode 100644 index 00000000..f534ac14 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/PackageConversionData_Assets.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0e0afa652c0031c48896a97b424d027b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts.meta new file mode 100644 index 00000000..3c2e4cf7 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e6a1d1e3d2384453a7371b4a07a41ca4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor.meta new file mode 100644 index 00000000..af509a3a --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b5d6c28ed7b94775be9e2560f300247c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/DropdownOptionListDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/DropdownOptionListDrawer.cs new file mode 100644 index 00000000..2b7dc854 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/DropdownOptionListDrawer.cs @@ -0,0 +1,60 @@ +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.UI; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + [CustomPropertyDrawer(typeof(TMP_Dropdown.OptionDataList), true)] + class DropdownOptionListDrawer : PropertyDrawer + { + private ReorderableList m_ReorderableList; + + private void Init(SerializedProperty property) + { + if (m_ReorderableList != null) + return; + + SerializedProperty array = property.FindPropertyRelative("m_Options"); + + m_ReorderableList = new ReorderableList(property.serializedObject, array); + m_ReorderableList.drawElementCallback = DrawOptionData; + m_ReorderableList.drawHeaderCallback = DrawHeader; + m_ReorderableList.elementHeight += 16; + } + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + Init(property); + + m_ReorderableList.DoList(position); + } + + private void DrawHeader(Rect rect) + { + GUI.Label(rect, "Options"); + } + + private void DrawOptionData(Rect rect, int index, bool isActive, bool isFocused) + { + SerializedProperty itemData = m_ReorderableList.serializedProperty.GetArrayElementAtIndex(index); + SerializedProperty itemText = itemData.FindPropertyRelative("m_Text"); + SerializedProperty itemImage = itemData.FindPropertyRelative("m_Image"); + + RectOffset offset = new RectOffset(0, 0, -1, -3); + rect = offset.Add(rect); + rect.height = EditorGUIUtility.singleLineHeight; + + EditorGUI.PropertyField(rect, itemText, GUIContent.none); + rect.y += EditorGUIUtility.singleLineHeight; + EditorGUI.PropertyField(rect, itemImage, GUIContent.none); + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + Init(property); + + return m_ReorderableList.GetHeight(); + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/DropdownOptionListDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/DropdownOptionListDrawer.cs.meta new file mode 100644 index 00000000..f7f4c565 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/DropdownOptionListDrawer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9545c9eb3bf94265810463794fec8334 +timeCreated: 1464818008 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphInfoDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphInfoDrawer.cs new file mode 100644 index 00000000..0936dc75 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphInfoDrawer.cs @@ -0,0 +1,61 @@ +/* +using UnityEngine; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(TMP_Glyph))] + public class GlyphInfoDrawer : PropertyDrawer + { + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty prop_id = property.FindPropertyRelative("id"); + SerializedProperty prop_x = property.FindPropertyRelative("x"); + SerializedProperty prop_y = property.FindPropertyRelative("y"); + SerializedProperty prop_width = property.FindPropertyRelative("width"); + SerializedProperty prop_height = property.FindPropertyRelative("height"); + SerializedProperty prop_xOffset = property.FindPropertyRelative("xOffset"); + SerializedProperty prop_yOffset = property.FindPropertyRelative("yOffset"); + SerializedProperty prop_xAdvance = property.FindPropertyRelative("xAdvance"); + SerializedProperty prop_scale = property.FindPropertyRelative("scale"); + + + // We get Rect since a valid position may not be provided by the caller. + Rect rect = GUILayoutUtility.GetRect(position.width, 48); + rect.y -= 15; + + //GUI.enabled = false; + EditorGUIUtility.labelWidth = 40f; + EditorGUIUtility.fieldWidth = 45f; + + bool prevGuiState = GUI.enabled; + GUI.enabled = true; + EditorGUI.LabelField(new Rect(rect.x + 5f, rect.y, 80f, 18), new GUIContent("Ascii: " + prop_id.intValue + ""), TMP_UIStyleManager.label); + EditorGUI.LabelField(new Rect(rect.x + 90f, rect.y, 80f, 18), new GUIContent("Hex: " + prop_id.intValue.ToString("X") + ""), TMP_UIStyleManager.label); + EditorGUI.LabelField(new Rect(rect.x + 170f, rect.y, 80, 18), "Char: [ " + (char)prop_id.intValue + " ]", TMP_UIStyleManager.label); + GUI.enabled = prevGuiState; + + EditorGUIUtility.labelWidth = 35f; + EditorGUIUtility.fieldWidth = 10f; + + float width = (rect.width - 5f) / 4; + EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 0, rect.y + 22, width - 5f, 18), prop_x, new GUIContent("X:")); + EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 1, rect.y + 22, width - 5f, 18), prop_y, new GUIContent("Y:")); + EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 2, rect.y + 22, width - 5f, 18), prop_width, new GUIContent("W:")); + EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 3, rect.y + 22, width - 5f, 18), prop_height, new GUIContent("H:")); + + //GUI.enabled = true; + EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 0, rect.y + 44, width - 5f, 18), prop_xOffset, new GUIContent("OX:")); + EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 1, rect.y + 44, width - 5f, 18), prop_yOffset, new GUIContent("OY:")); + //GUI.enabled = true; + EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 2, rect.y + 44, width - 5f, 18), prop_xAdvance, new GUIContent("ADV:")); + EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 3, rect.y + 44, width - 5f, 18), prop_scale, new GUIContent("SF:")); + } + + } +} +*/ \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphInfoDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphInfoDrawer.cs.meta new file mode 100644 index 00000000..10ed151e --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphInfoDrawer.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 900f1a451c764dc3bdcc0de815a15935 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphMetricsPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphMetricsPropertyDrawer.cs new file mode 100644 index 00000000..1e1f4d18 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphMetricsPropertyDrawer.cs @@ -0,0 +1,53 @@ +using UnityEngine; +using UnityEngine.TextCore; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(GlyphMetrics))] + public class GlyphMetricsPropertyDrawer : PropertyDrawer + { + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty prop_Width = property.FindPropertyRelative("m_Width"); + SerializedProperty prop_Height = property.FindPropertyRelative("m_Height"); + SerializedProperty prop_HoriBearingX = property.FindPropertyRelative("m_HorizontalBearingX"); + SerializedProperty prop_HoriBearingY = property.FindPropertyRelative("m_HorizontalBearingY"); + SerializedProperty prop_HoriAdvance = property.FindPropertyRelative("m_HorizontalAdvance"); + + // We get Rect since a valid position may not be provided by the caller. + Rect rect = new Rect(position.x, position.y, position.width, 49); + + EditorGUI.LabelField(rect, new GUIContent("Glyph Metrics")); + + EditorGUIUtility.labelWidth = 30f; + EditorGUIUtility.fieldWidth = 10f; + + //GUI.enabled = false; + float width = (rect.width - 75f) / 2; + EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 20, width - 5f, 18), prop_Width, new GUIContent("W:")); + EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 20, width - 5f, 18), prop_Height, new GUIContent("H:")); + + //GUI.enabled = true; + + width = (rect.width - 75f) / 3; + EditorGUI.BeginChangeCheck(); + EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 40, width - 5f, 18), prop_HoriBearingX, new GUIContent("BX:")); + EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 40, width - 5f, 18), prop_HoriBearingY, new GUIContent("BY:")); + EditorGUI.PropertyField(new Rect(rect.x + width * 2, rect.y + 40, width - 5f, 18), prop_HoriAdvance, new GUIContent("AD:")); + if (EditorGUI.EndChangeCheck()) + { + + } + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return 65f; + } + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta new file mode 100644 index 00000000..d91f5791 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3882522a08b6f5459b4dea6f8791278 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphRectPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphRectPropertyDrawer.cs new file mode 100644 index 00000000..87ecf0cc --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphRectPropertyDrawer.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using UnityEngine.TextCore; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(GlyphRect))] + public class GlyphRectPropertyDrawer : PropertyDrawer + { + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + //EditorGUI.BeginProperty(position, label, property); + + SerializedProperty prop_X = property.FindPropertyRelative("m_X"); + SerializedProperty prop_Y = property.FindPropertyRelative("m_Y"); + SerializedProperty prop_Width = property.FindPropertyRelative("m_Width"); + SerializedProperty prop_Height = property.FindPropertyRelative("m_Height"); + + // We get Rect since a valid position may not be provided by the caller. + Rect rect = new Rect(position.x, position.y, position.width, 49); + EditorGUI.LabelField(rect, new GUIContent("Glyph Rect")); + + EditorGUIUtility.labelWidth = 30f; + EditorGUIUtility.fieldWidth = 10f; + + //GUI.enabled = false; + float width = (rect.width - 75f) / 4; + EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 20, width - 5f, 18), prop_X, new GUIContent("X:")); + EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 20, width - 5f, 18), prop_Y, new GUIContent("Y:")); + EditorGUI.PropertyField(new Rect(rect.x + width * 2, rect.y + 20, width - 5f, 18), prop_Width, new GUIContent("W:")); + EditorGUI.PropertyField(new Rect(rect.x + width * 3, rect.y + 20, width - 5f, 18), prop_Height, new GUIContent("H:")); + + //EditorGUI.EndProperty(); + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return 45f; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta new file mode 100644 index 00000000..93232794 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8bc2b083b068f3546a9509c805e0541c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseEditorPanel.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseEditorPanel.cs new file mode 100644 index 00000000..c4a55baf --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseEditorPanel.cs @@ -0,0 +1,1116 @@ +using UnityEngine; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + public abstract class TMP_BaseEditorPanel : Editor + { + //Labels and Tooltips + static readonly GUIContent k_RtlToggleLabel = new GUIContent("Enable RTL Editor", "Reverses text direction and allows right to left editing."); + static readonly GUIContent k_MainSettingsLabel = new GUIContent("Main Settings"); + static readonly GUIContent k_FontAssetLabel = new GUIContent("Font Asset", "The Font Asset containing the glyphs that can be rendered for this text."); + static readonly GUIContent k_MaterialPresetLabel = new GUIContent("Material Preset", "The material used for rendering. Only materials created from the Font Asset can be used."); + static readonly GUIContent k_AutoSizeLabel = new GUIContent("Auto Size", "Auto sizes the text to fit the available space."); + static readonly GUIContent k_FontSizeLabel = new GUIContent("Font Size", "The size the text will be rendered at in points."); + static readonly GUIContent k_AutoSizeOptionsLabel = new GUIContent("Auto Size Options"); + static readonly GUIContent k_MinLabel = new GUIContent("Min", "The minimum font size."); + static readonly GUIContent k_MaxLabel = new GUIContent("Max", "The maximum font size."); + static readonly GUIContent k_WdLabel = new GUIContent("WD%", "Compresses character width up to this value before reducing font size."); + static readonly GUIContent k_LineLabel = new GUIContent("Line", "Negative value only. Compresses line height down to this value before reducing font size."); + static readonly GUIContent k_FontStyleLabel = new GUIContent("Font Style", "Styles to apply to the text such as Bold or Italic."); + + static readonly GUIContent k_BoldLabel = new GUIContent("B", "Bold"); + static readonly GUIContent k_ItalicLabel = new GUIContent("I", "Italic"); + static readonly GUIContent k_UnderlineLabel = new GUIContent("U", "Underline"); + static readonly GUIContent k_StrikethroughLabel = new GUIContent("S", "Strikethrough"); + static readonly GUIContent k_LowercaseLabel = new GUIContent("ab", "Lowercase"); + static readonly GUIContent k_UppercaseLabel = new GUIContent("AB", "Uppercase"); + static readonly GUIContent k_SmallcapsLabel = new GUIContent("SC", "Smallcaps"); + + static readonly GUIContent k_ColorModeLabel = new GUIContent("Color Mode", "The type of gradient to use."); + static readonly GUIContent k_BaseColorLabel = new GUIContent("Vertex Color", "The base color of the text vertices."); + static readonly GUIContent k_ColorPresetLabel = new GUIContent("Color Preset", "A Color Preset which override the local color settings."); + static readonly GUIContent k_ColorGradientLabel = new GUIContent("Color Gradient", "The gradient color applied over the Vertex Color. Can be locally set or driven by a Gradient Asset."); + static readonly GUIContent k_CorenerColorsLabel = new GUIContent("Colors", "The color composition of the gradient."); + static readonly GUIContent k_OverrideTagsLabel = new GUIContent("Override Tags", "Whether the color settings override the tag."); + + static readonly GUIContent k_SpacingOptionsLabel = new GUIContent("Spacing Options", "Spacing adjustments between different elements of the text."); + static readonly GUIContent k_CharacterSpacingLabel = new GUIContent("Character"); + static readonly GUIContent k_WordSpacingLabel = new GUIContent("Word"); + static readonly GUIContent k_LineSpacingLabel = new GUIContent("Line"); + static readonly GUIContent k_ParagraphSpacingLabel = new GUIContent("Paragraph"); + + static readonly GUIContent k_AlignmentLabel = new GUIContent("Alignment", "Horizontal and vertical aligment of the text within its container."); + static readonly GUIContent k_WrapMixLabel = new GUIContent("Wrap Mix (W <-> C)", "How much to favor words versus characters when distributing the text."); + + static readonly GUIContent k_WrappingLabel = new GUIContent("Wrapping", "Wraps text to the next line when reaching the edge of the container."); + static readonly GUIContent[] k_WrappingOptions = { new GUIContent("Disabled"), new GUIContent("Enabled") }; + static readonly GUIContent k_OverflowLabel = new GUIContent("Overflow", "How to display text which goes past the edge of the container."); + + static readonly GUIContent k_MarginsLabel = new GUIContent("Margins", "The space between the text and the edge of its container."); + static readonly GUIContent k_GeometrySortingLabel = new GUIContent("Geometry Sorting", "The order in which text geometry is sorted. Used to adjust the way overlapping characters are displayed."); + static readonly GUIContent k_RichTextLabel = new GUIContent("Rich Text", "Enables the use of rich text tags such as and ."); + static readonly GUIContent k_EscapeCharactersLabel = new GUIContent("Parse Escape Characters", "Whether to display strings such as \"\\n\" as is or replace them by the character they represent."); + static readonly GUIContent k_VisibleDescenderLabel = new GUIContent("Visible Descender", "Compute descender values from visible characters only. Used to adjust layout behavior when hiding and revealing characters dynamically."); + static readonly GUIContent k_SpriteAssetLabel = new GUIContent("Sprite Asset", "The Sprite Asset used when NOT specifically referencing one using ."); + + static readonly GUIContent k_HorizontalMappingLabel = new GUIContent("Horizontal Mapping", "Horizontal UV mapping when using a shader with a texture face option."); + static readonly GUIContent k_VerticalMappingLabel = new GUIContent("Vertical Mapping", "Vertical UV mapping when using a shader with a texture face option."); + static readonly GUIContent k_LineOffsetLabel = new GUIContent("Line Offset", "Adds an horizontal offset to each successive line. Used for slanted texturing."); + + static readonly GUIContent k_KerningLabel = new GUIContent("Kerning", "Enables character specific spacing between pairs of characters."); + static readonly GUIContent k_PaddingLabel = new GUIContent("Extra Padding", "Adds some padding between the characters and the edge of the text mesh. Can reduce graphical errors when displaying small text."); + + static readonly GUIContent k_LeftLabel = new GUIContent("Left"); + static readonly GUIContent k_TopLabel = new GUIContent("Top"); + static readonly GUIContent k_RightLabel = new GUIContent("Right"); + static readonly GUIContent k_BottomLabel = new GUIContent("Bottom"); + + protected static readonly GUIContent k_ExtraSettingsLabel = new GUIContent("Extra Settings"); + + protected struct Foldout + { + // Track Inspector foldout panel states, globally. + public static bool extraSettings = false; + public static bool materialInspector = true; + } + + protected static int s_EventId; + + public int selAlignGridA; + public int selAlignGridB; + + protected SerializedProperty m_TextProp; + + protected SerializedProperty m_IsRightToLeftProp; + protected string m_RtlText; + + protected SerializedProperty m_FontAssetProp; + + protected SerializedProperty m_FontSharedMaterialProp; + protected Material[] m_MaterialPresets; + protected GUIContent[] m_MaterialPresetNames; + protected int m_MaterialPresetSelectionIndex; + protected bool m_IsPresetListDirty; + + protected SerializedProperty m_FontStyleProp; + + protected SerializedProperty m_FontColorProp; + protected SerializedProperty m_EnableVertexGradientProp; + protected SerializedProperty m_FontColorGradientProp; + protected SerializedProperty m_FontColorGradientPresetProp; + protected SerializedProperty m_OverrideHtmlColorProp; + + protected SerializedProperty m_FontSizeProp; + protected SerializedProperty m_FontSizeBaseProp; + + protected SerializedProperty m_AutoSizingProp; + protected SerializedProperty m_FontSizeMinProp; + protected SerializedProperty m_FontSizeMaxProp; + + protected SerializedProperty m_LineSpacingMaxProp; + protected SerializedProperty m_CharWidthMaxAdjProp; + + protected SerializedProperty m_CharacterSpacingProp; + protected SerializedProperty m_WordSpacingProp; + protected SerializedProperty m_LineSpacingProp; + protected SerializedProperty m_ParagraphSpacingProp; + + protected SerializedProperty m_TextAlignmentProp; + + protected SerializedProperty m_HorizontalMappingProp; + protected SerializedProperty m_VerticalMappingProp; + protected SerializedProperty m_UvLineOffsetProp; + + protected SerializedProperty m_EnableWordWrappingProp; + protected SerializedProperty m_WordWrappingRatiosProp; + protected SerializedProperty m_TextOverflowModeProp; + protected SerializedProperty m_PageToDisplayProp; + protected SerializedProperty m_LinkedTextComponentProp; + protected SerializedProperty m_IsLinkedTextComponentProp; + + protected SerializedProperty m_EnableKerningProp; + + protected SerializedProperty m_IsRichTextProp; + + protected SerializedProperty m_HasFontAssetChangedProp; + + protected SerializedProperty m_EnableExtraPaddingProp; + protected SerializedProperty m_CheckPaddingRequiredProp; + protected SerializedProperty m_EnableEscapeCharacterParsingProp; + protected SerializedProperty m_UseMaxVisibleDescenderProp; + protected SerializedProperty m_GeometrySortingOrderProp; + + protected SerializedProperty m_SpriteAssetProp; + + protected SerializedProperty m_MarginProp; + + protected SerializedProperty m_ColorModeProp; + + protected bool m_HavePropertiesChanged; + + protected TMP_Text m_TextComponent; + protected RectTransform m_RectTransform; + + protected Material m_TargetMaterial; + + protected Vector3[] m_RectCorners = new Vector3[4]; + protected Vector3[] m_HandlePoints = new Vector3[4]; + + protected virtual void OnEnable() + { + m_TextProp = serializedObject.FindProperty("m_text"); + m_IsRightToLeftProp = serializedObject.FindProperty("m_isRightToLeft"); + m_FontAssetProp = serializedObject.FindProperty("m_fontAsset"); + m_FontSharedMaterialProp = serializedObject.FindProperty("m_sharedMaterial"); + + m_FontStyleProp = serializedObject.FindProperty("m_fontStyle"); + + m_FontSizeProp = serializedObject.FindProperty("m_fontSize"); + m_FontSizeBaseProp = serializedObject.FindProperty("m_fontSizeBase"); + + m_AutoSizingProp = serializedObject.FindProperty("m_enableAutoSizing"); + m_FontSizeMinProp = serializedObject.FindProperty("m_fontSizeMin"); + m_FontSizeMaxProp = serializedObject.FindProperty("m_fontSizeMax"); + + m_LineSpacingMaxProp = serializedObject.FindProperty("m_lineSpacingMax"); + m_CharWidthMaxAdjProp = serializedObject.FindProperty("m_charWidthMaxAdj"); + + // Colors & Gradient + m_FontColorProp = serializedObject.FindProperty("m_fontColor"); + m_EnableVertexGradientProp = serializedObject.FindProperty("m_enableVertexGradient"); + m_FontColorGradientProp = serializedObject.FindProperty("m_fontColorGradient"); + m_FontColorGradientPresetProp = serializedObject.FindProperty("m_fontColorGradientPreset"); + m_OverrideHtmlColorProp = serializedObject.FindProperty("m_overrideHtmlColors"); + + m_CharacterSpacingProp = serializedObject.FindProperty("m_characterSpacing"); + m_WordSpacingProp = serializedObject.FindProperty("m_wordSpacing"); + m_LineSpacingProp = serializedObject.FindProperty("m_lineSpacing"); + m_ParagraphSpacingProp = serializedObject.FindProperty("m_paragraphSpacing"); + + m_TextAlignmentProp = serializedObject.FindProperty("m_textAlignment"); + + m_HorizontalMappingProp = serializedObject.FindProperty("m_horizontalMapping"); + m_VerticalMappingProp = serializedObject.FindProperty("m_verticalMapping"); + m_UvLineOffsetProp = serializedObject.FindProperty("m_uvLineOffset"); + + m_EnableWordWrappingProp = serializedObject.FindProperty("m_enableWordWrapping"); + m_WordWrappingRatiosProp = serializedObject.FindProperty("m_wordWrappingRatios"); + m_TextOverflowModeProp = serializedObject.FindProperty("m_overflowMode"); + m_PageToDisplayProp = serializedObject.FindProperty("m_pageToDisplay"); + m_LinkedTextComponentProp = serializedObject.FindProperty("m_linkedTextComponent"); + m_IsLinkedTextComponentProp = serializedObject.FindProperty("m_isLinkedTextComponent"); + + m_EnableKerningProp = serializedObject.FindProperty("m_enableKerning"); + + m_EnableExtraPaddingProp = serializedObject.FindProperty("m_enableExtraPadding"); + m_IsRichTextProp = serializedObject.FindProperty("m_isRichText"); + m_CheckPaddingRequiredProp = serializedObject.FindProperty("checkPaddingRequired"); + m_EnableEscapeCharacterParsingProp = serializedObject.FindProperty("m_parseCtrlCharacters"); + m_UseMaxVisibleDescenderProp = serializedObject.FindProperty("m_useMaxVisibleDescender"); + + m_GeometrySortingOrderProp = serializedObject.FindProperty("m_geometrySortingOrder"); + + m_SpriteAssetProp = serializedObject.FindProperty("m_spriteAsset"); + + m_MarginProp = serializedObject.FindProperty("m_margin"); + + m_HasFontAssetChangedProp = serializedObject.FindProperty("m_hasFontAssetChanged"); + + m_ColorModeProp = serializedObject.FindProperty("m_colorMode"); + + m_TextComponent = (TMP_Text)target; + m_RectTransform = m_TextComponent.rectTransform; + + // Create new Material Editor if one does not exists + m_TargetMaterial = m_TextComponent.fontSharedMaterial; + + // Set material inspector visibility + if (m_TargetMaterial != null) + UnityEditorInternal.InternalEditorUtility.SetIsInspectorExpanded(m_TargetMaterial, Foldout.materialInspector); + + // Find all Material Presets matching the current Font Asset Material + m_MaterialPresetNames = GetMaterialPresets(); + + // Initialize the Event Listener for Undo Events. + Undo.undoRedoPerformed += OnUndoRedo; + } + + protected virtual void OnDisable() + { + // Set material inspector visibility + if (m_TargetMaterial != null) + Foldout.materialInspector = UnityEditorInternal.InternalEditorUtility.GetIsInspectorExpanded(m_TargetMaterial); + + if (Undo.undoRedoPerformed != null) + Undo.undoRedoPerformed -= OnUndoRedo; + } + + public override void OnInspectorGUI() + { + // Make sure Multi selection only includes TMP Text objects. + if (IsMixSelectionTypes()) return; + + serializedObject.Update(); + + DrawTextInput(); + + DrawMainSettings(); + + DrawExtraSettings(); + + EditorGUILayout.Space(); + + if (m_HavePropertiesChanged) + { + m_HavePropertiesChanged = false; + m_TextComponent.havePropertiesChanged = true; + m_TextComponent.ComputeMarginSize(); + EditorUtility.SetDirty(target); + } + + serializedObject.ApplyModifiedProperties(); + } + + public void OnSceneGUI() + { + if (IsMixSelectionTypes()) return; + + // Margin Frame & Handles + m_RectTransform.GetWorldCorners(m_RectCorners); + Vector4 marginOffset = m_TextComponent.margin; + Vector3 lossyScale = m_RectTransform.lossyScale; + + m_HandlePoints[0] = m_RectCorners[0] + m_RectTransform.TransformDirection(new Vector3(marginOffset.x * lossyScale.x, marginOffset.w * lossyScale.y, 0)); + m_HandlePoints[1] = m_RectCorners[1] + m_RectTransform.TransformDirection(new Vector3(marginOffset.x * lossyScale.x, -marginOffset.y * lossyScale.y, 0)); + m_HandlePoints[2] = m_RectCorners[2] + m_RectTransform.TransformDirection(new Vector3(-marginOffset.z * lossyScale.x, -marginOffset.y * lossyScale.y, 0)); + m_HandlePoints[3] = m_RectCorners[3] + m_RectTransform.TransformDirection(new Vector3(-marginOffset.z * lossyScale.x, marginOffset.w * lossyScale.y, 0)); + + Handles.DrawSolidRectangleWithOutline(m_HandlePoints, new Color32(255, 255, 255, 0), new Color32(255, 255, 0, 255)); + + // Draw & process FreeMoveHandles + + // LEFT HANDLE + Vector3 oldLeft = (m_HandlePoints[0] + m_HandlePoints[1]) * 0.5f; + Vector3 newLeft = Handles.FreeMoveHandle(oldLeft, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap); + bool hasChanged = false; + if (oldLeft != newLeft) + { + float delta = oldLeft.x - newLeft.x; + marginOffset.x += -delta / lossyScale.x; + //Debug.Log("Left Margin H0:" + handlePoints[0] + " H1:" + handlePoints[1]); + hasChanged = true; + } + + // TOP HANDLE + Vector3 oldTop = (m_HandlePoints[1] + m_HandlePoints[2]) * 0.5f; + Vector3 newTop = Handles.FreeMoveHandle(oldTop, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap); + if (oldTop != newTop) + { + float delta = oldTop.y - newTop.y; + marginOffset.y += delta / lossyScale.y; + //Debug.Log("Top Margin H1:" + handlePoints[1] + " H2:" + handlePoints[2]); + hasChanged = true; + } + + // RIGHT HANDLE + Vector3 oldRight = (m_HandlePoints[2] + m_HandlePoints[3]) * 0.5f; + Vector3 newRight = Handles.FreeMoveHandle(oldRight, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap); + if (oldRight != newRight) + { + float delta = oldRight.x - newRight.x; + marginOffset.z += delta / lossyScale.x; + hasChanged = true; + //Debug.Log("Right Margin H2:" + handlePoints[2] + " H3:" + handlePoints[3]); + } + + // BOTTOM HANDLE + Vector3 oldBottom = (m_HandlePoints[3] + m_HandlePoints[0]) * 0.5f; + Vector3 newBottom = Handles.FreeMoveHandle(oldBottom, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap); + if (oldBottom != newBottom) + { + float delta = oldBottom.y - newBottom.y; + marginOffset.w += -delta / lossyScale.y; + hasChanged = true; + //Debug.Log("Bottom Margin H0:" + handlePoints[0] + " H3:" + handlePoints[3]); + } + + if (hasChanged) + { + Undo.RecordObjects(new Object[] {m_RectTransform, m_TextComponent }, "Margin Changes"); + m_TextComponent.margin = marginOffset; + EditorUtility.SetDirty(target); + } + } + + protected void DrawTextInput() + { + EditorGUILayout.Space(); + + // If the text component is linked, disable the text input box. + if (m_IsLinkedTextComponentProp.boolValue) + { + EditorGUILayout.HelpBox("The Text Input Box is disabled due to this text component being linked to another.", MessageType.Info); + } + else + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_TextProp); + + if (EditorGUI.EndChangeCheck() || (m_IsRightToLeftProp.boolValue && string.IsNullOrEmpty(m_RtlText))) + { + m_TextComponent.m_inputSource = TMP_Text.TextInputSources.Text; + m_TextComponent.m_isInputParsingRequired = true; + m_HavePropertiesChanged = true; + + // Handle Left to Right or Right to Left Editor + if (m_IsRightToLeftProp.boolValue) + { + m_RtlText = string.Empty; + string sourceText = m_TextProp.stringValue; + + // Reverse Text displayed in Text Input Box + for (int i = 0; i < sourceText.Length; i++) + { + m_RtlText += sourceText[sourceText.Length - i - 1]; + } + } + } + + // Toggle showing Rich Tags + m_IsRightToLeftProp.boolValue = EditorGUILayout.Toggle(k_RtlToggleLabel, m_IsRightToLeftProp.boolValue); + + if (m_IsRightToLeftProp.boolValue) + { + EditorGUI.BeginChangeCheck(); + m_RtlText = EditorGUILayout.TextArea(m_RtlText, TMP_UIStyleManager.wrappingTextArea, GUILayout.Height(EditorGUI.GetPropertyHeight(m_TextProp) - EditorGUIUtility.singleLineHeight), GUILayout.ExpandWidth(true)); + if (EditorGUI.EndChangeCheck()) + { + // Convert RTL input + string sourceText = string.Empty; + + // Reverse Text displayed in Text Input Box + for (int i = 0; i < m_RtlText.Length; i++) + { + sourceText += m_RtlText[m_RtlText.Length - i - 1]; + } + + m_TextProp.stringValue = sourceText; + } + } + } + } + + protected void DrawMainSettings() + { + // MAIN SETTINGS SECTION + GUILayout.Label(k_MainSettingsLabel, EditorStyles.boldLabel); + + EditorGUI.indentLevel += 1; + + DrawFont(); + + DrawColor(); + + DrawSpacing(); + + DrawAlignment(); + + DrawWrappingOverflow(); + + DrawTextureMapping(); + + EditorGUI.indentLevel -= 1; + } + + void DrawFont() + { + // Update list of material presets if needed. + if (m_IsPresetListDirty) + m_MaterialPresetNames = GetMaterialPresets(); + + // FONT ASSET + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_FontAssetProp, k_FontAssetLabel); + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + m_HasFontAssetChangedProp.boolValue = true; + + m_IsPresetListDirty = true; + m_MaterialPresetSelectionIndex = 0; + } + + Rect rect; + + // MATERIAL PRESET + if (m_MaterialPresetNames != null) + { + EditorGUI.BeginChangeCheck(); + rect = EditorGUILayout.GetControlRect(false, 17); + + float oldHeight = EditorStyles.popup.fixedHeight; + EditorStyles.popup.fixedHeight = rect.height; + + int oldSize = EditorStyles.popup.fontSize; + EditorStyles.popup.fontSize = 11; + + m_MaterialPresetSelectionIndex = EditorGUI.Popup(rect, k_MaterialPresetLabel, m_MaterialPresetSelectionIndex, m_MaterialPresetNames); + if (EditorGUI.EndChangeCheck()) + { + m_FontSharedMaterialProp.objectReferenceValue = m_MaterialPresets[m_MaterialPresetSelectionIndex]; + m_HavePropertiesChanged = true; + } + + //Make sure material preset selection index matches the selection + if (m_MaterialPresetSelectionIndex < m_MaterialPresetNames.Length && m_TargetMaterial != m_MaterialPresets[m_MaterialPresetSelectionIndex] && !m_HavePropertiesChanged) + m_IsPresetListDirty = true; + + EditorStyles.popup.fixedHeight = oldHeight; + EditorStyles.popup.fontSize = oldSize; + } + + // FONT STYLE + EditorGUI.BeginChangeCheck(); + + int v1, v2, v3, v4, v5, v6, v7; + + if (EditorGUIUtility.wideMode) + { + rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f); + + EditorGUI.PrefixLabel(rect, k_FontStyleLabel); + + int styleValue = m_FontStyleProp.intValue; + + rect.x += EditorGUIUtility.labelWidth; + rect.width -= EditorGUIUtility.labelWidth; + + rect.width = Mathf.Max(25f, rect.width / 7f); + + v1 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 1) == 1, k_BoldLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 1 : 0; // Bold + rect.x += rect.width; + v2 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 2) == 2, k_ItalicLabel, TMP_UIStyleManager.alignmentButtonMid) ? 2 : 0; // Italics + rect.x += rect.width; + v3 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 4) == 4, k_UnderlineLabel, TMP_UIStyleManager.alignmentButtonMid) ? 4 : 0; // Underline + rect.x += rect.width; + v7 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 64) == 64, k_StrikethroughLabel, TMP_UIStyleManager.alignmentButtonRight) ? 64 : 0; // Strikethrough + rect.x += rect.width; + + int selected = 0; + + EditorGUI.BeginChangeCheck(); + v4 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 8) == 8, k_LowercaseLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 8 : 0; // Lowercase + if (EditorGUI.EndChangeCheck() && v4 > 0) + { + selected = v4; + } + rect.x += rect.width; + EditorGUI.BeginChangeCheck(); + v5 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 16) == 16, k_UppercaseLabel, TMP_UIStyleManager.alignmentButtonMid) ? 16 : 0; // Uppercase + if (EditorGUI.EndChangeCheck() && v5 > 0) + { + selected = v5; + } + rect.x += rect.width; + EditorGUI.BeginChangeCheck(); + v6 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 32) == 32, k_SmallcapsLabel, TMP_UIStyleManager.alignmentButtonRight) ? 32 : 0; // Smallcaps + if (EditorGUI.EndChangeCheck() && v6 > 0) + { + selected = v6; + } + + if (selected > 0) + { + v4 = selected == 8 ? 8 : 0; + v5 = selected == 16 ? 16 : 0; + v6 = selected == 32 ? 32 : 0; + } + } + else + { + rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f); + + EditorGUI.PrefixLabel(rect, k_FontStyleLabel); + + int styleValue = m_FontStyleProp.intValue; + + rect.x += EditorGUIUtility.labelWidth; + rect.width -= EditorGUIUtility.labelWidth; + rect.width = Mathf.Max(25f, rect.width / 4f); + + v1 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 1) == 1, k_BoldLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 1 : 0; // Bold + rect.x += rect.width; + v2 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 2) == 2, k_ItalicLabel, TMP_UIStyleManager.alignmentButtonMid) ? 2 : 0; // Italics + rect.x += rect.width; + v3 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 4) == 4, k_UnderlineLabel, TMP_UIStyleManager.alignmentButtonMid) ? 4 : 0; // Underline + rect.x += rect.width; + v7 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 64) == 64, k_StrikethroughLabel, TMP_UIStyleManager.alignmentButtonRight) ? 64 : 0; // Strikethrough + + rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f); + + rect.x += EditorGUIUtility.labelWidth; + rect.width -= EditorGUIUtility.labelWidth; + + rect.width = Mathf.Max(25f, rect.width / 4f); + + int selected = 0; + + EditorGUI.BeginChangeCheck(); + v4 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 8) == 8, k_LowercaseLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 8 : 0; // Lowercase + if (EditorGUI.EndChangeCheck() && v4 > 0) + { + selected = v4; + } + rect.x += rect.width; + EditorGUI.BeginChangeCheck(); + v5 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 16) == 16, k_UppercaseLabel, TMP_UIStyleManager.alignmentButtonMid) ? 16 : 0; // Uppercase + if (EditorGUI.EndChangeCheck() && v5 > 0) + { + selected = v5; + } + rect.x += rect.width; + EditorGUI.BeginChangeCheck(); + v6 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 32) == 32, k_SmallcapsLabel, TMP_UIStyleManager.alignmentButtonRight) ? 32 : 0; // Smallcaps + if (EditorGUI.EndChangeCheck() && v6 > 0) + { + selected = v6; + } + + if (selected > 0) + { + v4 = selected == 8 ? 8 : 0; + v5 = selected == 16 ? 16 : 0; + v6 = selected == 32 ? 32 : 0; + } + } + + if (EditorGUI.EndChangeCheck()) + { + m_FontStyleProp.intValue = v1 + v2 + v3 + v4 + v5 + v6 + v7; + m_HavePropertiesChanged = true; + } + + // FONT SIZE + EditorGUI.BeginChangeCheck(); + + EditorGUI.BeginDisabledGroup(m_AutoSizingProp.boolValue); + EditorGUILayout.PropertyField(m_FontSizeProp, k_FontSizeLabel, GUILayout.MaxWidth(EditorGUIUtility.labelWidth + 50f)); + EditorGUI.EndDisabledGroup(); + + if (EditorGUI.EndChangeCheck()) + { + m_FontSizeBaseProp.floatValue = m_FontSizeProp.floatValue; + m_HavePropertiesChanged = true; + } + + EditorGUI.indentLevel += 1; + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_AutoSizingProp, k_AutoSizeLabel); + if (EditorGUI.EndChangeCheck()) + { + if (m_AutoSizingProp.boolValue == false) + m_FontSizeProp.floatValue = m_FontSizeBaseProp.floatValue; + + m_HavePropertiesChanged = true; + } + + // Show auto sizing options + if (m_AutoSizingProp.boolValue) + { + rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight); + + EditorGUI.PrefixLabel(rect, k_AutoSizeOptionsLabel); + + int previousIndent = EditorGUI.indentLevel; + + EditorGUI.indentLevel = 0; + + rect.width = (rect.width - EditorGUIUtility.labelWidth) / 4f; + rect.x += EditorGUIUtility.labelWidth; + + EditorGUIUtility.labelWidth = 24; + EditorGUI.BeginChangeCheck(); + EditorGUI.PropertyField(rect, m_FontSizeMinProp, k_MinLabel); + if (EditorGUI.EndChangeCheck()) + { + m_FontSizeMinProp.floatValue = Mathf.Min(m_FontSizeMinProp.floatValue, m_FontSizeMaxProp.floatValue); + m_HavePropertiesChanged = true; + } + rect.x += rect.width; + + EditorGUIUtility.labelWidth = 27; + EditorGUI.BeginChangeCheck(); + EditorGUI.PropertyField(rect, m_FontSizeMaxProp, k_MaxLabel); + if (EditorGUI.EndChangeCheck()) + { + m_FontSizeMaxProp.floatValue = Mathf.Max(m_FontSizeMinProp.floatValue, m_FontSizeMaxProp.floatValue); + m_HavePropertiesChanged = true; + } + rect.x += rect.width; + + EditorGUI.BeginChangeCheck(); + EditorGUIUtility.labelWidth = 36; + EditorGUI.PropertyField(rect, m_CharWidthMaxAdjProp, k_WdLabel); + rect.x += rect.width; + EditorGUIUtility.labelWidth = 28; + EditorGUI.PropertyField(rect, m_LineSpacingMaxProp, k_LineLabel); + + EditorGUIUtility.labelWidth = 0; + + if (EditorGUI.EndChangeCheck()) + { + m_CharWidthMaxAdjProp.floatValue = Mathf.Clamp(m_CharWidthMaxAdjProp.floatValue, 0, 50); + m_LineSpacingMaxProp.floatValue = Mathf.Min(0, m_LineSpacingMaxProp.floatValue); + m_HavePropertiesChanged = true; + } + + EditorGUI.indentLevel = previousIndent; + } + + EditorGUI.indentLevel -= 1; + + + + EditorGUILayout.Space(); + } + + void DrawColor() + { + // FACE VERTEX COLOR + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_FontColorProp, k_BaseColorLabel); + + EditorGUILayout.PropertyField(m_EnableVertexGradientProp, k_ColorGradientLabel); + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + } + + EditorGUIUtility.fieldWidth = 0; + + if (m_EnableVertexGradientProp.boolValue) + { + EditorGUI.indentLevel += 1; + + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.PropertyField(m_FontColorGradientPresetProp, k_ColorPresetLabel); + + SerializedObject obj = null; + + SerializedProperty colorMode; + + SerializedProperty topLeft; + SerializedProperty topRight; + SerializedProperty bottomLeft; + SerializedProperty bottomRight; + + if (m_FontColorGradientPresetProp.objectReferenceValue == null) + { + colorMode = m_ColorModeProp; + topLeft = m_FontColorGradientProp.FindPropertyRelative("topLeft"); + topRight = m_FontColorGradientProp.FindPropertyRelative("topRight"); + bottomLeft = m_FontColorGradientProp.FindPropertyRelative("bottomLeft"); + bottomRight = m_FontColorGradientProp.FindPropertyRelative("bottomRight"); + } + else + { + obj = new SerializedObject(m_FontColorGradientPresetProp.objectReferenceValue); + colorMode = obj.FindProperty("colorMode"); + topLeft = obj.FindProperty("topLeft"); + topRight = obj.FindProperty("topRight"); + bottomLeft = obj.FindProperty("bottomLeft"); + bottomRight = obj.FindProperty("bottomRight"); + } + + EditorGUILayout.PropertyField(colorMode, k_ColorModeLabel); + + var rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + + EditorGUI.PrefixLabel(rect, k_CorenerColorsLabel); + + rect.x += EditorGUIUtility.labelWidth; + rect.width = rect.width - EditorGUIUtility.labelWidth; + + switch ((ColorMode)colorMode.enumValueIndex) + { + case ColorMode.Single: + TMP_EditorUtility.DrawColorProperty(rect, topLeft); + + topRight.colorValue = topLeft.colorValue; + bottomLeft.colorValue = topLeft.colorValue; + bottomRight.colorValue = topLeft.colorValue; + break; + case ColorMode.HorizontalGradient: + rect.width /= 2f; + + TMP_EditorUtility.DrawColorProperty(rect, topLeft); + + rect.x += rect.width; + + TMP_EditorUtility.DrawColorProperty(rect, topRight); + + bottomLeft.colorValue = topLeft.colorValue; + bottomRight.colorValue = topRight.colorValue; + break; + case ColorMode.VerticalGradient: + TMP_EditorUtility.DrawColorProperty(rect, topLeft); + + rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + rect.x += EditorGUIUtility.labelWidth; + + TMP_EditorUtility.DrawColorProperty(rect, bottomLeft); + + topRight.colorValue = topLeft.colorValue; + bottomRight.colorValue = bottomLeft.colorValue; + break; + case ColorMode.FourCornersGradient: + rect.width /= 2f; + + TMP_EditorUtility.DrawColorProperty(rect, topLeft); + + rect.x += rect.width; + + TMP_EditorUtility.DrawColorProperty(rect, topRight); + + rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; + + TMP_EditorUtility.DrawColorProperty(rect, bottomLeft); + + rect.x += rect.width; + + TMP_EditorUtility.DrawColorProperty(rect, bottomRight); + break; + } + + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + if (obj != null) + { + obj.ApplyModifiedProperties(); + TMPro_EventManager.ON_COLOR_GRAIDENT_PROPERTY_CHANGED(m_FontColorGradientPresetProp.objectReferenceValue as TMP_ColorGradient); + } + } + + EditorGUI.indentLevel -= 1; + } + + EditorGUILayout.PropertyField(m_OverrideHtmlColorProp, k_OverrideTagsLabel); + + EditorGUILayout.Space(); + } + + void DrawSpacing() + { + // CHARACTER, LINE & PARAGRAPH SPACING + EditorGUI.BeginChangeCheck(); + + Rect rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight); + + EditorGUI.PrefixLabel(rect, k_SpacingOptionsLabel); + + int oldIndent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth - 3f) / 2f; + + EditorGUIUtility.labelWidth = Mathf.Min(rect.width * 0.55f, 80f); + + EditorGUI.PropertyField(rect, m_CharacterSpacingProp, k_CharacterSpacingLabel); + rect.x += rect.width + 3f; + EditorGUI.PropertyField(rect, m_WordSpacingProp, k_WordSpacingLabel); + + rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight); + EditorGUIUtility.labelWidth = 0; + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth -3f) / 2f; + EditorGUIUtility.labelWidth = Mathf.Min(rect.width * 0.55f, 80f); + + EditorGUI.PropertyField(rect, m_LineSpacingProp, k_LineSpacingLabel); + rect.x += rect.width + 3f; + EditorGUI.PropertyField(rect, m_ParagraphSpacingProp, k_ParagraphSpacingLabel); + + EditorGUIUtility.labelWidth = 0; + EditorGUI.indentLevel = oldIndent; + + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + } + } + + void DrawAlignment() + { + // TEXT ALIGNMENT + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.PropertyField(m_TextAlignmentProp, k_AlignmentLabel); + + // WRAPPING RATIOS shown if Justified mode is selected. + if (((_HorizontalAlignmentOptions)m_TextAlignmentProp.intValue & _HorizontalAlignmentOptions.Justified) == _HorizontalAlignmentOptions.Justified || ((_HorizontalAlignmentOptions)m_TextAlignmentProp.intValue & _HorizontalAlignmentOptions.Flush) == _HorizontalAlignmentOptions.Flush) + DrawPropertySlider(k_WrapMixLabel, m_WordWrappingRatiosProp); + + if (EditorGUI.EndChangeCheck()) + m_HavePropertiesChanged = true; + + EditorGUILayout.Space(); + } + + void DrawWrappingOverflow() + { + // TEXT WRAPPING + EditorGUI.BeginChangeCheck(); + int wrapSelection = EditorGUILayout.Popup(k_WrappingLabel, m_EnableWordWrappingProp.boolValue ? 1 : 0, k_WrappingOptions); + if (EditorGUI.EndChangeCheck()) + { + m_EnableWordWrappingProp.boolValue = wrapSelection == 1; + m_HavePropertiesChanged = true; + m_TextComponent.m_isInputParsingRequired = true; + } + + // TEXT OVERFLOW + EditorGUI.BeginChangeCheck(); + + // Cache Reference to Linked Text Component + TMP_Text oldLinkedComponent = m_LinkedTextComponentProp.objectReferenceValue as TMP_Text; + + if ((TextOverflowModes)m_TextOverflowModeProp.enumValueIndex == TextOverflowModes.Linked) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel); + + EditorGUILayout.PropertyField(m_LinkedTextComponentProp, GUIContent.none); + + EditorGUILayout.EndHorizontal(); + + if (GUI.changed) + { + TMP_Text linkedComponent = m_LinkedTextComponentProp.objectReferenceValue as TMP_Text; + + if (linkedComponent) + m_TextComponent.linkedTextComponent = linkedComponent; + + } + } + else if ((TextOverflowModes)m_TextOverflowModeProp.enumValueIndex == TextOverflowModes.Page) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel); + EditorGUILayout.PropertyField(m_PageToDisplayProp, GUIContent.none); + EditorGUILayout.EndHorizontal(); + + if (oldLinkedComponent) + m_TextComponent.linkedTextComponent = null; + } + else + { + EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel); + + if (oldLinkedComponent) + m_TextComponent.linkedTextComponent = null; + } + + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + m_TextComponent.m_isInputParsingRequired = true; + } + + EditorGUILayout.Space(); + } + + protected abstract void DrawExtraSettings(); + + protected void DrawMargins() + { + EditorGUI.BeginChangeCheck(); + DrawMarginProperty(m_MarginProp, k_MarginsLabel); + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + } + + EditorGUILayout.Space(); + } + + protected void DrawGeometrySorting() + { + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.PropertyField(m_GeometrySortingOrderProp, k_GeometrySortingLabel); + + if (EditorGUI.EndChangeCheck()) + m_HavePropertiesChanged = true; + + EditorGUILayout.Space(); + } + + protected void DrawRichText() + { + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.PropertyField(m_IsRichTextProp, k_RichTextLabel); + if (EditorGUI.EndChangeCheck()) + m_HavePropertiesChanged = true; + } + + protected void DrawParsing() + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_EnableEscapeCharacterParsingProp, k_EscapeCharactersLabel); + EditorGUILayout.PropertyField(m_UseMaxVisibleDescenderProp, k_VisibleDescenderLabel); + + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(m_SpriteAssetProp, k_SpriteAssetLabel, true); + + if (EditorGUI.EndChangeCheck()) + m_HavePropertiesChanged = true; + + EditorGUILayout.Space(); + } + + protected void DrawTextureMapping() + { + // TEXTURE MAPPING OPTIONS + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_HorizontalMappingProp, k_HorizontalMappingLabel); + EditorGUILayout.PropertyField(m_VerticalMappingProp, k_VerticalMappingLabel); + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + } + + // UV OPTIONS + if (m_HorizontalMappingProp.enumValueIndex > 0) + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_UvLineOffsetProp, k_LineOffsetLabel, GUILayout.MinWidth(70f)); + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + } + } + + EditorGUILayout.Space(); + } + + protected void DrawKerning() + { + // KERNING + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_EnableKerningProp, k_KerningLabel); + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + } + } + + protected void DrawPadding() + { + // EXTRA PADDING + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_EnableExtraPaddingProp, k_PaddingLabel); + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + m_CheckPaddingRequiredProp.boolValue = true; + } + } + + /// + /// Method to retrieve the material presets that match the currently selected font asset. + /// + protected GUIContent[] GetMaterialPresets() + { + TMP_FontAsset fontAsset = m_FontAssetProp.objectReferenceValue as TMP_FontAsset; + if (fontAsset == null) return null; + + m_MaterialPresets = TMP_EditorUtility.FindMaterialReferences(fontAsset); + m_MaterialPresetNames = new GUIContent[m_MaterialPresets.Length]; + + for (int i = 0; i < m_MaterialPresetNames.Length; i++) + { + m_MaterialPresetNames[i] = new GUIContent(m_MaterialPresets[i].name); + + if (m_TargetMaterial.GetInstanceID() == m_MaterialPresets[i].GetInstanceID()) + m_MaterialPresetSelectionIndex = i; + } + + m_IsPresetListDirty = false; + + return m_MaterialPresetNames; + } + + // DRAW MARGIN PROPERTY + protected void DrawMarginProperty(SerializedProperty property, GUIContent label) + { + Rect rect = EditorGUILayout.GetControlRect(false, 2 * 18); + + EditorGUI.BeginProperty(rect, label, property); + + Rect pos0 = new Rect(rect.x + 15, rect.y + 2, rect.width - 15, 18); + + float width = rect.width + 3; + pos0.width = EditorGUIUtility.labelWidth; + GUI.Label(pos0, label); + + var vec = property.vector4Value; + + float widthB = width - EditorGUIUtility.labelWidth; + float fieldWidth = widthB / 4; + pos0.width = Mathf.Max(fieldWidth - 5, 45f); + + // Labels + pos0.x = EditorGUIUtility.labelWidth + 15; + GUI.Label(pos0, k_LeftLabel); + + pos0.x += fieldWidth; + GUI.Label(pos0, k_TopLabel); + + pos0.x += fieldWidth; + GUI.Label(pos0, k_RightLabel); + + pos0.x += fieldWidth; + GUI.Label(pos0, k_BottomLabel); + + pos0.y += 18; + + pos0.x = EditorGUIUtility.labelWidth; + vec.x = EditorGUI.FloatField(pos0, GUIContent.none, vec.x); + + pos0.x += fieldWidth; + vec.y = EditorGUI.FloatField(pos0, GUIContent.none, vec.y); + + pos0.x += fieldWidth; + vec.z = EditorGUI.FloatField(pos0, GUIContent.none, vec.z); + + pos0.x += fieldWidth; + vec.w = EditorGUI.FloatField(pos0, GUIContent.none, vec.w); + + property.vector4Value = vec; + + EditorGUI.EndProperty(); + } + + protected void DrawPropertySlider(GUIContent label, SerializedProperty property) + { + Rect rect = EditorGUILayout.GetControlRect(false, 17); + + GUIContent content = label ?? GUIContent.none; + EditorGUI.Slider(new Rect(rect.x, rect.y, rect.width, rect.height), property, 0.0f, 1.0f, content); + } + + protected abstract bool IsMixSelectionTypes(); + + // Special Handling of Undo / Redo Events. + protected abstract void OnUndoRedo(); + + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseEditorPanel.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseEditorPanel.cs.meta new file mode 100644 index 00000000..87bd7391 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseEditorPanel.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 91950f78729ab144aa36e94690b28fad +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseShaderGUI.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseShaderGUI.cs new file mode 100644 index 00000000..ed87b504 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseShaderGUI.cs @@ -0,0 +1,534 @@ +using UnityEngine; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + /// Base class for TextMesh Pro shader GUIs. + public abstract class TMP_BaseShaderGUI : ShaderGUI + { + /// Representation of a #pragma shader_feature. + /// It is assumed that the first feature option is for no keyword (underscores). + protected class ShaderFeature + { + public string undoLabel; + + public GUIContent label; + + /// The keyword labels, for display. Include the no-keyword as the first option. + public GUIContent[] keywordLabels; + + /// The shader keywords. Exclude the no-keyword option. + public string[] keywords; + + int m_State; + + public bool Active + { + get { return m_State >= 0; } + } + + public int State + { + get { return m_State; } + } + + public void ReadState(Material material) + { + for (int i = 0; i < keywords.Length; i++) + { + if (material.IsKeywordEnabled(keywords[i])) + { + m_State = i; + return; + } + } + + m_State = -1; + } + + public void SetActive(bool active, Material material) + { + m_State = active ? 0 : -1; + SetStateKeywords(material); + } + + public void DoPopup(MaterialEditor editor, Material material) + { + EditorGUI.BeginChangeCheck(); + int selection = EditorGUILayout.Popup(label, m_State + 1, keywordLabels); + if (EditorGUI.EndChangeCheck()) + { + m_State = selection - 1; + editor.RegisterPropertyChangeUndo(undoLabel); + SetStateKeywords(material); + } + } + + void SetStateKeywords(Material material) + { + for (int i = 0; i < keywords.Length; i++) + { + if (i == m_State) + { + material.EnableKeyword(keywords[i]); + } + else + { + material.DisableKeyword(keywords[i]); + } + } + } + } + + static GUIContent s_TempLabel = new GUIContent(); + + protected static bool s_DebugExtended; + + static int s_UndoRedoCount, s_LastSeenUndoRedoCount; + + static float[][] s_TempFloats = + { + null, new float[1], new float[2], new float[3], new float[4] + }; + + protected static GUIContent[] s_XywhVectorLabels = + { + new GUIContent("X"), + new GUIContent("Y"), + new GUIContent("W", "Width"), + new GUIContent("H", "Height") + }; + + protected static GUIContent[] s_LbrtVectorLabels = + { + new GUIContent("L", "Left"), + new GUIContent("B", "Bottom"), + new GUIContent("R", "Right"), + new GUIContent("T", "Top") + }; + + static TMP_BaseShaderGUI() + { + // Keep track of how many undo/redo events happened. + Undo.undoRedoPerformed += () => s_UndoRedoCount += 1; + } + + bool m_IsNewGUI = true; + + float m_DragAndDropMinY; + + protected MaterialEditor m_Editor; + + protected Material m_Material; + + protected MaterialProperty[] m_Properties; + + void PrepareGUI() + { + m_IsNewGUI = false; + ShaderUtilities.GetShaderPropertyIDs(); + + // New GUI just got constructed. This happens in response to a selection, + // but also after undo/redo events. + if (s_LastSeenUndoRedoCount != s_UndoRedoCount) + { + // There's been at least one undo/redo since the last time this GUI got constructed. + // Maybe the undo/redo was for this material? Assume that is was. + TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material as Material); + } + + s_LastSeenUndoRedoCount = s_UndoRedoCount; + } + + public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) + { + m_Editor = materialEditor; + m_Material = materialEditor.target as Material; + this.m_Properties = properties; + + if (m_IsNewGUI) + { + PrepareGUI(); + } + + DoDragAndDropBegin(); + EditorGUI.BeginChangeCheck(); + DoGUI(); + if (EditorGUI.EndChangeCheck()) + { + TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material); + } + + DoDragAndDropEnd(); + } + + /// Override this method to create the specific shader GUI. + protected abstract void DoGUI(); + + static string[] s_PanelStateLabel = new string[] { "\t- Click to collapse -", "\t- Click to expand -" }; + + protected bool BeginPanel(string panel, bool expanded) + { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18)); + r.x += 20; + r.width += 6; + + bool enabled = GUI.enabled; + GUI.enabled = true; + expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle); + r.width -= 30; + EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel); + GUI.enabled = enabled; + + EditorGUI.indentLevel += 1; + EditorGUI.BeginDisabledGroup(false); + + return expanded; + } + + protected bool BeginPanel(string panel, ShaderFeature feature, bool expanded, bool readState = true) + { + if (readState) + { + feature.ReadState(m_Material); + } + + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.BeginHorizontal(); + + Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 20, GUILayout.Width(20f))); + bool active = EditorGUI.Toggle(r, feature.Active); + + if (EditorGUI.EndChangeCheck()) + { + m_Editor.RegisterPropertyChangeUndo(feature.undoLabel); + feature.SetActive(active, m_Material); + } + + r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18)); + r.width += 6; + + bool enabled = GUI.enabled; + GUI.enabled = true; + expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle); + r.width -= 10; + EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel); + GUI.enabled = enabled; + + GUILayout.EndHorizontal(); + + EditorGUI.indentLevel += 1; + EditorGUI.BeginDisabledGroup(!active); + + return expanded; + } + + public void EndPanel() + { + EditorGUI.EndDisabledGroup(); + EditorGUI.indentLevel -= 1; + EditorGUILayout.EndVertical(); + } + + MaterialProperty BeginProperty(string name) + { + MaterialProperty property = FindProperty(name, m_Properties); + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = property.hasMixedValue; + m_Editor.BeginAnimatedCheck(Rect.zero, property); + + return property; + } + + bool EndProperty() + { + m_Editor.EndAnimatedCheck(); + EditorGUI.showMixedValue = false; + return EditorGUI.EndChangeCheck(); + } + + protected void DoPopup(string name, string label, GUIContent[] options) + { + MaterialProperty property = BeginProperty(name); + s_TempLabel.text = label; + int index = EditorGUILayout.Popup(s_TempLabel, (int)property.floatValue, options); + if (EndProperty()) + { + property.floatValue = index; + } + } + + protected void DoCubeMap(string name, string label) + { + DoTexture(name, label, typeof(Cubemap)); + } + + protected void DoTexture2D(string name, string label, bool withTilingOffset = false, string[] speedNames = null) + { + DoTexture(name, label, typeof(Texture2D), withTilingOffset, speedNames); + } + + void DoTexture(string name, string label, System.Type type, bool withTilingOffset = false, string[] speedNames = null) + { + MaterialProperty property = BeginProperty(name); + Rect rect = EditorGUILayout.GetControlRect(true, 60f); + float totalWidth = rect.width; + rect.width = EditorGUIUtility.labelWidth + 60f; + s_TempLabel.text = label; + Object tex = EditorGUI.ObjectField(rect, s_TempLabel, property.textureValue, type, false); + + if (EndProperty()) + { + property.textureValue = tex as Texture; + } + + rect.x += rect.width + 4f; + rect.width = totalWidth - rect.width - 4f; + rect.height = EditorGUIUtility.singleLineHeight; + + if (withTilingOffset) + { + DoTilingOffset(rect, property); + rect.y += (rect.height + 2f) * 2f; + } + + if (speedNames != null) + { + DoUVSpeed(rect, speedNames); + } + } + + void DoTilingOffset(Rect rect, MaterialProperty property) + { + float labelWidth = EditorGUIUtility.labelWidth; + int indentLevel = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.20f); + + Vector4 vector = property.textureScaleAndOffset; + + bool changed = false; + float[] values = s_TempFloats[2]; + + s_TempLabel.text = "Tiling"; + Rect vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel); + values[0] = vector.x; + values[1] = vector.y; + EditorGUI.BeginChangeCheck(); + EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values); + if (EndProperty()) + { + vector.x = values[0]; + vector.y = values[1]; + changed = true; + } + + rect.y += rect.height + 2f; + s_TempLabel.text = "Offset"; + vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel); + values[0] = vector.z; + values[1] = vector.w; + EditorGUI.BeginChangeCheck(); + EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values); + if (EndProperty()) + { + vector.z = values[0]; + vector.w = values[1]; + changed = true; + } + + if (changed) + { + property.textureScaleAndOffset = vector; + } + + EditorGUIUtility.labelWidth = labelWidth; + EditorGUI.indentLevel = indentLevel; + } + + protected void DoUVSpeed(Rect rect, string[] names) + { + float labelWidth = EditorGUIUtility.labelWidth; + int indentLevel = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.20f); + + s_TempLabel.text = "Speed"; + rect = EditorGUI.PrefixLabel(rect, s_TempLabel); + + EditorGUIUtility.labelWidth = 13f; + rect.width = rect.width * 0.5f - 1f; + DoFloat(rect, names[0], "X"); + rect.x += rect.width + 2f; + DoFloat(rect, names[1], "Y"); + EditorGUIUtility.labelWidth = labelWidth; + EditorGUI.indentLevel = indentLevel; + } + + protected void DoToggle(string name, string label) + { + MaterialProperty property = BeginProperty(name); + s_TempLabel.text = label; + bool value = EditorGUILayout.Toggle(s_TempLabel, property.floatValue == 1f); + if (EndProperty()) + { + property.floatValue = value ? 1f : 0f; + } + } + + protected void DoFloat(string name, string label) + { + MaterialProperty property = BeginProperty(name); + Rect rect = EditorGUILayout.GetControlRect(); + rect.width = EditorGUIUtility.labelWidth + 55f; + s_TempLabel.text = label; + float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue); + if (EndProperty()) + { + property.floatValue = value; + } + } + + protected void DoColor(string name, string label) + { + MaterialProperty property = BeginProperty(name); + s_TempLabel.text = label; + Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue); + if (EndProperty()) + { + property.colorValue = value; + } + } + + void DoFloat(Rect rect, string name, string label) + { + MaterialProperty property = BeginProperty(name); + s_TempLabel.text = label; + float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue); + if (EndProperty()) + { + property.floatValue = value; + } + } + + protected void DoSlider(string name, string label) + { + MaterialProperty property = BeginProperty(name); + Vector2 range = property.rangeLimits; + s_TempLabel.text = label; + float value = EditorGUI.Slider( + EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y + ); + if (EndProperty()) + { + property.floatValue = value; + } + } + + protected void DoVector3(string name, string label) + { + MaterialProperty property = BeginProperty(name); + s_TempLabel.text = label; + Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue); + if (EndProperty()) + { + property.vectorValue = value; + } + } + + protected void DoVector(string name, string label, GUIContent[] subLabels) + { + MaterialProperty property = BeginProperty(name); + Rect rect = EditorGUILayout.GetControlRect(); + s_TempLabel.text = label; + rect = EditorGUI.PrefixLabel(rect, s_TempLabel); + Vector4 vector = property.vectorValue; + + float[] values = s_TempFloats[subLabels.Length]; + for (int i = 0; i < subLabels.Length; i++) + { + values[i] = vector[i]; + } + + EditorGUI.MultiFloatField(rect, subLabels, values); + if (EndProperty()) + { + for (int i = 0; i < subLabels.Length; i++) + { + vector[i] = values[i]; + } + + property.vectorValue = vector; + } + } + + void DoDragAndDropBegin() + { + m_DragAndDropMinY = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)).y; + } + + void DoDragAndDropEnd() + { + Rect rect = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + Event evt = Event.current; + if (evt.type == EventType.DragUpdated) + { + DragAndDrop.visualMode = DragAndDropVisualMode.Generic; + evt.Use(); + } + else if ( + evt.type == EventType.DragPerform && + Rect.MinMaxRect(rect.xMin, m_DragAndDropMinY, rect.xMax, rect.yMax).Contains(evt.mousePosition) + ) + { + DragAndDrop.AcceptDrag(); + evt.Use(); + Material droppedMaterial = DragAndDrop.objectReferences[0] as Material; + if (droppedMaterial && droppedMaterial != m_Material) + { + PerformDrop(droppedMaterial); + } + } + } + + void PerformDrop(Material droppedMaterial) + { + Texture droppedTex = droppedMaterial.GetTexture(ShaderUtilities.ID_MainTex); + if (!droppedTex) + { + return; + } + + Texture currentTex = m_Material.GetTexture(ShaderUtilities.ID_MainTex); + TMP_FontAsset requiredFontAsset = null; + if (droppedTex != currentTex) + { + requiredFontAsset = TMP_EditorUtility.FindMatchingFontAsset(droppedMaterial); + if (!requiredFontAsset) + { + return; + } + } + + foreach (GameObject o in Selection.gameObjects) + { + if (requiredFontAsset) + { + TMP_Text textComponent = o.GetComponent(); + if (textComponent) + { + Undo.RecordObject(textComponent, "Font Asset Change"); + textComponent.font = requiredFontAsset; + } + } + + TMPro_EventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED(o, m_Material, droppedMaterial); + EditorUtility.SetDirty(o); + } + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseShaderGUI.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseShaderGUI.cs.meta new file mode 100644 index 00000000..f07bd856 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BaseShaderGUI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 438efd46088d408d8a53f707fa68d976 +timeCreated: 1469844810 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BitmapShaderGUI.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BitmapShaderGUI.cs new file mode 100644 index 00000000..d35d5392 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BitmapShaderGUI.cs @@ -0,0 +1,85 @@ +using UnityEngine; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + public class TMP_BitmapShaderGUI : TMP_BaseShaderGUI + { + static bool s_Face = true; + + protected override void DoGUI() + { + s_Face = BeginPanel("Face", s_Face); + if (s_Face) + { + DoFacePanel(); + } + + EndPanel(); + + s_DebugExtended = BeginPanel("Debug Settings", s_DebugExtended); + if (s_DebugExtended) + { + DoDebugPanel(); + } + + EndPanel(); + } + + void DoFacePanel() + { + EditorGUI.indentLevel += 1; + if (m_Material.HasProperty(ShaderUtilities.ID_FaceTex)) + { + DoColor("_FaceColor", "Color"); + DoTexture2D("_FaceTex", "Texture", true); + } + else + { + DoColor("_Color", "Color"); + DoSlider("_DiffusePower", "Diffuse Power"); + } + + EditorGUI.indentLevel -= 1; + + EditorGUILayout.Space(); + } + + void DoDebugPanel() + { + EditorGUI.indentLevel += 1; + DoTexture2D("_MainTex", "Font Atlas"); + if (m_Material.HasProperty(ShaderUtilities.ID_VertexOffsetX)) + { + if (m_Material.HasProperty(ShaderUtilities.ID_Padding)) + { + EditorGUILayout.Space(); + DoFloat("_Padding", "Padding"); + } + + EditorGUILayout.Space(); + DoFloat("_VertexOffsetX", "Offset X"); + DoFloat("_VertexOffsetY", "Offset Y"); + } + + if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX)) + { + EditorGUILayout.Space(); + DoFloat("_MaskSoftnessX", "Softness X"); + DoFloat("_MaskSoftnessY", "Softness Y"); + DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels); + } + + if (m_Material.HasProperty(ShaderUtilities.ID_StencilID)) + { + EditorGUILayout.Space(); + DoFloat("_Stencil", "Stencil ID"); + DoFloat("_StencilComp", "Stencil Comp"); + } + + EditorGUI.indentLevel -= 1; + + EditorGUILayout.Space(); + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta new file mode 100644 index 00000000..6d0e0529 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 806de5a9211448c8b65c8435ebb48dd4 +timeCreated: 1469998850 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_CharacterPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_CharacterPropertyDrawer.cs new file mode 100644 index 00000000..c1f5fb99 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_CharacterPropertyDrawer.cs @@ -0,0 +1,237 @@ +using UnityEngine; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + [CustomPropertyDrawer(typeof(TMP_Character))] + public class TMP_CharacterPropertyDrawer : PropertyDrawer + { + //[SerializeField] + //static Material s_InternalSDFMaterial; + + //[SerializeField] + //static Material s_InternalBitmapMaterial; + + int m_GlyphSelectedForEditing = -1; + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty prop_Unicode = property.FindPropertyRelative("m_Unicode"); + SerializedProperty prop_GlyphIndex = property.FindPropertyRelative("m_GlyphIndex"); + SerializedProperty prop_Scale = property.FindPropertyRelative("m_Scale"); + + + GUIStyle style = new GUIStyle(EditorStyles.label); + style.richText = true; + + EditorGUIUtility.labelWidth = 40f; + EditorGUIUtility.fieldWidth = 50; + + Rect rect = new Rect(position.x + 50, position.y, position.width, 49); + + // Display non-editable fields + if (GUI.enabled == false) + { + int unicode = prop_Unicode.intValue; + EditorGUI.LabelField(new Rect(rect.x, rect.y, 120f, 18), new GUIContent("Unicode: 0x" + unicode.ToString("X") + ""), style); + EditorGUI.LabelField(new Rect(rect.x + 115, rect.y, 120f, 18), unicode <= 0xFFFF ? new GUIContent("UTF16: \\u" + unicode.ToString("X4") + "") : new GUIContent("UTF32: \\U" + unicode.ToString("X8") + ""), style); + EditorGUI.LabelField(new Rect(rect.x, rect.y + 18, 120, 18), new GUIContent("Glyph ID: " + prop_GlyphIndex.intValue + ""), style); + EditorGUI.LabelField(new Rect(rect.x, rect.y + 36, 80, 18), new GUIContent("Scale: " + prop_Scale.floatValue + ""), style); + + // Draw Glyph (if exists) + DrawGlyph(position, property); + } + else // Display editable fields + { + EditorGUIUtility.labelWidth = 55f; + GUI.SetNextControlName("Unicode Input"); + EditorGUI.BeginChangeCheck(); + string unicode = EditorGUI.TextField(new Rect(rect.x, rect.y, 120, 18), "Unicode:", prop_Unicode.intValue.ToString("X")); + + if (GUI.GetNameOfFocusedControl() == "Unicode Input") + { + //Filter out unwanted characters. + char chr = Event.current.character; + if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F')) + { + Event.current.character = '\0'; + } + } + + if (EditorGUI.EndChangeCheck()) + { + // Update Unicode value + prop_Unicode.intValue = TMP_TextUtilities.StringHexToInt(unicode); + } + + // Cache current glyph index in case it needs to be restored if the new glyph index is invalid. + int currentGlyphIndex = prop_GlyphIndex.intValue; + + EditorGUIUtility.labelWidth = 59f; + EditorGUI.BeginChangeCheck(); + EditorGUI.DelayedIntField(new Rect(rect.x, rect.y + 18, 100, 18), prop_GlyphIndex, new GUIContent("Glyph ID:")); + if (EditorGUI.EndChangeCheck()) + { + // Get a reference to the font asset + TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; + + // Make sure new glyph index is valid. + int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == prop_GlyphIndex.intValue); + + if (elementIndex == -1) + prop_GlyphIndex.intValue = currentGlyphIndex; + else + fontAsset.m_IsFontAssetLookupTablesDirty = true; + } + + int glyphIndex = prop_GlyphIndex.intValue; + + // Reset glyph selection if new character has been selected. + if (GUI.enabled && m_GlyphSelectedForEditing != glyphIndex) + m_GlyphSelectedForEditing = -1; + + // Display button to edit the glyph data. + if (GUI.Button(new Rect(rect.x + 120, rect.y + 18, 75, 18), new GUIContent("Edit Glyph"))) + { + if (m_GlyphSelectedForEditing == -1) + m_GlyphSelectedForEditing = glyphIndex; + else + m_GlyphSelectedForEditing = -1; + + // Button clicks should not result in potential change. + GUI.changed = false; + } + + // Show the glyph property drawer if selected + if (glyphIndex == m_GlyphSelectedForEditing && GUI.enabled) + { + // Get a reference to the font asset + TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; + + if (fontAsset != null) + { + // Get the index of the glyph in the font asset glyph table. + int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == glyphIndex); + + if (elementIndex != -1) + { + SerializedProperty prop_GlyphTable = property.serializedObject.FindProperty("m_GlyphTable"); + SerializedProperty prop_Glyph = prop_GlyphTable.GetArrayElementAtIndex(elementIndex); + + SerializedProperty prop_GlyphMetrics = prop_Glyph.FindPropertyRelative("m_Metrics"); + SerializedProperty prop_GlyphRect = prop_Glyph.FindPropertyRelative("m_GlyphRect"); + + Rect newRect = EditorGUILayout.GetControlRect(false, 115); + EditorGUI.DrawRect(new Rect(newRect.x + 52, newRect.y - 20, newRect.width - 52, newRect.height - 5), new Color(0.1f, 0.1f, 0.1f, 0.45f)); + EditorGUI.DrawRect(new Rect(newRect.x + 53, newRect.y - 19, newRect.width - 54, newRect.height - 7), new Color(0.3f, 0.3f, 0.3f, 0.8f)); + + // Display GlyphRect + newRect.x += 55; + newRect.y -= 18; + newRect.width += 5; + EditorGUI.PropertyField(newRect, prop_GlyphRect); + + // Display GlyphMetrics + newRect.y += 45; + EditorGUI.PropertyField(newRect, prop_GlyphMetrics); + + rect.y += 120; + } + } + } + + EditorGUIUtility.labelWidth = 39f; + EditorGUI.PropertyField(new Rect(rect.x, rect.y + 36, 80, 18), prop_Scale, new GUIContent("Scale:")); + + // Draw Glyph (if exists) + DrawGlyph(position, property); + } + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return 58; + } + + void DrawGlyph(Rect position, SerializedProperty property) + { + // Get a reference to the atlas texture + TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; + + if (fontAsset == null) + return; + + // Get a reference to the Glyph Table + SerializedProperty prop_GlyphTable = property.serializedObject.FindProperty("m_GlyphTable"); + int glyphIndex = property.FindPropertyRelative("m_GlyphIndex").intValue; + int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == glyphIndex); + + // Return if we can't find the glyph + if (elementIndex == -1) + return; + + SerializedProperty prop_Glyph = prop_GlyphTable.GetArrayElementAtIndex(elementIndex); + + // Get reference to atlas texture. + int atlasIndex = prop_Glyph.FindPropertyRelative("m_AtlasIndex").intValue; + Texture2D atlasTexture = fontAsset.atlasTextures.Length > atlasIndex ? fontAsset.atlasTextures[atlasIndex] : null; + + if (atlasTexture == null) + return; + + Material mat; + if (((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) + { + mat = TMP_FontAssetEditor.internalBitmapMaterial; + + if (mat == null) + return; + + mat.mainTexture = atlasTexture; + mat.SetColor("_Color", Color.white); + } + else + { + mat = TMP_FontAssetEditor.internalSDFMaterial; + + if (mat == null) + return; + + mat.mainTexture = atlasTexture; + mat.SetFloat(ShaderUtilities.ID_GradientScale, fontAsset.atlasPadding + 1); + } + + // Draw glyph + Rect glyphDrawPosition = new Rect(position.x, position.y, 48, 58); + + SerializedProperty prop_GlyphRect = prop_Glyph.FindPropertyRelative("m_GlyphRect"); + + int glyphOriginX = prop_GlyphRect.FindPropertyRelative("m_X").intValue; + int glyphOriginY = prop_GlyphRect.FindPropertyRelative("m_Y").intValue; + int glyphWidth = prop_GlyphRect.FindPropertyRelative("m_Width").intValue; + int glyphHeight = prop_GlyphRect.FindPropertyRelative("m_Height").intValue; + + float normalizedHeight = fontAsset.faceInfo.ascentLine - fontAsset.faceInfo.descentLine; + float scale = glyphDrawPosition.width / normalizedHeight; + + // Compute the normalized texture coordinates + Rect texCoords = new Rect((float)glyphOriginX / atlasTexture.width, (float)glyphOriginY / atlasTexture.height, (float)glyphWidth / atlasTexture.width, (float)glyphHeight / atlasTexture.height); + + if (Event.current.type == EventType.Repaint) + { + glyphDrawPosition.x += (glyphDrawPosition.width - glyphWidth * scale) / 2; + glyphDrawPosition.y += (glyphDrawPosition.height - glyphHeight * scale) / 2; + glyphDrawPosition.width = glyphWidth * scale; + glyphDrawPosition.height = glyphHeight * scale; + + // Could switch to using the default material of the font asset which would require passing scale to the shader. + Graphics.DrawTexture(glyphDrawPosition, atlasTexture, texCoords, 0, 0, 0, 0, new Color(1f, 1f, 1f), mat); + } + } + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta new file mode 100644 index 00000000..3bf78921 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01ada73c4792aba4c937ff5d92cce866 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientAssetMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientAssetMenu.cs new file mode 100644 index 00000000..ccfd3676 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientAssetMenu.cs @@ -0,0 +1,51 @@ +using UnityEditor; +using UnityEngine; +using System.IO; +using System.Collections; + + + +namespace TMPro.EditorUtilities +{ + + public static class TMP_ColorGradientAssetMenu + { + [MenuItem("Assets/Create/TextMeshPro/Color Gradient", false, 115)] + public static void CreateColorGradient(MenuCommand context) + { + string filePath; + + if (Selection.assetGUIDs.Length == 0) + filePath = "Assets/New TMP Color Gradient.asset"; + else + filePath = AssetDatabase.GUIDToAssetPath(Selection.assetGUIDs[0]); + + if (Directory.Exists(filePath)) + { + filePath += "/New TMP Color Gradient.asset"; + } + else + { + filePath = Path.GetDirectoryName(filePath) + "/New TMP Color Gradient.asset"; + } + + filePath = AssetDatabase.GenerateUniqueAssetPath(filePath); + + // Create new Color Gradient Asset. + TMP_ColorGradient colorGradient = ScriptableObject.CreateInstance(); + + // Create Asset + AssetDatabase.CreateAsset(colorGradient, filePath); + + //EditorUtility.SetDirty(colorGradient); + + AssetDatabase.SaveAssets(); + + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(colorGradient)); + + EditorUtility.FocusProjectWindow(); + Selection.activeObject = colorGradient; + + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta new file mode 100644 index 00000000..a2201ee6 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d9647b571c5e44729b71d756b3d55317 +timeCreated: 1468187791 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientEditor.cs new file mode 100644 index 00000000..4dddbfb0 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientEditor.cs @@ -0,0 +1,146 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + [CustomEditor(typeof(TMP_ColorGradient))] + public class TMP_ColorGradientEditor : Editor + { + SerializedProperty m_ColorMode; + SerializedProperty m_TopLeftColor; + SerializedProperty m_TopRightColor; + SerializedProperty m_BottomLeftColor; + SerializedProperty m_BottomRightColor; + + void OnEnable() + { + m_ColorMode = serializedObject.FindProperty("colorMode"); + m_TopLeftColor = serializedObject.FindProperty("topLeft"); + m_TopRightColor = serializedObject.FindProperty("topRight"); + m_BottomLeftColor = serializedObject.FindProperty("bottomLeft"); + m_BottomRightColor = serializedObject.FindProperty("bottomRight"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_ColorMode, new GUIContent("Color Mode")); + if (EditorGUI.EndChangeCheck()) + { + switch ((ColorMode)m_ColorMode.enumValueIndex) + { + case ColorMode.Single: + m_TopRightColor.colorValue = m_TopLeftColor.colorValue; + m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue; + m_BottomRightColor.colorValue = m_TopLeftColor.colorValue; + break; + case ColorMode.HorizontalGradient: + m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue; + m_BottomRightColor.colorValue = m_TopRightColor.colorValue; + break; + case ColorMode.VerticalGradient: + m_TopRightColor.colorValue = m_TopLeftColor.colorValue; + m_BottomRightColor.colorValue = m_BottomLeftColor.colorValue; + break; + } + } + Rect rect; + switch ((ColorMode)m_ColorMode.enumValueIndex) + { + case ColorMode.Single: + EditorGUI.BeginChangeCheck(); + rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + EditorGUI.PrefixLabel(rect, new GUIContent("Colors")); + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f); + TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor); + if (EditorGUI.EndChangeCheck()) + { + m_TopRightColor.colorValue = m_TopLeftColor.colorValue; + m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue; + m_BottomRightColor.colorValue = m_TopLeftColor.colorValue; + } + break; + + case ColorMode.HorizontalGradient: + rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + EditorGUI.PrefixLabel(rect, new GUIContent("Colors")); + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; + + EditorGUI.BeginChangeCheck(); + TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor); + if (EditorGUI.EndChangeCheck()) + { + m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue; + } + + rect.x += rect.width; + + EditorGUI.BeginChangeCheck(); + TMP_EditorUtility.DrawColorProperty(rect, m_TopRightColor); + if (EditorGUI.EndChangeCheck()) + { + m_BottomRightColor.colorValue = m_TopRightColor.colorValue; + } + break; + + case ColorMode.VerticalGradient: + rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + EditorGUI.PrefixLabel(rect, new GUIContent("Colors")); + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f); + rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2); + + EditorGUI.BeginChangeCheck(); + TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor); + if (EditorGUI.EndChangeCheck()) + { + m_TopRightColor.colorValue = m_TopLeftColor.colorValue; + } + + rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f); + rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2); + + EditorGUI.BeginChangeCheck(); + TMP_EditorUtility.DrawColorProperty(rect, m_BottomLeftColor); + if (EditorGUI.EndChangeCheck()) + { + m_BottomRightColor.colorValue = m_BottomLeftColor.colorValue; + } + break; + + case ColorMode.FourCornersGradient: + rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + EditorGUI.PrefixLabel(rect, new GUIContent("Colors")); + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; + rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2); + + TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor); + rect.x += rect.width; + TMP_EditorUtility.DrawColorProperty(rect, m_TopRightColor); + + rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; + rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2); + + TMP_EditorUtility.DrawColorProperty(rect, m_BottomLeftColor); + rect.x += rect.width; + TMP_EditorUtility.DrawColorProperty(rect, m_BottomRightColor); + break; + } + + if (serializedObject.ApplyModifiedProperties()) + TMPro_EventManager.ON_COLOR_GRAIDENT_PROPERTY_CHANGED(target as TMP_ColorGradient); + + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientEditor.cs.meta new file mode 100644 index 00000000..dc58116c --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ColorGradientEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fcc60c1d6bb544d9b712b652f418ff3a +timeCreated: 1468400050 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_DropdownEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_DropdownEditor.cs new file mode 100644 index 00000000..b8e96135 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_DropdownEditor.cs @@ -0,0 +1,51 @@ +using UnityEngine; +using UnityEditor; +using UnityEditor.UI; +using UnityEngine.UI; + +namespace TMPro.EditorUtilities +{ + [CustomEditor(typeof(TMP_Dropdown), true)] + [CanEditMultipleObjects] + public class DropdownEditor : SelectableEditor + { + SerializedProperty m_Template; + SerializedProperty m_CaptionText; + SerializedProperty m_CaptionImage; + SerializedProperty m_ItemText; + SerializedProperty m_ItemImage; + SerializedProperty m_OnSelectionChanged; + SerializedProperty m_Value; + SerializedProperty m_Options; + + protected override void OnEnable() + { + base.OnEnable(); + m_Template = serializedObject.FindProperty("m_Template"); + m_CaptionText = serializedObject.FindProperty("m_CaptionText"); + m_CaptionImage = serializedObject.FindProperty("m_CaptionImage"); + m_ItemText = serializedObject.FindProperty("m_ItemText"); + m_ItemImage = serializedObject.FindProperty("m_ItemImage"); + m_OnSelectionChanged = serializedObject.FindProperty("m_OnValueChanged"); + m_Value = serializedObject.FindProperty("m_Value"); + m_Options = serializedObject.FindProperty("m_Options"); + } + + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + EditorGUILayout.Space(); + + serializedObject.Update(); + EditorGUILayout.PropertyField(m_Template); + EditorGUILayout.PropertyField(m_CaptionText); + EditorGUILayout.PropertyField(m_CaptionImage); + EditorGUILayout.PropertyField(m_ItemText); + EditorGUILayout.PropertyField(m_ItemImage); + EditorGUILayout.PropertyField(m_Value); + EditorGUILayout.PropertyField(m_Options); + EditorGUILayout.PropertyField(m_OnSelectionChanged); + serializedObject.ApplyModifiedProperties(); + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_DropdownEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_DropdownEditor.cs.meta new file mode 100644 index 00000000..75030cfd --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_DropdownEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6dbcf248c987476181a37f01a1814975 +timeCreated: 1446377461 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorCoroutine.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorCoroutine.cs new file mode 100644 index 00000000..e0056039 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorCoroutine.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + + +namespace TMPro.EditorUtilities +{ + /// + /// Simple implementation of coroutine working in the Unity Editor. + /// + public class TMP_EditorCoroutine + { + //private static Dictionary s_ActiveCoroutines; + + readonly IEnumerator coroutine; + + /// + /// Constructor + /// + /// + TMP_EditorCoroutine(IEnumerator routine) + { + this.coroutine = routine; + } + + + /// + /// Starts a new EditorCoroutine. + /// + /// Coroutine + /// new EditorCoroutine + public static TMP_EditorCoroutine StartCoroutine(IEnumerator routine) + { + TMP_EditorCoroutine coroutine = new TMP_EditorCoroutine(routine); + coroutine.Start(); + + // Add coroutine to tracking list + //if (s_ActiveCoroutines == null) + // s_ActiveCoroutines = new Dictionary(); + + // Add new instance of editor coroutine to dictionary. + //s_ActiveCoroutines.Add(coroutine.GetHashCode(), coroutine); + + return coroutine; + } + + + /// + /// Clear delegate list + /// + //public static void StopAllEditorCoroutines() + //{ + // EditorApplication.update = null; + //} + + + /// + /// Register callback for editor updates + /// + void Start() + { + EditorApplication.update += EditorUpdate; + } + + + /// + /// Unregister callback for editor updates. + /// + public void Stop() + { + if (EditorApplication.update != null) + EditorApplication.update -= EditorUpdate; + + //s_ActiveCoroutines.Remove(this.GetHashCode()); + } + + + /// + /// Delegate function called on editor updates. + /// + void EditorUpdate() + { + // Stop editor coroutine if it does not continue. + if (coroutine.MoveNext() == false) + Stop(); + + // Process the different types of EditorCoroutines. + if (coroutine.Current != null) + { + + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorCoroutine.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorCoroutine.cs.meta new file mode 100644 index 00000000..16e03fa8 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorCoroutine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 27a0335dab59ec542aadd6636a5b4ebd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorPanel.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorPanel.cs new file mode 100644 index 00000000..bf961c6d --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorPanel.cs @@ -0,0 +1,153 @@ +using UnityEngine; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + + [CustomEditor(typeof(TextMeshPro), true), CanEditMultipleObjects] + public class TMP_EditorPanel : TMP_BaseEditorPanel + { + static readonly GUIContent k_SortingLayerLabel = new GUIContent("Sorting Layer", "Name of the Renderer's sorting layer."); + static readonly GUIContent k_OrderInLayerLabel = new GUIContent("Order in Layer", "Renderer's order within a sorting layer."); + static readonly GUIContent k_OrthographicLabel = new GUIContent("Orthographic Mode", "Should be enabled when using an orthographic camera. Instructs the shader to not perform any perspective correction."); + static readonly GUIContent k_VolumetricLabel = new GUIContent("Volumetric Setup", "Use cubes rather than quads to render the text. Allows for volumetric rendering when combined with a compatible shader."); + + SerializedProperty m_IsVolumetricTextProp; + + SerializedProperty m_IsOrthographicProp; + + Renderer m_Renderer; + + protected override void OnEnable() + { + base.OnEnable(); + + m_IsOrthographicProp = serializedObject.FindProperty("m_isOrthographic"); + + m_IsVolumetricTextProp = serializedObject.FindProperty("m_isVolumetricText"); + + m_Renderer = m_TextComponent.GetComponent(); + } + + protected override void DrawExtraSettings() + { + Foldout.extraSettings = EditorGUILayout.Foldout(Foldout.extraSettings, k_ExtraSettingsLabel, true, TMP_UIStyleManager.boldFoldout); + if (Foldout.extraSettings) + { + EditorGUI.indentLevel += 1; + + DrawMargins(); + + DrawSortingLayer(); + + DrawGeometrySorting(); + + DrawOrthographicMode(); + + DrawRichText(); + + DrawParsing(); + + DrawVolumetricSetup(); + + DrawKerning(); + + DrawPadding(); + + EditorGUI.indentLevel -= 1; + } + } + + protected void DrawSortingLayer() + { + Undo.RecordObject(m_Renderer, "Sorting Layer Change"); + + EditorGUI.BeginChangeCheck(); + + // SORTING LAYERS + var sortingLayerNames = SortingLayerHelper.sortingLayerNames; + + var textComponent = (TextMeshPro)m_TextComponent; + + // Look up the layer name using the current layer ID + string oldName = SortingLayerHelper.GetSortingLayerNameFromID(textComponent.sortingLayerID); + + // Use the name to look up our array index into the names list + int oldLayerIndex = System.Array.IndexOf(sortingLayerNames, oldName); + + // Show the pop-up for the names + EditorGUIUtility.fieldWidth = 0f; + int newLayerIndex = EditorGUILayout.Popup(k_SortingLayerLabel, oldLayerIndex, sortingLayerNames); + + // If the index changes, look up the ID for the new index to store as the new ID + if (newLayerIndex != oldLayerIndex) + { + textComponent.sortingLayerID = SortingLayerHelper.GetSortingLayerIDForIndex(newLayerIndex); + } + + // Expose the manual sorting order + int newSortingLayerOrder = EditorGUILayout.IntField(k_OrderInLayerLabel, textComponent.sortingOrder); + if (newSortingLayerOrder != textComponent.sortingOrder) + { + textComponent.sortingOrder = newSortingLayerOrder; + } + + if (EditorGUI.EndChangeCheck()) + m_HavePropertiesChanged = true; + + EditorGUILayout.Space(); + } + + protected void DrawOrthographicMode() + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_IsOrthographicProp, k_OrthographicLabel); + if (EditorGUI.EndChangeCheck()) + m_HavePropertiesChanged = true; + } + + protected void DrawVolumetricSetup() + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_IsVolumetricTextProp, k_VolumetricLabel); + if (EditorGUI.EndChangeCheck()) + { + m_HavePropertiesChanged = true; + m_TextComponent.textInfo.ResetVertexLayout(m_IsVolumetricTextProp.boolValue); + } + + EditorGUILayout.Space(); + } + + // Method to handle multi object selection + protected override bool IsMixSelectionTypes() + { + GameObject[] objects = Selection.gameObjects; + if (objects.Length > 1) + { + for (int i = 0; i < objects.Length; i++) + { + if (objects[i].GetComponent() == null) + return true; + } + } + return false; + } + + protected override void OnUndoRedo() + { + int undoEventId = Undo.GetCurrentGroup(); + int lastUndoEventId = s_EventId; + + if (undoEventId != lastUndoEventId) + { + for (int i = 0; i < targets.Length; i++) + { + //Debug.Log("Undo & Redo Performed detected in Editor Panel. Event ID:" + Undo.GetCurrentGroup()); + TMPro_EventManager.ON_TEXTMESHPRO_PROPERTY_CHANGED(true, targets[i] as TextMeshPro); + s_EventId = undoEventId; + } + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorPanel.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorPanel.cs.meta new file mode 100644 index 00000000..54fd8048 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorPanel.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 34f6695d37a94370a3697f6b068f5d5e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorUtility.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorUtility.cs new file mode 100644 index 00000000..d9ccd86f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorUtility.cs @@ -0,0 +1,450 @@ +using UnityEngine; +using UnityEditor; +using System.Text; +using System.IO; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro.EditorUtilities +{ + + public static class TMP_EditorUtility + { + /// + /// Returns the relative path of the package. + /// + public static string packageRelativePath + { + get + { + if (string.IsNullOrEmpty(m_PackagePath)) + m_PackagePath = GetPackageRelativePath(); + + return m_PackagePath; + } + } + [SerializeField] + private static string m_PackagePath; + + /// + /// Returns the fully qualified path of the package. + /// + public static string packageFullPath + { + get + { + if (string.IsNullOrEmpty(m_PackageFullPath)) + m_PackageFullPath = GetPackageFullPath(); + + return m_PackageFullPath; + } + } + [SerializeField] + private static string m_PackageFullPath; + + + // Static Fields Related to locating the TextMesh Pro Asset + private static string folderPath = "Not Found"; + + private static EditorWindow Gameview; + private static bool isInitialized = false; + + private static void GetGameview() + { + System.Reflection.Assembly assembly = typeof(UnityEditor.EditorWindow).Assembly; + System.Type type = assembly.GetType("UnityEditor.GameView"); + Gameview = EditorWindow.GetWindow(type); + } + + + public static void RepaintAll() + { + if (isInitialized == false) + { + GetGameview(); + isInitialized = true; + } + + SceneView.RepaintAll(); + Gameview.Repaint(); + } + + + /// + /// Create and return a new asset in a smart location based on the current selection and then select it. + /// + /// + /// Name of the new asset. Do not include the .asset extension. + /// + /// + /// The new asset. + /// + public static T CreateAsset(string name) where T : ScriptableObject + { + string path = AssetDatabase.GetAssetPath(Selection.activeObject); + if (path.Length == 0) + { + // no asset selected, place in asset root + path = "Assets/" + name + ".asset"; + } + else if (Directory.Exists(path)) + { + // place in currently selected directory + path += "/" + name + ".asset"; + } + else { + // place in current selection's containing directory + path = Path.GetDirectoryName(path) + "/" + name + ".asset"; + } + T asset = ScriptableObject.CreateInstance(); + AssetDatabase.CreateAsset(asset, AssetDatabase.GenerateUniqueAssetPath(path)); + EditorUtility.FocusProjectWindow(); + Selection.activeObject = asset; + return asset; + } + + + + // Function used to find all materials which reference a font atlas so we can update all their references. + public static Material[] FindMaterialReferences(TMP_FontAsset fontAsset) + { + List refs = new List(); + Material mat = fontAsset.material; + refs.Add(mat); + + // Get materials matching the search pattern. + string searchPattern = "t:Material" + " " + fontAsset.name.Split(new char[] { ' ' })[0]; + string[] materialAssetGUIDs = AssetDatabase.FindAssets(searchPattern); + + for (int i = 0; i < materialAssetGUIDs.Length; i++) + { + string materialPath = AssetDatabase.GUIDToAssetPath(materialAssetGUIDs[i]); + Material targetMaterial = AssetDatabase.LoadAssetAtPath(materialPath); + + if (targetMaterial.HasProperty(ShaderUtilities.ID_MainTex) && targetMaterial.GetTexture(ShaderUtilities.ID_MainTex) != null && mat.GetTexture(ShaderUtilities.ID_MainTex) != null && targetMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID() == mat.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + { + if (!refs.Contains(targetMaterial)) + refs.Add(targetMaterial); + } + else + { + // TODO: Find a more efficient method to unload resources. + //Resources.UnloadAsset(targetMaterial.GetTexture(ShaderUtilities.ID_MainTex)); + } + } + + return refs.ToArray(); + } + + + // Function used to find the Font Asset which matches the given Material Preset and Font Atlas Texture. + public static TMP_FontAsset FindMatchingFontAsset(Material mat) + { + if (mat.GetTexture(ShaderUtilities.ID_MainTex) == null) return null; + + // Find the dependent assets of this material. + string[] dependentAssets = AssetDatabase.GetDependencies(AssetDatabase.GetAssetPath(mat), false); + + for (int i = 0; i < dependentAssets.Length; i++) + { + TMP_FontAsset fontAsset = AssetDatabase.LoadAssetAtPath(dependentAssets[i]); + if (fontAsset != null) + return fontAsset; + } + + return null; + } + + + private static string GetPackageRelativePath() + { + // Check for potential UPM package + string packagePath = Path.GetFullPath("Packages/com.unity.textmeshpro"); + if (Directory.Exists(packagePath)) + { + return "Packages/com.unity.textmeshpro"; + } + + packagePath = Path.GetFullPath("Assets/.."); + if (Directory.Exists(packagePath)) + { + // Search default location for development package + if (Directory.Exists(packagePath + "/Assets/Packages/com.unity.TextMeshPro/Editor Resources")) + { + return "Assets/Packages/com.unity.TextMeshPro"; + } + + // Search for default location of normal TextMesh Pro AssetStore package + if (Directory.Exists(packagePath + "/Assets/TextMesh Pro/Editor Resources")) + { + return "Assets/TextMesh Pro"; + } + + // Search for potential alternative locations in the user project + string[] matchingPaths = Directory.GetDirectories(packagePath, "TextMesh Pro", SearchOption.AllDirectories); + packagePath = ValidateLocation(matchingPaths, packagePath); + if (packagePath != null) return packagePath; + } + + return null; + } + + private static string GetPackageFullPath() + { + // Check for potential UPM package + string packagePath = Path.GetFullPath("Packages/com.unity.textmeshpro"); + if (Directory.Exists(packagePath)) + { + return packagePath; + } + + packagePath = Path.GetFullPath("Assets/.."); + if (Directory.Exists(packagePath)) + { + // Search default location for development package + if (Directory.Exists(packagePath + "/Assets/Packages/com.unity.TextMeshPro/Editor Resources")) + { + return packagePath + "/Assets/Packages/com.unity.TextMeshPro"; + } + + // Search for default location of normal TextMesh Pro AssetStore package + if (Directory.Exists(packagePath + "/Assets/TextMesh Pro/Editor Resources")) + { + return packagePath + "/Assets/TextMesh Pro"; + } + + // Search for potential alternative locations in the user project + string[] matchingPaths = Directory.GetDirectories(packagePath, "TextMesh Pro", SearchOption.AllDirectories); + string path = ValidateLocation(matchingPaths, packagePath); + if (path != null) return packagePath + path; + } + + return null; + } + + + /// + /// Method to validate the location of the asset folder by making sure the GUISkins folder exists. + /// + /// + /// + private static string ValidateLocation(string[] paths, string projectPath) + { + for (int i = 0; i < paths.Length; i++) + { + // Check if any of the matching directories contain a GUISkins directory. + if (Directory.Exists(paths[i] + "/Editor Resources")) + { + folderPath = paths[i].Replace(projectPath, ""); + folderPath = folderPath.TrimStart('\\', '/'); + return folderPath; + } + } + + return null; + } + + + /// + /// Function which returns a string containing a sequence of Decimal character ranges. + /// + /// + /// + public static string GetDecimalCharacterSequence(int[] characterSet) + { + if (characterSet == null || characterSet.Length == 0) + return string.Empty; + + string characterSequence = string.Empty; + int count = characterSet.Length; + int first = characterSet[0]; + int last = first; + + for (int i = 1; i < count; i++) + { + if (characterSet[i - 1] + 1 == characterSet[i]) + { + last = characterSet[i]; + } + else + { + if (first == last) + characterSequence += first + ","; + else + characterSequence += first + "-" + last + ","; + + first = last = characterSet[i]; + } + + } + + // handle the final group + if (first == last) + characterSequence += first; + else + characterSequence += first + "-" + last; + + return characterSequence; + } + + + /// + /// Function which returns a string containing a sequence of Unicode (Hex) character ranges. + /// + /// + /// + public static string GetUnicodeCharacterSequence(int[] characterSet) + { + if (characterSet == null || characterSet.Length == 0) + return string.Empty; + + string characterSequence = string.Empty; + int count = characterSet.Length; + int first = characterSet[0]; + int last = first; + + for (int i = 1; i < count; i++) + { + if (characterSet[i - 1] + 1 == characterSet[i]) + { + last = characterSet[i]; + } + else + { + if (first == last) + characterSequence += first.ToString("X2") + ","; + else + characterSequence += first.ToString("X2") + "-" + last.ToString("X2") + ","; + + first = last = characterSet[i]; + } + + } + + // handle the final group + if (first == last) + characterSequence += first.ToString("X2"); + else + characterSequence += first.ToString("X2") + "-" + last.ToString("X2"); + + return characterSequence; + } + + + /// + /// + /// + /// + /// + /// + public static void DrawBox(Rect rect, float thickness, Color color) + { + EditorGUI.DrawRect(new Rect(rect.x - thickness, rect.y + thickness, rect.width + thickness * 2, thickness), color); + EditorGUI.DrawRect(new Rect(rect.x - thickness, rect.y + thickness, thickness, rect.height - thickness * 2), color); + EditorGUI.DrawRect(new Rect(rect.x - thickness, rect.y + rect.height - thickness * 2, rect.width + thickness * 2, thickness), color); + EditorGUI.DrawRect(new Rect(rect.x + rect.width, rect.y + thickness, thickness, rect.height - thickness * 2), color); + } + + + /// + /// Function to return the horizontal alignment grid value. + /// + /// + /// + public static int GetHorizontalAlignmentGridValue(int value) + { + if ((value & 0x1) == 0x1) + return 0; + else if ((value & 0x2) == 0x2) + return 1; + else if ((value & 0x4) == 0x4) + return 2; + else if ((value & 0x8) == 0x8) + return 3; + else if ((value & 0x10) == 0x10) + return 4; + else if ((value & 0x20) == 0x20) + return 5; + + return 0; + } + + /// + /// Function to return the vertical alignment grid value. + /// + /// + /// + public static int GetVerticalAlignmentGridValue(int value) + { + if ((value & 0x100) == 0x100) + return 0; + if ((value & 0x200) == 0x200) + return 1; + if ((value & 0x400) == 0x400) + return 2; + if ((value & 0x800) == 0x800) + return 3; + if ((value & 0x1000) == 0x1000) + return 4; + if ((value & 0x2000) == 0x2000) + return 5; + + return 0; + } + + public static void DrawColorProperty(Rect rect, SerializedProperty property) + { + int oldIndent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + if (EditorGUIUtility.wideMode) + { + EditorGUI.PropertyField(new Rect(rect.x, rect.y, 50f, rect.height), property, GUIContent.none); + rect.x += 50f; + rect.width = Mathf.Min(100f, rect.width - 55f); + } + else + { + rect.height /= 2f; + rect.width = Mathf.Min(100f, rect.width - 5f); + EditorGUI.PropertyField(rect, property, GUIContent.none); + rect.y += rect.height; + } + + EditorGUI.BeginChangeCheck(); + string colorString = EditorGUI.TextField(rect, string.Format("#{0}", ColorUtility.ToHtmlStringRGBA(property.colorValue))); + if (EditorGUI.EndChangeCheck()) + { + if (ColorUtility.TryParseHtmlString(colorString, out Color color)) + { + property.colorValue = color; + } + } + EditorGUI.indentLevel = oldIndent; + } + + public static bool EditorToggle(Rect position, bool value, GUIContent content, GUIStyle style) + { + var id = GUIUtility.GetControlID(content, FocusType.Keyboard, position); + var evt = Event.current; + + // Toggle selected toggle on space or return key + if (GUIUtility.keyboardControl == id && evt.type == EventType.KeyDown && (evt.keyCode == KeyCode.Space || evt.keyCode == KeyCode.Return || evt.keyCode == KeyCode.KeypadEnter)) + { + value = !value; + evt.Use(); + GUI.changed = true; + } + + if (evt.type == EventType.MouseDown && position.Contains(Event.current.mousePosition)) + { + GUIUtility.keyboardControl = id; + EditorGUIUtility.editingTextField = false; + HandleUtility.Repaint(); + } + + return GUI.Toggle(position, id, value, content, style); + } + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorUtility.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorUtility.cs.meta new file mode 100644 index 00000000..5088b1bd --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_EditorUtility.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2300e75732d74890b38a8ff257a3ae15 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAssetEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAssetEditor.cs new file mode 100644 index 00000000..0e445262 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAssetEditor.cs @@ -0,0 +1,1711 @@ +using UnityEngine; +using UnityEditor; +using UnityEditorInternal; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(TMP_FontWeightPair))] + public class FontWeightDrawer : PropertyDrawer + { + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty prop_regular = property.FindPropertyRelative("regularTypeface"); + SerializedProperty prop_italic = property.FindPropertyRelative("italicTypeface"); + + float width = position.width; + + position.width = EditorGUIUtility.labelWidth; + EditorGUI.LabelField(position, label); + + int oldIndent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + + // NORMAL TYPEFACE + if (label.text[0] == '4') GUI.enabled = false; + position.x += position.width; position.width = (width - position.width) / 2; + EditorGUI.PropertyField(position, prop_regular, GUIContent.none); + + // ITALIC TYPEFACE + GUI.enabled = true; + position.x += position.width; + EditorGUI.PropertyField(position, prop_italic, GUIContent.none); + + EditorGUI.indentLevel = oldIndent; + } + } + + [CustomEditor(typeof(TMP_FontAsset))] + public class TMP_FontAssetEditor : Editor + { + private struct UI_PanelState + { + public static bool faceInfoPanel = true; + public static bool generationSettingsPanel = true; + public static bool fontAtlasInfoPanel = true; + public static bool fontWeightPanel = true; + public static bool fallbackFontAssetPanel = true; + public static bool glyphTablePanel = false; + public static bool characterTablePanel = false; + public static bool fontFeatureTablePanel = false; + } + + private struct AtlasSettings + { + public GlyphRenderMode glyphRenderMode; + public int pointSize; + public int padding; + public int atlasWidth; + public int atlasHeight; + } + + /// + /// Material used to display SDF glyphs in the Character and Glyph tables. + /// + internal static Material internalSDFMaterial + { + get + { + if (s_InternalSDFMaterial == null) + { + Shader shader = Shader.Find("Hidden/TextMeshPro/Internal/Distance Field SSD"); + + if (shader != null) + s_InternalSDFMaterial = new Material(shader); + } + + return s_InternalSDFMaterial; + } + } + static Material s_InternalSDFMaterial; + + /// + /// Material used to display Bitmap glyphs in the Character and Glyph tables. + /// + internal static Material internalBitmapMaterial + { + get + { + if (s_InternalBitmapMaterial == null) + { + Shader shader = Shader.Find("Hidden/Internal-GUITextureClipText"); + + if (shader != null) + s_InternalBitmapMaterial = new Material(shader); + } + + return s_InternalBitmapMaterial; + } + } + static Material s_InternalBitmapMaterial; + + private static string[] s_UiStateLabel = new string[] { "(Click to collapse) ", "(Click to expand) " }; + private GUIContent[] m_AtlasResolutionLabels = { new GUIContent("8"), new GUIContent("16"), new GUIContent("32"), new GUIContent("64"), new GUIContent("128"), new GUIContent("256"), new GUIContent("512"), new GUIContent("1024"), new GUIContent("2048"), new GUIContent("4096"), new GUIContent("8192") }; + private int[] m_AtlasResolutions = { 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 }; + + private struct Warning + { + public bool isEnabled; + public double expirationTime; + } + + private int m_CurrentGlyphPage = 0; + private int m_CurrentCharacterPage = 0; + private int m_CurrentKerningPage = 0; + + private int m_SelectedGlyphRecord = -1; + private int m_SelectedCharacterRecord = -1; + private int m_SelectedAdjustmentRecord = -1; + + private string m_dstGlyphID; + private string m_dstUnicode; + private const string k_placeholderUnicodeHex = "New Unicode (Hex)"; + private string m_unicodeHexLabel = k_placeholderUnicodeHex; + private const string k_placeholderGlyphID = "New Glyph ID"; + private string m_GlyphIDLabel = k_placeholderGlyphID; + + private Warning m_AddGlyphWarning; + private Warning m_AddCharacterWarning; + private bool m_DisplayDestructiveChangeWarning; + private AtlasSettings m_AtlasSettings; + private bool m_MaterialPresetsRequireUpdate; + + private string m_GlyphSearchPattern; + private List m_GlyphSearchList; + + private string m_CharacterSearchPattern; + private List m_CharacterSearchList; + + private string m_KerningTableSearchPattern; + private List m_KerningTableSearchList; + + private bool m_isSearchDirty; + + private const string k_UndoRedo = "UndoRedoPerformed"; + + private SerializedProperty m_AtlasPopulationMode_prop; + private SerializedProperty font_atlas_prop; + private SerializedProperty font_material_prop; + + private SerializedProperty m_AtlasRenderMode_prop; + private SerializedProperty m_SamplingPointSize_prop; + private SerializedProperty m_AtlasPadding_prop; + private SerializedProperty m_AtlasWidth_prop; + private SerializedProperty m_AtlasHeight_prop; + + private SerializedProperty fontWeights_prop; + + //private SerializedProperty fallbackFontAssets_prop; + private ReorderableList m_list; + + private SerializedProperty font_normalStyle_prop; + private SerializedProperty font_normalSpacing_prop; + + private SerializedProperty font_boldStyle_prop; + private SerializedProperty font_boldSpacing_prop; + + private SerializedProperty font_italicStyle_prop; + private SerializedProperty font_tabSize_prop; + + private SerializedProperty m_FaceInfo_prop; + private SerializedProperty m_GlyphTable_prop; + private SerializedProperty m_CharacterTable_prop; + + private TMP_FontFeatureTable m_FontFeatureTable; + private SerializedProperty m_FontFeatureTable_prop; + private SerializedProperty m_GlyphPairAdjustmentRecords_prop; + + private TMP_SerializedPropertyHolder m_SerializedPropertyHolder; + private SerializedProperty m_EmptyGlyphPairAdjustmentRecord_prop; + + private TMP_FontAsset m_fontAsset; + + private Material[] m_materialPresets; + + private bool isAssetDirty = false; + + private int errorCode; + + private System.DateTime timeStamp; + + + public void OnEnable() + { + m_FaceInfo_prop = serializedObject.FindProperty("m_FaceInfo"); + + font_atlas_prop = serializedObject.FindProperty("m_AtlasTextures").GetArrayElementAtIndex(0); + font_material_prop = serializedObject.FindProperty("material"); + + m_AtlasPopulationMode_prop = serializedObject.FindProperty("m_AtlasPopulationMode"); + m_AtlasRenderMode_prop = serializedObject.FindProperty("m_AtlasRenderMode"); + m_SamplingPointSize_prop = m_FaceInfo_prop.FindPropertyRelative("m_PointSize"); + m_AtlasPadding_prop = serializedObject.FindProperty("m_AtlasPadding"); + m_AtlasWidth_prop = serializedObject.FindProperty("m_AtlasWidth"); + m_AtlasHeight_prop = serializedObject.FindProperty("m_AtlasHeight"); + + fontWeights_prop = serializedObject.FindProperty("m_FontWeightTable"); + + m_list = new ReorderableList(serializedObject, serializedObject.FindProperty("m_FallbackFontAssetTable"), true, true, true, true); + + m_list.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => + { + var element = m_list.serializedProperty.GetArrayElementAtIndex(index); + rect.y += 2; + EditorGUI.PropertyField(new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), element, GUIContent.none); + }; + + m_list.drawHeaderCallback = rect => + { + EditorGUI.LabelField(rect, "Fallback List"); + }; + + // Clean up fallback list in the event if contains null elements. + CleanFallbackFontAssetTable(); + + font_normalStyle_prop = serializedObject.FindProperty("normalStyle"); + font_normalSpacing_prop = serializedObject.FindProperty("normalSpacingOffset"); + + font_boldStyle_prop = serializedObject.FindProperty("boldStyle"); + font_boldSpacing_prop = serializedObject.FindProperty("boldSpacing"); + + font_italicStyle_prop = serializedObject.FindProperty("italicStyle"); + font_tabSize_prop = serializedObject.FindProperty("tabSize"); + + m_CharacterTable_prop = serializedObject.FindProperty("m_CharacterTable"); + m_GlyphTable_prop = serializedObject.FindProperty("m_GlyphTable"); + + m_FontFeatureTable_prop = serializedObject.FindProperty("m_FontFeatureTable"); + m_GlyphPairAdjustmentRecords_prop = m_FontFeatureTable_prop.FindPropertyRelative("m_GlyphPairAdjustmentRecords"); + + m_fontAsset = target as TMP_FontAsset; + m_FontFeatureTable = m_fontAsset.fontFeatureTable; + + // Upgrade Font Feature Table if necessary + if (m_fontAsset.m_KerningTable != null && m_fontAsset.m_KerningTable.kerningPairs != null && m_fontAsset.m_KerningTable.kerningPairs.Count > 0) + m_fontAsset.ReadFontAssetDefinition(); + + // Create serialized object to allow us to use a serialized property of an empty kerning pair. + m_SerializedPropertyHolder = CreateInstance(); + m_SerializedPropertyHolder.fontAsset = m_fontAsset; + SerializedObject internalSerializedObject = new SerializedObject(m_SerializedPropertyHolder); + m_EmptyGlyphPairAdjustmentRecord_prop = internalSerializedObject.FindProperty("glyphPairAdjustmentRecord"); + + m_materialPresets = TMP_EditorUtility.FindMaterialReferences(m_fontAsset); + + m_GlyphSearchList = new List(); + m_KerningTableSearchList = new List(); + } + + + public void OnDisable() + { + // Revert changes if user closes or changes selection without having made a choice. + if (m_DisplayDestructiveChangeWarning) + { + m_DisplayDestructiveChangeWarning = false; + RestoreAtlasGenerationSettings(); + GUIUtility.keyboardControl = 0; + + serializedObject.ApplyModifiedProperties(); + } + } + + + public override void OnInspectorGUI() + { + //Debug.Log("OnInspectorGUI Called."); + + Event currentEvent = Event.current; + + serializedObject.Update(); + + Rect rect = EditorGUILayout.GetControlRect(false, 24); + float labelWidth = EditorGUIUtility.labelWidth; + float fieldWidth = EditorGUIUtility.fieldWidth; + + // FACE INFO PANEL + #region Face info + GUI.Label(rect, new GUIContent("Face Info - v" + m_fontAsset.version), TMP_UIStyleManager.sectionHeader); + + rect.x += rect.width - 132f; + rect.y += 2; + rect.width = 130f; + rect.height = 18f; + if (GUI.Button(rect, new GUIContent("Update Atlas Texture"))) + { + TMPro_FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(target as TMP_FontAsset); + } + + EditorGUI.indentLevel = 1; + GUI.enabled = false; // Lock UI + + // TODO : Consider creating a property drawer for these. + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_FamilyName")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_StyleName")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_PointSize")); + + GUI.enabled = true; + + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_Scale")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_LineHeight")); + + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_AscentLine")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_CapLine")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_MeanLine")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_Baseline")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_DescentLine")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_UnderlineOffset")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_UnderlineThickness")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_StrikethroughOffset")); + //EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("strikethroughThickness")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_SuperscriptOffset")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_SuperscriptSize")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_SubscriptOffset")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_SubscriptSize")); + EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_TabWidth")); + // TODO : Add clamping for some of these values. + //subSize_prop.floatValue = Mathf.Clamp(subSize_prop.floatValue, 0.25f, 1f); + + EditorGUILayout.Space(); + #endregion + + // GENERATION SETTINGS + #region Generation Settings + rect = EditorGUILayout.GetControlRect(false, 24); + + if (GUI.Button(rect, new GUIContent("Generation Settings"), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.generationSettingsPanel = !UI_PanelState.generationSettingsPanel; + + GUI.Label(rect, (UI_PanelState.generationSettingsPanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.generationSettingsPanel) + { + EditorGUI.indentLevel = 1; + + EditorGUI.BeginChangeCheck(); + Font sourceFont = (Font)EditorGUILayout.ObjectField("Source Font File", m_fontAsset.m_SourceFontFile_EditorRef, typeof(Font), false); + if (EditorGUI.EndChangeCheck()) + { + string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(sourceFont)); + m_fontAsset.m_SourceFontFileGUID = guid; + m_fontAsset.m_SourceFontFile_EditorRef = sourceFont; + } + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_AtlasPopulationMode_prop, new GUIContent("Atlas Population Mode")); + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + + bool isDatabaseRefreshRequired = false; + + if (m_AtlasPopulationMode_prop.intValue == 0) + { + m_fontAsset.sourceFontFile = null; + + // Set atlas textures to non readable. + //for (int i = 0; i < m_fontAsset.atlasTextures.Length; i++) + //{ + // Texture2D tex = m_fontAsset.atlasTextures[i]; + + // if (tex != null && tex.isReadable) + // { + // string texPath = AssetDatabase.GetAssetPath(tex); + // var texImporter = AssetImporter.GetAtPath(texPath) as TextureImporter; + // if (texImporter != null) + // { + // texImporter.isReadable = false; + // AssetDatabase.ImportAsset(texPath); + // isDatabaseRefreshRequired = true; + // } + // } + //} + + Debug.Log("Atlas Population mode set to [Static]."); + } + else if (m_AtlasPopulationMode_prop.intValue == 1) + { + if (m_fontAsset.m_SourceFontFile_EditorRef.dynamic == false) + { + Debug.LogWarning("Please set the [" + m_fontAsset.name + "] font to dynamic mode as this is required for Dynamic SDF support.", m_fontAsset.m_SourceFontFile_EditorRef); + m_AtlasPopulationMode_prop.intValue = 0; + + serializedObject.ApplyModifiedProperties(); + } + else + { + m_fontAsset.sourceFontFile = m_fontAsset.m_SourceFontFile_EditorRef; + + /* + // Set atlas textures to non readable. + for (int i = 0; i < m_fontAsset.atlasTextures.Length; i++) + { + Texture2D tex = m_fontAsset.atlasTextures[i]; + + if (tex != null && tex.isReadable == false) + { + string texPath = AssetDatabase.GetAssetPath(tex.GetInstanceID()); + Object[] paths = AssetDatabase.LoadAllAssetsAtPath(texPath); + var texImporter = AssetImporter.GetAtPath(texPath) as TextureImporter; + if (texImporter != null) + { + texImporter.isReadable = true; + AssetDatabase.ImportAsset(texPath); + isDatabaseRefreshRequired = true; + } + } + } + */ + Debug.Log("Atlas Population mode set to [Dynamic]."); + } + } + + if (isDatabaseRefreshRequired) + AssetDatabase.Refresh(); + + serializedObject.Update(); + isAssetDirty = true; + } + + GUI.enabled = true; + // Save state of atlas settings + if (m_DisplayDestructiveChangeWarning == false) + { + SavedAtlasGenerationSettings(); + //Undo.RegisterCompleteObjectUndo(m_fontAsset, "Font Asset Changes"); + } + + EditorGUI.BeginChangeCheck(); + // TODO: Switch shaders depending on GlyphRenderMode. + EditorGUILayout.PropertyField(m_AtlasRenderMode_prop); + EditorGUILayout.PropertyField(m_SamplingPointSize_prop, new GUIContent("Sampling Point Size")); + if (EditorGUI.EndChangeCheck()) + { + m_DisplayDestructiveChangeWarning = true; + } + + // Changes to these properties require updating Material Presets for this font asset. + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_AtlasPadding_prop, new GUIContent("Padding")); + EditorGUILayout.IntPopup(m_AtlasWidth_prop, m_AtlasResolutionLabels, m_AtlasResolutions, new GUIContent("Atlas Width")); + EditorGUILayout.IntPopup(m_AtlasHeight_prop, m_AtlasResolutionLabels, m_AtlasResolutions, new GUIContent("Atlas Height")); + if (EditorGUI.EndChangeCheck()) + { + m_MaterialPresetsRequireUpdate = true; + m_DisplayDestructiveChangeWarning = true; + } + + if (m_DisplayDestructiveChangeWarning) + { + // These changes are destructive on the font asset + rect = EditorGUILayout.GetControlRect(false, 60); + rect.x += 15; + rect.width -= 15; + EditorGUI.HelpBox(rect, "Changing these settings will clear the font asset's character, glyph and texture data.", MessageType.Warning); + + if (GUI.Button(new Rect(rect.width - 140, rect.y + 36, 80, 18), new GUIContent("Apply"))) + { + m_DisplayDestructiveChangeWarning = false; + + // Update face info is sampling point size was changed. + if (m_AtlasSettings.pointSize != m_SamplingPointSize_prop.intValue) + { + FontEngine.LoadFontFace(m_fontAsset.sourceFontFile, m_SamplingPointSize_prop.intValue); + m_fontAsset.faceInfo = FontEngine.GetFaceInfo(); + } + + // Update material + m_fontAsset.material.SetFloat(ShaderUtilities.ID_TextureWidth, m_AtlasWidth_prop.intValue); + m_fontAsset.material.SetFloat(ShaderUtilities.ID_TextureHeight, m_AtlasHeight_prop.intValue); + m_fontAsset.material.SetFloat(ShaderUtilities.ID_GradientScale, m_AtlasPadding_prop.intValue + 1); + + // Update material presets if any of the relevant properties have been changed. + if (m_MaterialPresetsRequireUpdate) + { + m_MaterialPresetsRequireUpdate = false; + + Material[] materialPresets = TMP_EditorUtility.FindMaterialReferences(m_fontAsset); + for (int i = 0; i < materialPresets.Length; i++) + { + Material mat = materialPresets[i]; + + mat.SetFloat(ShaderUtilities.ID_TextureWidth, m_AtlasWidth_prop.intValue); + mat.SetFloat(ShaderUtilities.ID_TextureHeight, m_AtlasHeight_prop.intValue); + mat.SetFloat(ShaderUtilities.ID_GradientScale, m_AtlasPadding_prop.intValue + 1); + } + } + + m_fontAsset.ClearFontAssetData(); + GUIUtility.keyboardControl = 0; + isAssetDirty = true; + + // Update Font Asset Creation Settings to reflect new changes. + UpdateFontAssetCreationSettings(); + + // TODO: Clear undo buffers. + //Undo.ClearUndo(m_fontAsset); + } + + if (GUI.Button(new Rect(rect.width - 56, rect.y + 36, 80, 18), new GUIContent("Revert"))) + { + m_DisplayDestructiveChangeWarning = false; + RestoreAtlasGenerationSettings(); + GUIUtility.keyboardControl = 0; + + // TODO: Clear undo buffers. + //Undo.ClearUndo(m_fontAsset); + } + } + EditorGUILayout.Space(); + } + #endregion + + // ATLAS & MATERIAL PANEL + #region Atlas & Material + rect = EditorGUILayout.GetControlRect(false, 24); + + if (GUI.Button(rect, new GUIContent("Atlas & Material"), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.fontAtlasInfoPanel = !UI_PanelState.fontAtlasInfoPanel; + + GUI.Label(rect, (UI_PanelState.fontAtlasInfoPanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.fontAtlasInfoPanel) + { + EditorGUI.indentLevel = 1; + + GUI.enabled = false; + EditorGUILayout.PropertyField(font_atlas_prop, new GUIContent("Font Atlas")); + EditorGUILayout.PropertyField(font_material_prop, new GUIContent("Font Material")); + GUI.enabled = true; + EditorGUILayout.Space(); + } + #endregion + + string evt_cmd = Event.current.commandName; // Get Current Event CommandName to check for Undo Events + + // FONT WEIGHT PANEL + #region Font Weights + rect = EditorGUILayout.GetControlRect(false, 24); + + if (GUI.Button(rect, new GUIContent("Font Weights", "The Font Assets that will be used for different font weights and the settings used to simulate a typeface when no asset is available."), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.fontWeightPanel = !UI_PanelState.fontWeightPanel; + + GUI.Label(rect, (UI_PanelState.fontWeightPanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.fontWeightPanel) + { + EditorGUIUtility.labelWidth *= 0.75f; + EditorGUIUtility.fieldWidth *= 0.25f; + + EditorGUILayout.BeginVertical(); + EditorGUI.indentLevel = 1; + rect = EditorGUILayout.GetControlRect(true); + rect.x += EditorGUIUtility.labelWidth; + rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; + GUI.Label(rect, "Regular Tyepface", EditorStyles.label); + rect.x += rect.width; + GUI.Label(rect, "Italic Typeface", EditorStyles.label); + + EditorGUI.indentLevel = 1; + + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(1), new GUIContent("100 - Thin")); + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(2), new GUIContent("200 - Extra-Light")); + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(3), new GUIContent("300 - Light")); + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(4), new GUIContent("400 - Regular")); + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(5), new GUIContent("500 - Medium")); + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(6), new GUIContent("600 - Semi-Bold")); + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(7), new GUIContent("700 - Bold")); + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(8), new GUIContent("800 - Heavy")); + EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(9), new GUIContent("900 - Black")); + + EditorGUILayout.EndVertical(); + + EditorGUILayout.Space(); + + EditorGUILayout.BeginVertical(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(font_normalStyle_prop, new GUIContent("Normal Weight")); + font_normalStyle_prop.floatValue = Mathf.Clamp(font_normalStyle_prop.floatValue, -3.0f, 3.0f); + if (GUI.changed || evt_cmd == k_UndoRedo) + { + GUI.changed = false; + + // Modify the material property on matching material presets. + for (int i = 0; i < m_materialPresets.Length; i++) + m_materialPresets[i].SetFloat("_WeightNormal", font_normalStyle_prop.floatValue); + } + + EditorGUILayout.PropertyField(font_boldStyle_prop, new GUIContent("Bold Weight")); + font_boldStyle_prop.floatValue = Mathf.Clamp(font_boldStyle_prop.floatValue, -3.0f, 3.0f); + if (GUI.changed || evt_cmd == k_UndoRedo) + { + GUI.changed = false; + + // Modify the material property on matching material presets. + for (int i = 0; i < m_materialPresets.Length; i++) + m_materialPresets[i].SetFloat("_WeightBold", font_boldStyle_prop.floatValue); + } + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(font_normalSpacing_prop, new GUIContent("Spacing Offset")); + font_normalSpacing_prop.floatValue = Mathf.Clamp(font_normalSpacing_prop.floatValue, -100, 100); + if (GUI.changed || evt_cmd == k_UndoRedo) + { + GUI.changed = false; + } + + EditorGUILayout.PropertyField(font_boldSpacing_prop, new GUIContent("Bold Spacing")); + font_boldSpacing_prop.floatValue = Mathf.Clamp(font_boldSpacing_prop.floatValue, 0, 100); + if (GUI.changed || evt_cmd == k_UndoRedo) + { + GUI.changed = false; + } + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(font_italicStyle_prop, new GUIContent("Italic Style")); + font_italicStyle_prop.intValue = Mathf.Clamp(font_italicStyle_prop.intValue, 15, 60); + + EditorGUILayout.PropertyField(font_tabSize_prop, new GUIContent("Tab Multiple")); + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + EditorGUILayout.Space(); + } + + EditorGUIUtility.labelWidth = 0; + EditorGUIUtility.fieldWidth = 0; + #endregion + + // FALLBACK FONT ASSETS + #region Fallback Font Asset + rect = EditorGUILayout.GetControlRect(false, 24); + EditorGUI.indentLevel = 0; + if (GUI.Button(rect, new GUIContent("Fallback Font Assets", "Select the Font Assets that will be searched and used as fallback when characters are missing from this font asset."), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.fallbackFontAssetPanel = !UI_PanelState.fallbackFontAssetPanel; + + GUI.Label(rect, (UI_PanelState.fallbackFontAssetPanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.fallbackFontAssetPanel) + { + EditorGUIUtility.labelWidth = 120; + EditorGUI.indentLevel = 0; + + m_list.DoLayoutList(); + EditorGUILayout.Space(); + } + #endregion + + // CHARACTER TABLE TABLE + #region Character Table + EditorGUIUtility.labelWidth = labelWidth; + EditorGUIUtility.fieldWidth = fieldWidth; + EditorGUI.indentLevel = 0; + rect = EditorGUILayout.GetControlRect(false, 24); + + if (GUI.Button(rect, new GUIContent("Character Table", "List of characters contained in this font asset."), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.characterTablePanel = !UI_PanelState.characterTablePanel; + + GUI.Label(rect, (UI_PanelState.characterTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.characterTablePanel) + { + int arraySize = m_CharacterTable_prop.arraySize; + int itemsPerPage = 15; + + // Display Glyph Management Tools + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + { + // Search Bar implementation + #region DISPLAY SEARCH BAR + EditorGUILayout.BeginHorizontal(); + { + EditorGUIUtility.labelWidth = 130f; + EditorGUI.BeginChangeCheck(); + string searchPattern = EditorGUILayout.TextField("Character Search", m_CharacterSearchPattern, "SearchTextField"); + if (EditorGUI.EndChangeCheck() || m_isSearchDirty) + { + if (string.IsNullOrEmpty(searchPattern) == false) + { + m_CharacterSearchPattern = searchPattern; + + // Search Character Table for potential matches + SearchCharacterTable (m_CharacterSearchPattern, ref m_CharacterSearchList); + } + else + m_CharacterSearchPattern = null; + + m_isSearchDirty = false; + } + + string styleName = string.IsNullOrEmpty(m_CharacterSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; + if (GUILayout.Button(GUIContent.none, styleName)) + { + GUIUtility.keyboardControl = 0; + m_CharacterSearchPattern = string.Empty; + } + } + EditorGUILayout.EndHorizontal(); + #endregion + + // Display Page Navigation + if (!string.IsNullOrEmpty(m_CharacterSearchPattern)) + arraySize = m_CharacterSearchList.Count; + + DisplayPageNavigation(ref m_CurrentCharacterPage, arraySize, itemsPerPage); + } + EditorGUILayout.EndVertical(); + + // Display Character Table Elements + if (arraySize > 0) + { + // Display each character entry using the CharacterPropertyDrawer. + for (int i = itemsPerPage * m_CurrentCharacterPage; i < arraySize && i < itemsPerPage * (m_CurrentCharacterPage + 1); i++) + { + // Define the start of the selection region of the element. + Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + int elementIndex = i; + if (!string.IsNullOrEmpty(m_CharacterSearchPattern)) + elementIndex = m_CharacterSearchList[i]; + + SerializedProperty characterProperty = m_CharacterTable_prop.GetArrayElementAtIndex(elementIndex); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + EditorGUI.BeginDisabledGroup(i != m_SelectedCharacterRecord); + { + EditorGUILayout.PropertyField(characterProperty); + } + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.EndVertical(); + + // Define the end of the selection region of the element. + Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + // Check for Item selection + Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); + if (DoSelectionCheck(selectionArea)) + { + if (m_SelectedCharacterRecord == i) + m_SelectedCharacterRecord = -1; + else + { + m_SelectedCharacterRecord = i; + m_AddCharacterWarning.isEnabled = false; + m_unicodeHexLabel = k_placeholderUnicodeHex; + GUIUtility.keyboardControl = 0; + } + } + + // Draw Selection Highlight and Glyph Options + if (m_SelectedCharacterRecord == i) + { + TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); + + // Draw Glyph management options + Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); + float optionAreaWidth = controlRect.width * 0.6f; + float btnWidth = optionAreaWidth / 3; + + Rect position = new Rect(controlRect.x + controlRect.width * .4f, controlRect.y, btnWidth, controlRect.height); + + // Copy Selected Glyph to Target Glyph ID + GUI.enabled = !string.IsNullOrEmpty(m_dstUnicode); + if (GUI.Button(position, new GUIContent("Copy to"))) + { + GUIUtility.keyboardControl = 0; + + // Convert Hex Value to Decimal + int dstGlyphID = TMP_TextUtilities.StringHexToInt(m_dstUnicode); + + //Add new glyph at target Unicode hex id. + if (!AddNewCharacter(elementIndex, dstGlyphID)) + { + m_AddCharacterWarning.isEnabled = true; + m_AddCharacterWarning.expirationTime = EditorApplication.timeSinceStartup + 1; + } + + m_dstUnicode = string.Empty; + m_isSearchDirty = true; + + TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, m_fontAsset); + } + + // Target Glyph ID + GUI.enabled = true; + position.x += btnWidth; + + GUI.SetNextControlName("CharacterID_Input"); + m_dstUnicode = EditorGUI.TextField(position, m_dstUnicode); + + // Placeholder text + EditorGUI.LabelField(position, new GUIContent(m_unicodeHexLabel, "The Unicode (Hex) ID of the duplicated Character"), TMP_UIStyleManager.label); + + // Only filter the input when the destination glyph ID text field has focus. + if (GUI.GetNameOfFocusedControl() == "CharacterID_Input") + { + m_unicodeHexLabel = string.Empty; + + //Filter out unwanted characters. + char chr = Event.current.character; + if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F')) + { + Event.current.character = '\0'; + } + } + else + { + m_unicodeHexLabel = k_placeholderUnicodeHex; + //m_dstUnicode = string.Empty; + } + + + // Remove Glyph + position.x += btnWidth; + if (GUI.Button(position, "Remove")) + { + GUIUtility.keyboardControl = 0; + + RemoveCharacterFromList(elementIndex); + + isAssetDirty = true; + m_SelectedCharacterRecord = -1; + m_isSearchDirty = true; + break; + } + + if (m_AddCharacterWarning.isEnabled && EditorApplication.timeSinceStartup < m_AddCharacterWarning.expirationTime) + { + EditorGUILayout.HelpBox("The Destination Character ID already exists", MessageType.Warning); + } + + } + } + } + + DisplayPageNavigation(ref m_CurrentCharacterPage, arraySize, itemsPerPage); + + EditorGUILayout.Space(); + } + #endregion + + // GLYPH TABLE + #region Glyph Table + EditorGUIUtility.labelWidth = labelWidth; + EditorGUIUtility.fieldWidth = fieldWidth; + EditorGUI.indentLevel = 0; + rect = EditorGUILayout.GetControlRect(false, 24); + + GUIStyle glyphPanelStyle = new GUIStyle(EditorStyles.helpBox); + + if (GUI.Button(rect, new GUIContent("Glyph Table", "List of glyphs contained in this font asset."), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.glyphTablePanel = !UI_PanelState.glyphTablePanel; + + GUI.Label(rect, (UI_PanelState.glyphTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.glyphTablePanel) + { + int arraySize = m_GlyphTable_prop.arraySize; + int itemsPerPage = 15; + + // Display Glyph Management Tools + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + { + // Search Bar implementation + #region DISPLAY SEARCH BAR + EditorGUILayout.BeginHorizontal(); + { + EditorGUIUtility.labelWidth = 130f; + EditorGUI.BeginChangeCheck(); + string searchPattern = EditorGUILayout.TextField("Glyph Search", m_GlyphSearchPattern, "SearchTextField"); + if (EditorGUI.EndChangeCheck() || m_isSearchDirty) + { + if (string.IsNullOrEmpty(searchPattern) == false) + { + m_GlyphSearchPattern = searchPattern; + + // Search Glyph Table for potential matches + SearchGlyphTable(m_GlyphSearchPattern, ref m_GlyphSearchList); + } + else + m_GlyphSearchPattern = null; + + m_isSearchDirty = false; + } + + string styleName = string.IsNullOrEmpty(m_GlyphSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; + if (GUILayout.Button(GUIContent.none, styleName)) + { + GUIUtility.keyboardControl = 0; + m_GlyphSearchPattern = string.Empty; + } + } + EditorGUILayout.EndHorizontal(); + #endregion + + // Display Page Navigation + if (!string.IsNullOrEmpty(m_GlyphSearchPattern)) + arraySize = m_GlyphSearchList.Count; + + DisplayPageNavigation(ref m_CurrentGlyphPage, arraySize, itemsPerPage); + } + EditorGUILayout.EndVertical(); + + // Display Glyph Table Elements + + if (arraySize > 0) + { + // Display each GlyphInfo entry using the GlyphInfo property drawer. + for (int i = itemsPerPage * m_CurrentGlyphPage; i < arraySize && i < itemsPerPage * (m_CurrentGlyphPage + 1); i++) + { + // Define the start of the selection region of the element. + Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + int elementIndex = i; + if (!string.IsNullOrEmpty(m_GlyphSearchPattern)) + elementIndex = m_GlyphSearchList[i]; + + SerializedProperty glyphProperty = m_GlyphTable_prop.GetArrayElementAtIndex(elementIndex); + + EditorGUILayout.BeginVertical(glyphPanelStyle); + + using (new EditorGUI.DisabledScope(i != m_SelectedGlyphRecord)) + { + EditorGUILayout.PropertyField(glyphProperty); + } + + EditorGUILayout.EndVertical(); + + // Define the end of the selection region of the element. + Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + // Check for Item selection + Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); + if (DoSelectionCheck(selectionArea)) + { + if (m_SelectedGlyphRecord == i) + m_SelectedGlyphRecord = -1; + else + { + m_SelectedGlyphRecord = i; + m_AddGlyphWarning.isEnabled = false; + m_unicodeHexLabel = k_placeholderUnicodeHex; + GUIUtility.keyboardControl = 0; + } + } + + // Draw Selection Highlight and Glyph Options + if (m_SelectedGlyphRecord == i) + { + TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); + + // Draw Glyph management options + Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); + float optionAreaWidth = controlRect.width * 0.6f; + float btnWidth = optionAreaWidth / 3; + + Rect position = new Rect(controlRect.x + controlRect.width * .4f, controlRect.y, btnWidth, controlRect.height); + + // Copy Selected Glyph to Target Glyph ID + GUI.enabled = !string.IsNullOrEmpty(m_dstGlyphID); + if (GUI.Button(position, new GUIContent("Copy to"))) + { + GUIUtility.keyboardControl = 0; + + // Convert Hex Value to Decimal + int.TryParse(m_dstGlyphID, out int dstGlyphID); + + //Add new glyph at target Unicode hex id. + if (!AddNewGlyph(elementIndex, dstGlyphID)) + { + m_AddGlyphWarning.isEnabled = true; + m_AddGlyphWarning.expirationTime = EditorApplication.timeSinceStartup + 1; + } + + m_dstGlyphID = string.Empty; + m_isSearchDirty = true; + + TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, m_fontAsset); + } + + // Target Glyph ID + GUI.enabled = true; + position.x += btnWidth; + + GUI.SetNextControlName("GlyphID_Input"); + m_dstGlyphID = EditorGUI.TextField(position, m_dstGlyphID); + + // Placeholder text + EditorGUI.LabelField(position, new GUIContent(m_GlyphIDLabel, "The Glyph ID of the duplicated Glyph"), TMP_UIStyleManager.label); + + // Only filter the input when the destination glyph ID text field has focus. + if (GUI.GetNameOfFocusedControl() == "GlyphID_Input") + { + m_GlyphIDLabel = string.Empty; + + //Filter out unwanted characters. + char chr = Event.current.character; + if ((chr < '0' || chr > '9')) + { + Event.current.character = '\0'; + } + } + else + { + m_GlyphIDLabel = k_placeholderGlyphID; + //m_dstGlyphID = string.Empty; + } + + // Remove Glyph + position.x += btnWidth; + if (GUI.Button(position, "Remove")) + { + GUIUtility.keyboardControl = 0; + + RemoveGlyphFromList(elementIndex); + + isAssetDirty = true; + m_SelectedGlyphRecord = -1; + m_isSearchDirty = true; + break; + } + + if (m_AddGlyphWarning.isEnabled && EditorApplication.timeSinceStartup < m_AddGlyphWarning.expirationTime) + { + EditorGUILayout.HelpBox("The Destination Glyph ID already exists", MessageType.Warning); + } + + } + } + } + + DisplayPageNavigation(ref m_CurrentGlyphPage, arraySize, itemsPerPage); + + EditorGUILayout.Space(); + } + #endregion + + // FONT FEATURE TABLE + #region Font Feature Table + EditorGUIUtility.labelWidth = labelWidth; + EditorGUIUtility.fieldWidth = fieldWidth; + EditorGUI.indentLevel = 0; + rect = EditorGUILayout.GetControlRect(false, 24); + + if (GUI.Button(rect, new GUIContent("Glyph Adjustment Table", "List of glyph adjustment / advanced kerning pairs."), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.fontFeatureTablePanel = !UI_PanelState.fontFeatureTablePanel; + + GUI.Label(rect, (UI_PanelState.fontFeatureTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.fontFeatureTablePanel) + { + int arraySize = m_GlyphPairAdjustmentRecords_prop.arraySize; + int itemsPerPage = 20; + + // Display Kerning Pair Management Tools + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + { + // Search Bar implementation + #region DISPLAY SEARCH BAR + EditorGUILayout.BeginHorizontal(); + { + EditorGUIUtility.labelWidth = 150f; + EditorGUI.BeginChangeCheck(); + string searchPattern = EditorGUILayout.TextField("Adjustment Pair Search", m_KerningTableSearchPattern, "SearchTextField"); + if (EditorGUI.EndChangeCheck() || m_isSearchDirty) + { + if (string.IsNullOrEmpty(searchPattern) == false) + { + m_KerningTableSearchPattern = searchPattern; + + // Search Glyph Table for potential matches + SearchKerningTable(m_KerningTableSearchPattern, ref m_KerningTableSearchList); + } + else + m_KerningTableSearchPattern = null; + + m_isSearchDirty = false; + } + + string styleName = string.IsNullOrEmpty(m_KerningTableSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; + if (GUILayout.Button(GUIContent.none, styleName)) + { + GUIUtility.keyboardControl = 0; + m_KerningTableSearchPattern = string.Empty; + } + } + EditorGUILayout.EndHorizontal(); + #endregion + + // Display Page Navigation + if (!string.IsNullOrEmpty(m_KerningTableSearchPattern)) + arraySize = m_KerningTableSearchList.Count; + + DisplayPageNavigation(ref m_CurrentKerningPage, arraySize, itemsPerPage); + } + EditorGUILayout.EndVertical(); + + if (arraySize > 0) + { + // Display each GlyphInfo entry using the GlyphInfo property drawer. + for (int i = itemsPerPage * m_CurrentKerningPage; i < arraySize && i < itemsPerPage * (m_CurrentKerningPage + 1); i++) + { + // Define the start of the selection region of the element. + Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + int elementIndex = i; + if (!string.IsNullOrEmpty(m_KerningTableSearchPattern)) + elementIndex = m_KerningTableSearchList[i]; + + SerializedProperty pairAdjustmentRecordProperty = m_GlyphPairAdjustmentRecords_prop.GetArrayElementAtIndex(elementIndex); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + using (new EditorGUI.DisabledScope(i != m_SelectedAdjustmentRecord)) + { + EditorGUILayout.PropertyField(pairAdjustmentRecordProperty, new GUIContent("Selectable")); + } + + EditorGUILayout.EndVertical(); + + // Define the end of the selection region of the element. + Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + // Check for Item selection + Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); + if (DoSelectionCheck(selectionArea)) + { + if (m_SelectedAdjustmentRecord == i) + { + m_SelectedAdjustmentRecord = -1; + } + else + { + m_SelectedAdjustmentRecord = i; + GUIUtility.keyboardControl = 0; + } + } + + // Draw Selection Highlight and Kerning Pair Options + if (m_SelectedAdjustmentRecord == i) + { + TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); + + // Draw Glyph management options + Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); + float optionAreaWidth = controlRect.width; + float btnWidth = optionAreaWidth / 4; + + Rect position = new Rect(controlRect.x + controlRect.width - btnWidth, controlRect.y, btnWidth, controlRect.height); + + // Remove Kerning pair + GUI.enabled = true; + if (GUI.Button(position, "Remove")) + { + GUIUtility.keyboardControl = 0; + + RemoveAdjustmentPairFromList(i); + + isAssetDirty = true; + m_SelectedAdjustmentRecord = -1; + m_isSearchDirty = true; + break; + } + } + } + } + + DisplayPageNavigation(ref m_CurrentKerningPage, arraySize, itemsPerPage); + + GUILayout.Space(5); + + // Add new kerning pair + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + { + EditorGUILayout.PropertyField(m_EmptyGlyphPairAdjustmentRecord_prop); + } + EditorGUILayout.EndVertical(); + + if (GUILayout.Button("Add New Glyph Adjustment Record")) + { + SerializedProperty firstAdjustmentRecordProperty = m_EmptyGlyphPairAdjustmentRecord_prop.FindPropertyRelative("m_FirstAdjustmentRecord"); + SerializedProperty secondAdjustmentRecordProperty = m_EmptyGlyphPairAdjustmentRecord_prop.FindPropertyRelative("m_SecondAdjustmentRecord"); + + uint firstGlyphIndex = (uint)firstAdjustmentRecordProperty.FindPropertyRelative("m_GlyphIndex").intValue; + uint secondGlyphIndex = (uint)secondAdjustmentRecordProperty.FindPropertyRelative("m_GlyphIndex").intValue; + + TMP_GlyphValueRecord firstValueRecord = GetValueRecord(firstAdjustmentRecordProperty.FindPropertyRelative("m_GlyphValueRecord")); + TMP_GlyphValueRecord secondValueRecord = GetValueRecord(secondAdjustmentRecordProperty.FindPropertyRelative("m_GlyphValueRecord")); + + errorCode = -1; + long pairKey = (long)secondGlyphIndex << 32 | firstGlyphIndex; + if (m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.ContainsKey(pairKey) == false) + { + TMP_GlyphPairAdjustmentRecord adjustmentRecord = new TMP_GlyphPairAdjustmentRecord(new TMP_GlyphAdjustmentRecord(firstGlyphIndex, firstValueRecord), new TMP_GlyphAdjustmentRecord(secondGlyphIndex, secondValueRecord)); + m_FontFeatureTable.m_GlyphPairAdjustmentRecords.Add(adjustmentRecord); + m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.Add(pairKey, adjustmentRecord); + errorCode = 0; + } + + // Add glyphs and characters + uint firstCharacter = m_SerializedPropertyHolder.firstCharacter; + if (!m_fontAsset.characterLookupTable.ContainsKey(firstCharacter)) + m_fontAsset.TryAddCharacterInternal(firstCharacter, out TMP_Character character); + + uint secondCharacter = m_SerializedPropertyHolder.secondCharacter; + if (!m_fontAsset.characterLookupTable.ContainsKey(secondCharacter)) + m_fontAsset.TryAddCharacterInternal(secondCharacter, out TMP_Character character); + + // Sort Kerning Pairs & Reload Font Asset if new kerning pair was added. + if (errorCode != -1) + { + m_FontFeatureTable.SortGlyphPairAdjustmentRecords(); + serializedObject.ApplyModifiedProperties(); + isAssetDirty = true; + m_isSearchDirty = true; + } + else + { + timeStamp = System.DateTime.Now.AddSeconds(5); + } + + // Clear Add Kerning Pair Panel + // TODO + } + + if (errorCode == -1) + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUILayout.Label("Kerning Pair already exists!", TMP_UIStyleManager.label); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + + if (System.DateTime.Now > timeStamp) + errorCode = 0; + } + } + #endregion + + if (serializedObject.ApplyModifiedProperties() || evt_cmd == k_UndoRedo || isAssetDirty) + { + // Delay callback until user has decided to Apply or Revert the changes. + if (m_DisplayDestructiveChangeWarning == false) + TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, m_fontAsset); + + if (m_fontAsset.m_IsFontAssetLookupTablesDirty || evt_cmd == k_UndoRedo) + m_fontAsset.ReadFontAssetDefinition(); + + isAssetDirty = false; + EditorUtility.SetDirty(target); + } + + + // Clear selection if mouse event was not consumed. + GUI.enabled = true; + if (currentEvent.type == EventType.MouseDown && currentEvent.button == 0) + m_SelectedAdjustmentRecord = -1; + + } + + void CleanFallbackFontAssetTable() + { + SerializedProperty m_FallbackFontAsseTable = serializedObject.FindProperty("m_FallbackFontAssetTable"); + + bool isListDirty = false; + + int elementCount = m_FallbackFontAsseTable.arraySize; + + for (int i = 0; i < elementCount; i++) + { + SerializedProperty element = m_FallbackFontAsseTable.GetArrayElementAtIndex(i); + if (element.objectReferenceValue == null) + { + m_FallbackFontAsseTable.DeleteArrayElementAtIndex(i); + elementCount -= 1; + i -= 1; + + isListDirty = true; + } + } + + if (isListDirty) + { + serializedObject.ApplyModifiedProperties(); + serializedObject.Update(); + } + } + + void SavedAtlasGenerationSettings() + { + m_AtlasSettings.glyphRenderMode = (GlyphRenderMode)m_AtlasRenderMode_prop.intValue; + m_AtlasSettings.pointSize = m_SamplingPointSize_prop.intValue; + m_AtlasSettings.padding = m_AtlasPadding_prop.intValue; + m_AtlasSettings.atlasWidth = m_AtlasWidth_prop.intValue; + m_AtlasSettings.atlasHeight = m_AtlasHeight_prop.intValue; + } + + void RestoreAtlasGenerationSettings() + { + m_AtlasRenderMode_prop.intValue = (int)m_AtlasSettings.glyphRenderMode; + m_SamplingPointSize_prop.intValue = m_AtlasSettings.pointSize; + m_AtlasPadding_prop.intValue = m_AtlasSettings.padding; + m_AtlasWidth_prop.intValue = m_AtlasSettings.atlasWidth; + m_AtlasHeight_prop.intValue = m_AtlasSettings.atlasHeight; + } + + + void UpdateFontAssetCreationSettings() + { + m_fontAsset.m_CreationSettings.pointSize = m_SamplingPointSize_prop.intValue; + m_fontAsset.m_CreationSettings.renderMode = m_AtlasRenderMode_prop.intValue; + m_fontAsset.m_CreationSettings.padding = m_AtlasPadding_prop.intValue; + m_fontAsset.m_CreationSettings.atlasWidth = m_AtlasWidth_prop.intValue; + m_fontAsset.m_CreationSettings.atlasHeight = m_AtlasHeight_prop.intValue; + } + + + void UpdateCharacterData(SerializedProperty property, int index) + { + TMP_Character character = m_fontAsset.characterTable[index]; + + character.unicode = (uint)property.FindPropertyRelative("m_Unicode").intValue; + character.scale = property.FindPropertyRelative("m_Scale").floatValue; + + SerializedProperty glyphProperty = property.FindPropertyRelative("m_Glyph"); + character.glyph.index = (uint)glyphProperty.FindPropertyRelative("m_Index").intValue; + + SerializedProperty glyphRectProperty = glyphProperty.FindPropertyRelative("m_GlyphRect"); + character.glyph.glyphRect = new GlyphRect(glyphRectProperty.FindPropertyRelative("m_X").intValue, glyphRectProperty.FindPropertyRelative("m_Y").intValue, glyphRectProperty.FindPropertyRelative("m_Width").intValue, glyphRectProperty.FindPropertyRelative("m_Height").intValue); + + SerializedProperty glyphMetricsProperty = glyphProperty.FindPropertyRelative("m_Metrics"); + character.glyph.metrics = new GlyphMetrics(glyphMetricsProperty.FindPropertyRelative("m_Width").floatValue, glyphMetricsProperty.FindPropertyRelative("m_Height").floatValue, glyphMetricsProperty.FindPropertyRelative("m_HorizontalBearingX").floatValue, glyphMetricsProperty.FindPropertyRelative("m_HorizontalBearingY").floatValue, glyphMetricsProperty.FindPropertyRelative("m_HorizontalAdvance").floatValue); + + character.glyph.scale = glyphProperty.FindPropertyRelative("m_Scale").floatValue; + + character.glyph.atlasIndex = glyphProperty.FindPropertyRelative("m_AtlasIndex").intValue; + } + + + void UpdateGlyphData(SerializedProperty property, int index) + { + Glyph glyph = m_fontAsset.glyphTable[index]; + + glyph.index = (uint)property.FindPropertyRelative("m_Index").intValue; + + SerializedProperty glyphRect = property.FindPropertyRelative("m_GlyphRect"); + glyph.glyphRect = new GlyphRect(glyphRect.FindPropertyRelative("m_X").intValue, glyphRect.FindPropertyRelative("m_Y").intValue, glyphRect.FindPropertyRelative("m_Width").intValue, glyphRect.FindPropertyRelative("m_Height").intValue); + + SerializedProperty glyphMetrics = property.FindPropertyRelative("m_Metrics"); + glyph.metrics = new GlyphMetrics(glyphMetrics.FindPropertyRelative("m_Width").floatValue, glyphMetrics.FindPropertyRelative("m_Height").floatValue, glyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue, glyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue, glyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue); + + glyph.scale = property.FindPropertyRelative("m_Scale").floatValue; + } + + + void DisplayPageNavigation(ref int currentPage, int arraySize, int itemsPerPage) + { + Rect pagePos = EditorGUILayout.GetControlRect(false, 20); + pagePos.width /= 3; + + int shiftMultiplier = Event.current.shift ? 10 : 1; // Page + Shift goes 10 page forward + + // Previous Page + GUI.enabled = currentPage > 0; + + if (GUI.Button(pagePos, "Previous Page")) + currentPage -= 1 * shiftMultiplier; + + + // Page Counter + GUI.enabled = true; + pagePos.x += pagePos.width; + int totalPages = (int)(arraySize / (float)itemsPerPage + 0.999f); + GUI.Label(pagePos, "Page " + (currentPage + 1) + " / " + totalPages, TMP_UIStyleManager.centeredLabel); + + // Next Page + pagePos.x += pagePos.width; + GUI.enabled = itemsPerPage * (currentPage + 1) < arraySize; + + if (GUI.Button(pagePos, "Next Page")) + currentPage += 1 * shiftMultiplier; + + // Clamp page range + currentPage = Mathf.Clamp(currentPage, 0, arraySize / itemsPerPage); + + GUI.enabled = true; + } + + + /// + /// + /// + /// + /// + bool AddNewGlyph(int srcIndex, int dstGlyphID) + { + // Make sure Destination Glyph ID doesn't already contain a Glyph + if (m_fontAsset.glyphLookupTable.ContainsKey((uint)dstGlyphID)) + return false; + + // Add new element to glyph list. + m_GlyphTable_prop.arraySize += 1; + + // Get a reference to the source glyph. + SerializedProperty sourceGlyph = m_GlyphTable_prop.GetArrayElementAtIndex(srcIndex); + + int dstIndex = m_GlyphTable_prop.arraySize - 1; + + // Get a reference to the target / destination glyph. + SerializedProperty targetGlyph = m_GlyphTable_prop.GetArrayElementAtIndex(dstIndex); + + CopyGlyphSerializedProperty(sourceGlyph, ref targetGlyph); + + // Update the ID of the glyph + targetGlyph.FindPropertyRelative("m_Index").intValue = dstGlyphID; + + serializedObject.ApplyModifiedProperties(); + + m_fontAsset.SortGlyphTable(); + + m_fontAsset.ReadFontAssetDefinition(); + + return true; + } + + /// + /// + /// + /// + void RemoveGlyphFromList(int index) + { + if (index > m_GlyphTable_prop.arraySize) + return; + + int targetGlyphIndex = m_GlyphTable_prop.GetArrayElementAtIndex(index).FindPropertyRelative("m_Index").intValue; + + m_GlyphTable_prop.DeleteArrayElementAtIndex(index); + + // Remove all characters referencing this glyph. + for (int i = 0; i < m_CharacterTable_prop.arraySize; i++) + { + int glyphIndex = m_CharacterTable_prop.GetArrayElementAtIndex(i).FindPropertyRelative("m_GlyphIndex").intValue; + + if (glyphIndex == targetGlyphIndex) + { + // Remove character + m_CharacterTable_prop.DeleteArrayElementAtIndex(i); + } + } + + serializedObject.ApplyModifiedProperties(); + + m_fontAsset.ReadFontAssetDefinition(); + } + + bool AddNewCharacter(int srcIndex, int dstGlyphID) + { + // Make sure Destination Glyph ID doesn't already contain a Glyph + if (m_fontAsset.characterLookupTable.ContainsKey((uint)dstGlyphID)) + return false; + + // Add new element to glyph list. + m_CharacterTable_prop.arraySize += 1; + + // Get a reference to the source glyph. + SerializedProperty sourceCharacter = m_CharacterTable_prop.GetArrayElementAtIndex(srcIndex); + + int dstIndex = m_CharacterTable_prop.arraySize - 1; + + // Get a reference to the target / destination glyph. + SerializedProperty targetCharacter = m_CharacterTable_prop.GetArrayElementAtIndex(dstIndex); + + CopyCharacterSerializedProperty(sourceCharacter, ref targetCharacter); + + // Update the ID of the glyph + targetCharacter.FindPropertyRelative("m_Unicode").intValue = dstGlyphID; + + serializedObject.ApplyModifiedProperties(); + + m_fontAsset.SortCharacterTable(); + + m_fontAsset.ReadFontAssetDefinition(); + + return true; + } + + void RemoveCharacterFromList(int index) + { + if (index > m_CharacterTable_prop.arraySize) + return; + + m_CharacterTable_prop.DeleteArrayElementAtIndex(index); + + serializedObject.ApplyModifiedProperties(); + + m_fontAsset.ReadFontAssetDefinition(); + } + + + // Check if any of the Style elements were clicked on. + private bool DoSelectionCheck(Rect selectionArea) + { + Event currentEvent = Event.current; + + switch (currentEvent.type) + { + case EventType.MouseDown: + if (selectionArea.Contains(currentEvent.mousePosition) && currentEvent.button == 0) + { + currentEvent.Use(); + return true; + } + + break; + } + + return false; + } + + TMP_GlyphValueRecord GetValueRecord(SerializedProperty property) + { + TMP_GlyphValueRecord record = new TMP_GlyphValueRecord(); + record.xPlacement = property.FindPropertyRelative("m_XPlacement").floatValue; + record.yPlacement = property.FindPropertyRelative("m_YPlacement").floatValue; + record.xAdvance = property.FindPropertyRelative("m_XAdvance").floatValue; + record.yAdvance = property.FindPropertyRelative("m_YAdvance").floatValue; + + return record; + } + + void RemoveAdjustmentPairFromList(int index) + { + if (index > m_GlyphPairAdjustmentRecords_prop.arraySize) + return; + + m_GlyphPairAdjustmentRecords_prop.DeleteArrayElementAtIndex(index); + + serializedObject.ApplyModifiedProperties(); + + m_fontAsset.ReadFontAssetDefinition(); + } + + /// + /// + /// + /// + /// + void CopyGlyphSerializedProperty(SerializedProperty srcGlyph, ref SerializedProperty dstGlyph) + { + // TODO : Should make a generic function which copies each of the properties. + dstGlyph.FindPropertyRelative("m_Index").intValue = srcGlyph.FindPropertyRelative("m_Index").intValue; + + // Glyph -> GlyphMetrics + SerializedProperty srcGlyphMetrics = srcGlyph.FindPropertyRelative("m_Metrics"); + SerializedProperty dstGlyphMetrics = dstGlyph.FindPropertyRelative("m_Metrics"); + + dstGlyphMetrics.FindPropertyRelative("m_Width").floatValue = srcGlyphMetrics.FindPropertyRelative("m_Width").floatValue; + dstGlyphMetrics.FindPropertyRelative("m_Height").floatValue = srcGlyphMetrics.FindPropertyRelative("m_Height").floatValue; + dstGlyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue; + dstGlyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue; + dstGlyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue; + + // Glyph -> GlyphRect + SerializedProperty srcGlyphRect = srcGlyph.FindPropertyRelative("m_GlyphRect"); + SerializedProperty dstGlyphRect = dstGlyph.FindPropertyRelative("m_GlyphRect"); + + dstGlyphRect.FindPropertyRelative("m_X").intValue = srcGlyphRect.FindPropertyRelative("m_X").intValue; + dstGlyphRect.FindPropertyRelative("m_Y").intValue = srcGlyphRect.FindPropertyRelative("m_Y").intValue; + dstGlyphRect.FindPropertyRelative("m_Width").intValue = srcGlyphRect.FindPropertyRelative("m_Width").intValue; + dstGlyphRect.FindPropertyRelative("m_Height").intValue = srcGlyphRect.FindPropertyRelative("m_Height").intValue; + + dstGlyph.FindPropertyRelative("m_Scale").floatValue = srcGlyph.FindPropertyRelative("m_Scale").floatValue; + dstGlyph.FindPropertyRelative("m_AtlasIndex").intValue = srcGlyph.FindPropertyRelative("m_AtlasIndex").intValue; + } + + + void CopyCharacterSerializedProperty(SerializedProperty source, ref SerializedProperty target) + { + // TODO : Should make a generic function which copies each of the properties. + int unicode = source.FindPropertyRelative("m_Unicode").intValue; + target.FindPropertyRelative("m_Unicode").intValue = unicode; + + int srcGlyphIndex = source.FindPropertyRelative("m_GlyphIndex").intValue; + target.FindPropertyRelative("m_GlyphIndex").intValue = srcGlyphIndex; + + target.FindPropertyRelative("m_Scale").floatValue = source.FindPropertyRelative("m_Scale").floatValue; + } + + + /// + /// + /// + /// + /// + void SearchGlyphTable (string searchPattern, ref List searchResults) + { + if (searchResults == null) searchResults = new List(); + + searchResults.Clear(); + + int arraySize = m_GlyphTable_prop.arraySize; + + for (int i = 0; i < arraySize; i++) + { + SerializedProperty sourceGlyph = m_GlyphTable_prop.GetArrayElementAtIndex(i); + + int id = sourceGlyph.FindPropertyRelative("m_Index").intValue; + + // Check for potential match against a character. + //if (searchPattern.Length == 1 && id == searchPattern[0]) + // searchResults.Add(i); + + // Check for potential match against decimal id + if (id.ToString().Contains(searchPattern)) + searchResults.Add(i); + + //if (id.ToString("x").Contains(searchPattern)) + // searchResults.Add(i); + + //if (id.ToString("X").Contains(searchPattern)) + // searchResults.Add(i); + } + } + + + void SearchCharacterTable(string searchPattern, ref List searchResults) + { + if (searchResults == null) searchResults = new List(); + + searchResults.Clear(); + + int arraySize = m_CharacterTable_prop.arraySize; + + for (int i = 0; i < arraySize; i++) + { + SerializedProperty sourceCharacter = m_CharacterTable_prop.GetArrayElementAtIndex(i); + + int id = sourceCharacter.FindPropertyRelative("m_Unicode").intValue; + + // Check for potential match against a character. + if (searchPattern.Length == 1 && id == searchPattern[0]) + searchResults.Add(i); + else if (id.ToString("x").Contains(searchPattern)) + searchResults.Add(i); + else if (id.ToString("X").Contains(searchPattern)) + searchResults.Add(i); + + // Check for potential match against decimal id + //if (id.ToString().Contains(searchPattern)) + // searchResults.Add(i); + } + } + + + void SearchKerningTable(string searchPattern, ref List searchResults) + { + if (searchResults == null) searchResults = new List(); + + searchResults.Clear(); + + // Lookup glyph index of potential characters contained in the search pattern. + uint firstGlyphIndex = 0; + if (searchPattern.Length > 0 && m_fontAsset.characterLookupTable.TryGetValue(searchPattern[0], out TMP_Character firstCharacterSearch)) + firstGlyphIndex = firstCharacterSearch.glyphIndex; + + uint secondGlyphIndex = 0; + if (searchPattern.Length > 1 && m_fontAsset.characterLookupTable.TryGetValue(searchPattern[1], out TMP_Character secondCharacterSearch)) + secondGlyphIndex = secondCharacterSearch.glyphIndex; + + int arraySize = m_GlyphPairAdjustmentRecords_prop.arraySize; + + for (int i = 0; i < arraySize; i++) + { + SerializedProperty record = m_GlyphPairAdjustmentRecords_prop.GetArrayElementAtIndex(i); + + SerializedProperty firstAdjustmentRecord = record.FindPropertyRelative("m_FirstAdjustmentRecord"); + SerializedProperty secondAdjustmentRecord = record.FindPropertyRelative("m_SecondAdjustmentRecord"); + + int firstGlyph = firstAdjustmentRecord.FindPropertyRelative("m_GlyphIndex").intValue; + int secondGlyph = secondAdjustmentRecord.FindPropertyRelative("m_GlyphIndex").intValue; + + if (firstGlyphIndex == firstGlyph && secondGlyphIndex == secondGlyph) + searchResults.Add(i); + else if (searchPattern.Length == 1 && (firstGlyphIndex == firstGlyph || firstGlyphIndex == secondGlyph)) + searchResults.Add(i); + else if (firstGlyph.ToString().Contains(searchPattern)) + searchResults.Add(i); + else if (secondGlyph.ToString().Contains(searchPattern)) + searchResults.Add(i); + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAssetEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAssetEditor.cs.meta new file mode 100644 index 00000000..9b26bae5 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAssetEditor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 96b44f7d98314b139324a8a87eb66067 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAsset_CreationMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAsset_CreationMenu.cs new file mode 100644 index 00000000..1e432331 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAsset_CreationMenu.cs @@ -0,0 +1,190 @@ +using UnityEngine; +using UnityEditor; +using System.Linq; +using System.IO; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; +using TMPro; + + +namespace TMPro +{ + public static class TMP_FontAsset_CreationMenu + { + /* + [MenuItem("Assets/Create/TextMeshPro/Font Asset Fallback", false, 105)] + public static void CreateFallbackFontAsset() + { + Object target = Selection.activeObject; + + // Make sure the selection is a font file + if (target == null || target.GetType() != typeof(TMP_FontAsset)) + { + Debug.LogWarning("A Font file must first be selected in order to create a Font Asset."); + return; + } + + TMP_FontAsset sourceFontAsset = (TMP_FontAsset)target; + + string sourceFontFilePath = AssetDatabase.GetAssetPath(target); + + string folderPath = Path.GetDirectoryName(sourceFontFilePath); + string assetName = Path.GetFileNameWithoutExtension(sourceFontFilePath); + + string newAssetFilePathWithName = AssetDatabase.GenerateUniqueAssetPath(folderPath + "/" + assetName + " - Fallback.asset"); + + //// Create new TM Font Asset. + TMP_FontAsset fontAsset = ScriptableObject.CreateInstance(); + AssetDatabase.CreateAsset(fontAsset, newAssetFilePathWithName); + + fontAsset.version = "1.1.0"; + + fontAsset.faceInfo = sourceFontAsset.faceInfo; + + fontAsset.m_SourceFontFileGUID = sourceFontAsset.m_SourceFontFileGUID; + fontAsset.m_SourceFontFile_EditorRef = sourceFontAsset.m_SourceFontFile_EditorRef; + fontAsset.atlasPopulationMode = TMP_FontAsset.AtlasPopulationMode.Dynamic; + + int atlasWidth = fontAsset.atlasWidth = sourceFontAsset.atlasWidth; + int atlasHeight = fontAsset.atlasHeight = sourceFontAsset.atlasHeight; + int atlasPadding = fontAsset.atlasPadding = sourceFontAsset.atlasPadding; + fontAsset.atlasRenderMode = sourceFontAsset.atlasRenderMode; + + // Initialize array for the font atlas textures. + fontAsset.atlasTextures = new Texture2D[1]; + + // Create and add font atlas texture + Texture2D texture = new Texture2D(atlasWidth, atlasHeight, TextureFormat.Alpha8, false); + Color32[] colors = new Color32[atlasWidth * atlasHeight]; + texture.SetPixels32(colors); + + texture.name = assetName + " Atlas"; + fontAsset.atlasTextures[0] = texture; + AssetDatabase.AddObjectToAsset(texture, fontAsset); + + // Add free rectangle of the size of the texture. + int packingModifier = ((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; + fontAsset.m_FreeGlyphRects = new List() { new GlyphRect(0, 0, atlasWidth - packingModifier, atlasHeight - packingModifier) }; + fontAsset.m_UsedGlyphRects = new List(); + + // Create new Material and Add it as Sub-Asset + Material tmp_material = new Material(sourceFontAsset.material); + + tmp_material.name = texture.name + " Material"; + tmp_material.SetTexture(ShaderUtilities.ID_MainTex, texture); + tmp_material.SetFloat(ShaderUtilities.ID_TextureWidth, atlasWidth); + tmp_material.SetFloat(ShaderUtilities.ID_TextureHeight, atlasHeight); + + tmp_material.SetFloat(ShaderUtilities.ID_GradientScale, atlasPadding + packingModifier); + + tmp_material.SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.normalStyle); + tmp_material.SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyle); + + fontAsset.material = tmp_material; + + AssetDatabase.AddObjectToAsset(tmp_material, fontAsset); + + // Add Font Asset Creation Settings + // TODO + + // Not sure if this is still necessary in newer versions of Unity. + EditorUtility.SetDirty(fontAsset); + + AssetDatabase.SaveAssets(); + } + */ + + //[MenuItem("Assets/Create/TextMeshPro/Font Asset #%F12", true)] + //public static bool CreateFontAssetMenuValidation() + //{ + // return false; + //} + + [MenuItem("Assets/Create/TextMeshPro/Font Asset #%F12", false, 100)] + public static void CreateFontAsset() + { + Object target = Selection.activeObject; + + // Make sure the selection is a font file + if (target == null || target.GetType() != typeof(Font)) + { + Debug.LogWarning("A Font file must first be selected in order to create a Font Asset."); + return; + } + + Font sourceFont = (Font)target; + + string sourceFontFilePath = AssetDatabase.GetAssetPath(target); + + string folderPath = Path.GetDirectoryName(sourceFontFilePath); + string assetName = Path.GetFileNameWithoutExtension(sourceFontFilePath); + + string newAssetFilePathWithName = AssetDatabase.GenerateUniqueAssetPath(folderPath + "/" + assetName + " SDF.asset"); + + //// Create new TM Font Asset. + TMP_FontAsset fontAsset = ScriptableObject.CreateInstance(); + AssetDatabase.CreateAsset(fontAsset, newAssetFilePathWithName); + + fontAsset.version = "1.1.0"; + + // Set face information + FontEngine.InitializeFontEngine(); + FontEngine.LoadFontFace(sourceFont, 90); + fontAsset.faceInfo = FontEngine.GetFaceInfo(); + + // Set font reference and GUID + fontAsset.m_SourceFontFileGUID = AssetDatabase.AssetPathToGUID(sourceFontFilePath); + fontAsset.m_SourceFontFile_EditorRef = sourceFont; + fontAsset.atlasPopulationMode = AtlasPopulationMode.Dynamic; + + // Default atlas resolution is 1024 x 1024. + int atlasWidth = fontAsset.atlasWidth = 1024; + int atlasHeight = fontAsset.atlasHeight = 1024; + int atlasPadding = fontAsset.atlasPadding = 9; + fontAsset.atlasRenderMode = GlyphRenderMode.SDFAA; + + // Initialize array for the font atlas textures. + fontAsset.atlasTextures = new Texture2D[1]; + + // Create atlas texture of size zero. + Texture2D texture = new Texture2D(0, 0, TextureFormat.Alpha8, false); + + texture.name = assetName + " Atlas"; + fontAsset.atlasTextures[0] = texture; + AssetDatabase.AddObjectToAsset(texture, fontAsset); + + // Add free rectangle of the size of the texture. + int packingModifier = ((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; + fontAsset.freeGlyphRects = new List() { new GlyphRect(0, 0, atlasWidth - packingModifier, atlasHeight - packingModifier) }; + fontAsset.usedGlyphRects = new List(); + + // Create new Material and Add it as Sub-Asset + Shader default_Shader = Shader.Find("TextMeshPro/Distance Field"); + Material tmp_material = new Material(default_Shader); + + tmp_material.name = texture.name + " Material"; + tmp_material.SetTexture(ShaderUtilities.ID_MainTex, texture); + tmp_material.SetFloat(ShaderUtilities.ID_TextureWidth, atlasWidth); + tmp_material.SetFloat(ShaderUtilities.ID_TextureHeight, atlasHeight); + + tmp_material.SetFloat(ShaderUtilities.ID_GradientScale, atlasPadding + packingModifier); + + tmp_material.SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.normalStyle); + tmp_material.SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyle); + + fontAsset.material = tmp_material; + + AssetDatabase.AddObjectToAsset(tmp_material, fontAsset); + + // Add Font Asset Creation Settings + fontAsset.creationSettings = new FontAssetCreationSettings(fontAsset.m_SourceFontFileGUID, fontAsset.faceInfo.pointSize, 0, atlasPadding, 0, 1024, 1024, 7, string.Empty, (int)GlyphRenderMode.SDFAA); + + // Not sure if this is still necessary in newer versions of Unity. + EditorUtility.SetDirty(fontAsset); + + AssetDatabase.SaveAssets(); + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta new file mode 100644 index 00000000..57a3fcea --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7496af95dfe67cf429ac65edaaf99106 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs new file mode 100644 index 00000000..77268baa --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs @@ -0,0 +1,382 @@ +using UnityEngine; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; +using UnityEditor; +using System.Collections; +using System.Text.RegularExpressions; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(TMP_GlyphPairAdjustmentRecord))] + public class TMP_GlyphPairAdjustmentRecordPropertyDrawer : PropertyDrawer + { + private bool isEditingEnabled = false; + private bool isSelectable = false; + + private string m_FirstCharacter = string.Empty; + private string m_SecondCharacter = string.Empty; + private string m_PreviousInput; + + static GUIContent s_CharacterTextFieldLabel = new GUIContent("Char:", "Enter the character or its UTF16 or UTF32 Unicode character escape sequence. For UTF16 use \"\\uFF00\" and for UTF32 use \"\\UFF00FF00\" representation."); + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty prop_FirstAdjustmentRecord = property.FindPropertyRelative("m_FirstAdjustmentRecord"); + SerializedProperty prop_SecondAdjustmentRecord = property.FindPropertyRelative("m_SecondAdjustmentRecord"); + + SerializedProperty prop_FirstGlyphIndex = prop_FirstAdjustmentRecord.FindPropertyRelative("m_GlyphIndex"); + SerializedProperty prop_FirstGlyphValueRecord = prop_FirstAdjustmentRecord.FindPropertyRelative("m_GlyphValueRecord"); + + SerializedProperty prop_SecondGlyphIndex = prop_SecondAdjustmentRecord.FindPropertyRelative("m_GlyphIndex"); + SerializedProperty prop_SecondGlyphValueRecord = prop_SecondAdjustmentRecord.FindPropertyRelative("m_GlyphValueRecord"); + + SerializedProperty prop_FontFeatureLookupFlags = property.FindPropertyRelative("m_FeatureLookupFlags"); + + position.yMin += 2; + + float width = position.width / 2; + float padding = 5.0f; + + Rect rect; + + isEditingEnabled = GUI.enabled; + isSelectable = label.text == "Selectable" ? true : false; + + if (isSelectable) + GUILayoutUtility.GetRect(position.width, 75); + else + GUILayoutUtility.GetRect(position.width, 55); + + GUIStyle style = new GUIStyle(EditorStyles.label); + style.richText = true; + + // First Glyph + GUI.enabled = isEditingEnabled; + if (isSelectable) + { + rect = new Rect(position.x + 70, position.y, position.width, 49); + + float labelWidth = GUI.skin.label.CalcSize(new GUIContent("ID: " + prop_FirstGlyphIndex.intValue)).x; + EditorGUI.LabelField(new Rect(position.x + (64 - labelWidth) / 2, position.y + 60, 64f, 18f), new GUIContent("ID: " + prop_FirstGlyphIndex.intValue + ""), style); + + GUI.enabled = isEditingEnabled; + EditorGUIUtility.labelWidth = 30f; + + rect = new Rect(position.x + 70, position.y + 10, (width - 70) - padding, 18); + EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_XPlacement"), new GUIContent("OX:")); + + rect.y += 20; + EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_YPlacement"), new GUIContent("OY:")); + + rect.y += 20; + EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_XAdvance"), new GUIContent("AX:")); + + //rect.y += 20; + //EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_YAdvance"), new GUIContent("AY:")); + + DrawGlyph((uint)prop_FirstGlyphIndex.intValue, new Rect(position.x, position.y, position.width, position.height), property); + } + else + { + rect = new Rect(position.x, position.y, width / 2 * 0.8f - padding, 18); + EditorGUIUtility.labelWidth = 40f; + + // First Character Lookup + GUI.SetNextControlName("FirstCharacterField"); + EditorGUI.BeginChangeCheck(); + string firstCharacter = EditorGUI.TextField(rect, s_CharacterTextFieldLabel, m_FirstCharacter); + + if (GUI.GetNameOfFocusedControl() == "FirstCharacterField") + { + if (ValidateInput(firstCharacter)) + { + //Debug.Log("1st Unicode value: [" + firstCharacter + "]"); + + uint unicode = GetUnicodeCharacter(firstCharacter); + + // Lookup glyph index + TMP_SerializedPropertyHolder propertyHolder = property.serializedObject.targetObject as TMP_SerializedPropertyHolder; + TMP_FontAsset fontAsset = propertyHolder.fontAsset; + if (fontAsset != null) + { + prop_FirstGlyphIndex.intValue = (int)fontAsset.GetGlyphIndex(unicode); + propertyHolder.firstCharacter = unicode; + } + } + } + + if (EditorGUI.EndChangeCheck()) + m_FirstCharacter = firstCharacter; + + // First Glyph Index + rect.x += width / 2 * 0.8f; + + EditorGUIUtility.labelWidth = 25f; + EditorGUI.BeginChangeCheck(); + EditorGUI.PropertyField(rect, prop_FirstGlyphIndex, new GUIContent("ID:")); + if (EditorGUI.EndChangeCheck()) + { + + } + + GUI.enabled = isEditingEnabled; + EditorGUIUtility.labelWidth = 25f; + + rect = new Rect(position.x, position.y + 20, width * 0.5f - padding, 18); + EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_XPlacement"), new GUIContent("OX")); + + rect.x += width * 0.5f; + EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_YPlacement"), new GUIContent("OY")); + + rect.x = position.x; + rect.y += 20; + EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_XAdvance"), new GUIContent("AX")); + + //rect.x += width * 0.5f; + //EditorGUI.PropertyField(rect, prop_FirstGlyphAdjustment.FindPropertyRelative("m_YAdvance"), new GUIContent("AY")); + + } + + + // Second Glyph + GUI.enabled = isEditingEnabled; + if (isSelectable) + { + float labelWidth = GUI.skin.label.CalcSize(new GUIContent("ID: " + prop_SecondGlyphIndex.intValue)).x; + EditorGUI.LabelField(new Rect(position.width / 2 + 20 + (64 - labelWidth) / 2, position.y + 60, 64f, 18f), new GUIContent("ID: " + prop_SecondGlyphIndex.intValue + ""), style); + + GUI.enabled = isEditingEnabled; + EditorGUIUtility.labelWidth = 30f; + + rect = new Rect(position.width / 2 + 20 + 70, position.y + 10, (width - 70) - padding, 18); + EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_XPlacement"), new GUIContent("OX:")); + + rect.y += 20; + EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_YPlacement"), new GUIContent("OY:")); + + rect.y += 20; + EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_XAdvance"), new GUIContent("AX:")); + + //rect.y += 20; + //EditorGUI.PropertyField(rect, prop_SecondGlyphAdjustment.FindPropertyRelative("m_YAdvance"), new GUIContent("AY")); + + DrawGlyph((uint)prop_SecondGlyphIndex.intValue, new Rect(position.width / 2 + 20, position.y, position.width, position.height), property); + } + else + { + rect = new Rect(position.width / 2 + 20, position.y, width / 2 * 0.8f - padding, 18); + EditorGUIUtility.labelWidth = 40f; + + // Second Character Lookup + GUI.SetNextControlName("SecondCharacterField"); + EditorGUI.BeginChangeCheck(); + string secondCharacter = EditorGUI.TextField(rect, s_CharacterTextFieldLabel, m_SecondCharacter); + + if (GUI.GetNameOfFocusedControl() == "SecondCharacterField") + { + if (ValidateInput(secondCharacter)) + { + //Debug.Log("2nd Unicode value: [" + secondCharacter + "]"); + + uint unicode = GetUnicodeCharacter(secondCharacter); + + // Lookup glyph index + TMP_SerializedPropertyHolder propertyHolder = property.serializedObject.targetObject as TMP_SerializedPropertyHolder; + TMP_FontAsset fontAsset = propertyHolder.fontAsset; + if (fontAsset != null) + { + prop_SecondGlyphIndex.intValue = (int)fontAsset.GetGlyphIndex(unicode); + propertyHolder.secondCharacter = unicode; + } + } + } + + if (EditorGUI.EndChangeCheck()) + m_SecondCharacter = secondCharacter; + + // Second Glyph Index + rect.x += width / 2 * 0.8f; + + EditorGUIUtility.labelWidth = 25f; + EditorGUI.BeginChangeCheck(); + EditorGUI.PropertyField(rect, prop_SecondGlyphIndex, new GUIContent("ID:")); + if (EditorGUI.EndChangeCheck()) + { + + } + + GUI.enabled = isEditingEnabled; + EditorGUIUtility.labelWidth = 25f; + + rect = new Rect(position.width / 2 + 20, position.y + 20, width * 0.5f - padding, 18); + EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_XPlacement"), new GUIContent("OX")); + + rect.x += width * 0.5f; + EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_YPlacement"), new GUIContent("OY")); + + rect.x = position.width / 2 + 20; + rect.y += 20; + EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_XAdvance"), new GUIContent("AX")); + + //rect.x += width * 0.5f; + //EditorGUI.PropertyField(rect, prop_SecondGlyphAdjustment.FindPropertyRelative("m_YAdvance"), new GUIContent("AY")); + } + + // Font Feature Lookup Flags + if (isSelectable) + { + EditorGUIUtility.labelWidth = 55f; + + rect.x = position.width - 255; + rect.y += 23; + rect.width = 270; // width - 70 - padding; + + FontFeatureLookupFlags flags = (FontFeatureLookupFlags)prop_FontFeatureLookupFlags.intValue; + + EditorGUI.BeginChangeCheck(); + flags = (FontFeatureLookupFlags)EditorGUI.EnumFlagsField(rect, new GUIContent("Options:"), flags); + if (EditorGUI.EndChangeCheck()) + { + prop_FontFeatureLookupFlags.intValue = (int)flags; + } + } + + } + + bool ValidateInput(string source) + { + int length = string.IsNullOrEmpty(source) ? 0 : source.Length; + + ////Filter out unwanted characters. + Event evt = Event.current; + + char c = evt.character; + + if (c != '\0') + { + switch (length) + { + case 0: + break; + case 1: + if (source != m_PreviousInput) + return true; + + if ((source[0] == '\\' && (c == 'u' || c == 'U')) == false) + evt.character = '\0'; + + break; + case 2: + case 3: + case 4: + case 5: + if ((c < '0' || c > '9') && (c < 'a' || c > 'f') && (c < 'A' || c > 'F')) + evt.character = '\0'; + break; + case 6: + case 7: + case 8: + case 9: + if (source[1] == 'u' || (c < '0' || c > '9') && (c < 'a' || c > 'f') && (c < 'A' || c > 'F')) + evt.character = '\0'; + + // Validate input + if (length == 6 && source[1] == 'u' && source != m_PreviousInput) + return true; + break; + case 10: + if (source != m_PreviousInput) + return true; + + evt.character = '\0'; + break; + } + } + + m_PreviousInput = source; + + return false; + } + + uint GetUnicodeCharacter (string source) + { + uint unicode; + + if (source.Length == 1) + unicode = source[0]; + else if (source.Length == 6) + unicode = (uint)TMP_TextUtilities.StringHexToInt(source.Replace("\\u", "")); + else + unicode = (uint)TMP_TextUtilities.StringHexToInt(source.Replace("\\U", "")); + + return unicode; + } + + void DrawGlyph(uint glyphIndex, Rect position, SerializedProperty property) + { + // Get a reference to the sprite texture + TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; + + if (fontAsset == null) + return; + + // Check if glyph currently exists in the atlas texture. + if (!fontAsset.glyphLookupTable.TryGetValue(glyphIndex, out Glyph glyph)) + return; + + // Get reference to atlas texture. + int atlasIndex = fontAsset.m_AtlasTextureIndex; + Texture2D atlasTexture = fontAsset.atlasTextures.Length > atlasIndex ? fontAsset.atlasTextures[atlasIndex] : null; + + if (atlasTexture == null) + return; + + Material mat; + if (((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) + { + mat = TMP_FontAssetEditor.internalBitmapMaterial; + + if (mat == null) + return; + + mat.mainTexture = atlasTexture; + } + else + { + mat = TMP_FontAssetEditor.internalSDFMaterial; + + if (mat == null) + return; + + mat.mainTexture = atlasTexture; + mat.SetFloat(ShaderUtilities.ID_GradientScale, fontAsset.atlasPadding + 1); + } + + // Draw glyph from atlas texture. + Rect glyphDrawPosition = new Rect(position.x, position.y + 2, 64, 60); + + GlyphRect glyphRect = glyph.glyphRect; + + float normalizedHeight = fontAsset.faceInfo.ascentLine - fontAsset.faceInfo.descentLine; + float scale = glyphDrawPosition.width / normalizedHeight; + + // Compute the normalized texture coordinates + Rect texCoords = new Rect((float)glyphRect.x / atlasTexture.width, (float)glyphRect.y / atlasTexture.height, (float)glyphRect.width / atlasTexture.width, (float)glyphRect.height / atlasTexture.height); + + if (Event.current.type == EventType.Repaint) + { + glyphDrawPosition.x += (glyphDrawPosition.width - glyphRect.width * scale) / 2; + glyphDrawPosition.y += (glyphDrawPosition.height - glyphRect.height * scale) / 2; + glyphDrawPosition.width = glyphRect.width * scale; + glyphDrawPosition.height = glyphRect.height * scale; + + // Could switch to using the default material of the font asset which would require passing scale to the shader. + Graphics.DrawTexture(glyphDrawPosition, atlasTexture, texCoords, 0, 0, 0, 0, new Color(1f, 1f, 1f), mat); + } + } + + + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta new file mode 100644 index 00000000..b95203f5 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d256fa541faf5d4409992c631adb98a1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPropertyDrawer.cs new file mode 100644 index 00000000..b92dfd66 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPropertyDrawer.cs @@ -0,0 +1,118 @@ + using UnityEngine; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(Glyph))] + public class TMP_GlyphPropertyDrawer : PropertyDrawer + { + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty prop_GlyphIndex = property.FindPropertyRelative("m_Index"); + SerializedProperty prop_GlyphMetrics = property.FindPropertyRelative("m_Metrics"); + SerializedProperty prop_GlyphRect = property.FindPropertyRelative("m_GlyphRect"); + SerializedProperty prop_Scale = property.FindPropertyRelative("m_Scale"); + SerializedProperty prop_AtlasIndex = property.FindPropertyRelative("m_AtlasIndex"); + + GUIStyle style = new GUIStyle(EditorStyles.label); + style.richText = true; + + Rect rect = new Rect(position.x + 70, position.y, position.width, 49); + + float labelWidth = GUI.skin.label.CalcSize(new GUIContent("ID: " + prop_GlyphIndex.intValue)).x; + EditorGUI.LabelField(new Rect(position.x + (64 - labelWidth) / 2, position.y + 85, 64f, 18f), new GUIContent("ID: " + prop_GlyphIndex.intValue + ""), style); + //EditorGUIUtility.labelWidth = 22f; + //EditorGUI.DelayedIntField(new Rect(position.x + (64 - labelWidth) / 2, position.y + 89, 58f, 18f), prop_GlyphIndex, new GUIContent("ID:")); + + // We get Rect since a valid position may not be provided by the caller. + EditorGUI.PropertyField(new Rect(rect.x, rect.y, position.width, 49), prop_GlyphRect); + + rect.y += 45; + EditorGUI.PropertyField(rect, prop_GlyphMetrics); + + EditorGUIUtility.labelWidth = 40f; + EditorGUI.PropertyField(new Rect(rect.x, rect.y + 65, 75, 18), prop_Scale, new GUIContent("Scale:")); // new GUIContent("Scale: " + prop_Scale.floatValue + ""), style); + + EditorGUIUtility.labelWidth = 74f; + EditorGUI.PropertyField(new Rect(rect.x + 85, rect.y + 65, 95, 18), prop_AtlasIndex, new GUIContent("Atlas Index:")); // new GUIContent("Atlas Index: " + prop_AtlasIndex.intValue + ""), style); + + DrawGlyph(position, property); + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return 130f; + } + + void DrawGlyph(Rect position, SerializedProperty property) + { + // Get a reference to the sprite texture + TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; + + if (fontAsset == null) + return; + + // Get reference to atlas texture. + int atlasIndex = property.FindPropertyRelative("m_AtlasIndex").intValue; + Texture2D atlasTexture = fontAsset.atlasTextures.Length > atlasIndex ? fontAsset.atlasTextures[atlasIndex] : null; + + if (atlasTexture == null) + return; + + Material mat; + if (((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) + { + mat = TMP_FontAssetEditor.internalBitmapMaterial; + + if (mat == null) + return; + + mat.mainTexture = atlasTexture; + mat.SetColor("_Color", Color.white); + } + else + { + mat = TMP_FontAssetEditor.internalSDFMaterial; + + if (mat == null) + return; + + mat.mainTexture = atlasTexture; + mat.SetFloat(ShaderUtilities.ID_GradientScale, fontAsset.atlasPadding + 1); + } + + // Draw glyph from atlas texture. + Rect glyphDrawPosition = new Rect(position.x, position.y + 2, 64, 80); + + SerializedProperty prop_GlyphRect = property.FindPropertyRelative("m_GlyphRect"); + + int glyphOriginX = prop_GlyphRect.FindPropertyRelative("m_X").intValue; + int glyphOriginY = prop_GlyphRect.FindPropertyRelative("m_Y").intValue; + int glyphWidth = prop_GlyphRect.FindPropertyRelative("m_Width").intValue; + int glyphHeight = prop_GlyphRect.FindPropertyRelative("m_Height").intValue; + + float normalizedHeight = fontAsset.faceInfo.ascentLine - fontAsset.faceInfo.descentLine; + float scale = glyphDrawPosition.width / normalizedHeight; + + // Compute the normalized texture coordinates + Rect texCoords = new Rect((float)glyphOriginX / atlasTexture.width, (float)glyphOriginY / atlasTexture.height, (float)glyphWidth / atlasTexture.width, (float)glyphHeight / atlasTexture.height); + + if (Event.current.type == EventType.Repaint) + { + glyphDrawPosition.x += (glyphDrawPosition.width - glyphWidth * scale) / 2; + glyphDrawPosition.y += (glyphDrawPosition.height - glyphHeight * scale) / 2; + glyphDrawPosition.width = glyphWidth * scale; + glyphDrawPosition.height = glyphHeight * scale; + + // Could switch to using the default material of the font asset which would require passing scale to the shader. + Graphics.DrawTexture(glyphDrawPosition, atlasTexture, texCoords, 0, 0, 0, 0, new Color(1f, 1f, 1f), mat); + } + } + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta new file mode 100644 index 00000000..ce08447f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c4777500b5da6094e956c3d4f04de4db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_InputFieldEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_InputFieldEditor.cs new file mode 100644 index 00000000..d50dc585 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_InputFieldEditor.cs @@ -0,0 +1,283 @@ +using UnityEngine; +using UnityEngine.UI; +using UnityEditor; +using UnityEditor.UI; +using UnityEditor.AnimatedValues; + + +namespace TMPro.EditorUtilities +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(TMP_InputField), true)] + public class TMP_InputFieldEditor : SelectableEditor + { + private struct m_foldout + { // Track Inspector foldout panel states, globally. + public static bool textInput = true; + public static bool fontSettings = true; + public static bool extraSettings = true; + //public static bool shadowSetting = false; + //public static bool materialEditor = true; + } + + SerializedProperty m_TextViewport; + SerializedProperty m_TextComponent; + SerializedProperty m_Text; + SerializedProperty m_ContentType; + SerializedProperty m_LineType; + SerializedProperty m_LineLimit; + SerializedProperty m_InputType; + SerializedProperty m_CharacterValidation; + SerializedProperty m_InputValidator; + SerializedProperty m_RegexValue; + SerializedProperty m_KeyboardType; + SerializedProperty m_CharacterLimit; + SerializedProperty m_CaretBlinkRate; + SerializedProperty m_CaretWidth; + SerializedProperty m_CaretColor; + SerializedProperty m_CustomCaretColor; + SerializedProperty m_SelectionColor; + SerializedProperty m_HideMobileKeyboard; + SerializedProperty m_HideMobileInput; + SerializedProperty m_Placeholder; + SerializedProperty m_VerticalScrollbar; + SerializedProperty m_ScrollbarScrollSensitivity; + SerializedProperty m_OnValueChanged; + SerializedProperty m_OnEndEdit; + SerializedProperty m_OnSelect; + SerializedProperty m_OnDeselect; + SerializedProperty m_ReadOnly; + SerializedProperty m_RichText; + SerializedProperty m_RichTextEditingAllowed; + SerializedProperty m_ResetOnDeActivation; + SerializedProperty m_RestoreOriginalTextOnEscape; + + SerializedProperty m_OnFocusSelectAll; + SerializedProperty m_GlobalPointSize; + SerializedProperty m_GlobalFontAsset; + + AnimBool m_CustomColor; + + //TMP_InputValidator m_ValidationScript; + + protected override void OnEnable() + { + base.OnEnable(); + + m_TextViewport = serializedObject.FindProperty("m_TextViewport"); + m_TextComponent = serializedObject.FindProperty("m_TextComponent"); + m_Text = serializedObject.FindProperty("m_Text"); + m_ContentType = serializedObject.FindProperty("m_ContentType"); + m_LineType = serializedObject.FindProperty("m_LineType"); + m_LineLimit = serializedObject.FindProperty("m_LineLimit"); + m_InputType = serializedObject.FindProperty("m_InputType"); + m_CharacterValidation = serializedObject.FindProperty("m_CharacterValidation"); + m_InputValidator = serializedObject.FindProperty("m_InputValidator"); + m_RegexValue = serializedObject.FindProperty("m_RegexValue"); + m_KeyboardType = serializedObject.FindProperty("m_KeyboardType"); + m_CharacterLimit = serializedObject.FindProperty("m_CharacterLimit"); + m_CaretBlinkRate = serializedObject.FindProperty("m_CaretBlinkRate"); + m_CaretWidth = serializedObject.FindProperty("m_CaretWidth"); + m_CaretColor = serializedObject.FindProperty("m_CaretColor"); + m_CustomCaretColor = serializedObject.FindProperty("m_CustomCaretColor"); + m_SelectionColor = serializedObject.FindProperty("m_SelectionColor"); + + m_HideMobileKeyboard = serializedObject.FindProperty("m_HideSoftKeyboard"); + m_HideMobileInput = serializedObject.FindProperty("m_HideMobileInput"); + + m_Placeholder = serializedObject.FindProperty("m_Placeholder"); + m_VerticalScrollbar = serializedObject.FindProperty("m_VerticalScrollbar"); + m_ScrollbarScrollSensitivity = serializedObject.FindProperty("m_ScrollSensitivity"); + + m_OnValueChanged = serializedObject.FindProperty("m_OnValueChanged"); + m_OnEndEdit = serializedObject.FindProperty("m_OnEndEdit"); + m_OnSelect = serializedObject.FindProperty("m_OnSelect"); + m_OnDeselect = serializedObject.FindProperty("m_OnDeselect"); + m_ReadOnly = serializedObject.FindProperty("m_ReadOnly"); + m_RichText = serializedObject.FindProperty("m_RichText"); + m_RichTextEditingAllowed = serializedObject.FindProperty("m_isRichTextEditingAllowed"); + m_ResetOnDeActivation = serializedObject.FindProperty("m_ResetOnDeActivation"); + m_RestoreOriginalTextOnEscape = serializedObject.FindProperty("m_RestoreOriginalTextOnEscape"); + + m_OnFocusSelectAll = serializedObject.FindProperty("m_OnFocusSelectAll"); + m_GlobalPointSize = serializedObject.FindProperty("m_GlobalPointSize"); + m_GlobalFontAsset = serializedObject.FindProperty("m_GlobalFontAsset"); + + m_CustomColor = new AnimBool(m_CustomCaretColor.boolValue); + m_CustomColor.valueChanged.AddListener(Repaint); + } + + protected override void OnDisable() + { + base.OnDisable(); + m_CustomColor.valueChanged.RemoveListener(Repaint); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + base.OnInspectorGUI(); + + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(m_TextViewport); + + EditorGUILayout.PropertyField(m_TextComponent); + + TextMeshProUGUI text = null; + if (m_TextComponent != null && m_TextComponent.objectReferenceValue != null) + { + text = m_TextComponent.objectReferenceValue as TextMeshProUGUI; + //if (text.supportRichText) + //{ + // EditorGUILayout.HelpBox("Using Rich Text with input is unsupported.", MessageType.Warning); + //} + } + + EditorGUI.BeginDisabledGroup(m_TextComponent == null || m_TextComponent.objectReferenceValue == null); + + // TEXT INPUT BOX + EditorGUILayout.PropertyField(m_Text); + + // INPUT FIELD SETTINGS + #region INPUT FIELD SETTINGS + + m_foldout.fontSettings = EditorGUILayout.Foldout(m_foldout.fontSettings, "Input Field Settings", true, TMP_UIStyleManager.boldFoldout); + + if (m_foldout.fontSettings) + { + EditorGUI.indentLevel++; + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_GlobalFontAsset, new GUIContent("Font Asset", "Set the Font Asset for both Placeholder and Input Field text object.")); + if (EditorGUI.EndChangeCheck()) + { + TMP_InputField inputField = target as TMP_InputField; + inputField.SetGlobalFontAsset(m_GlobalFontAsset.objectReferenceValue as TMP_FontAsset); + } + + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_GlobalPointSize, new GUIContent("Point Size", "Set the point size of both Placeholder and Input Field text object.")); + if (EditorGUI.EndChangeCheck()) + { + TMP_InputField inputField = target as TMP_InputField; + inputField.SetGlobalPointSize(m_GlobalPointSize.floatValue); + } + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_CharacterLimit); + + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(m_ContentType); + if (!m_ContentType.hasMultipleDifferentValues) + { + EditorGUI.indentLevel++; + + if (m_ContentType.enumValueIndex == (int)TMP_InputField.ContentType.Standard || + m_ContentType.enumValueIndex == (int)TMP_InputField.ContentType.Autocorrected || + m_ContentType.enumValueIndex == (int)TMP_InputField.ContentType.Custom) + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_LineType); + if (EditorGUI.EndChangeCheck()) + { + if (text != null) + { + if (m_LineType.enumValueIndex == (int)TMP_InputField.LineType.SingleLine) + text.enableWordWrapping = false; + else + { + text.enableWordWrapping = true; + } + } + } + + if (m_LineType.enumValueIndex != (int)TMP_InputField.LineType.SingleLine) + { + EditorGUILayout.PropertyField(m_LineLimit); + } + } + + if (m_ContentType.enumValueIndex == (int)TMP_InputField.ContentType.Custom) + { + EditorGUILayout.PropertyField(m_InputType); + EditorGUILayout.PropertyField(m_KeyboardType); + EditorGUILayout.PropertyField(m_CharacterValidation); + if (m_CharacterValidation.enumValueIndex == (int)TMP_InputField.CharacterValidation.Regex) + { + EditorGUILayout.PropertyField(m_RegexValue); + } + else if (m_CharacterValidation.enumValueIndex == (int)TMP_InputField.CharacterValidation.CustomValidator) + { + EditorGUILayout.PropertyField(m_InputValidator); + } + } + + EditorGUI.indentLevel--; + } + + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(m_Placeholder); + EditorGUILayout.PropertyField(m_VerticalScrollbar); + + if (m_VerticalScrollbar.objectReferenceValue != null) + EditorGUILayout.PropertyField(m_ScrollbarScrollSensitivity); + + EditorGUILayout.PropertyField(m_CaretBlinkRate); + EditorGUILayout.PropertyField(m_CaretWidth); + + EditorGUILayout.PropertyField(m_CustomCaretColor); + + m_CustomColor.target = m_CustomCaretColor.boolValue; + + if (EditorGUILayout.BeginFadeGroup(m_CustomColor.faded)) + { + EditorGUILayout.PropertyField(m_CaretColor); + } + EditorGUILayout.EndFadeGroup(); + + EditorGUILayout.PropertyField(m_SelectionColor); + + EditorGUI.indentLevel--; + } + #endregion + + + // CONTROL SETTINGS + #region CONTROL SETTINGS + m_foldout.extraSettings = EditorGUILayout.Foldout(m_foldout.extraSettings, "Control Settings", true, TMP_UIStyleManager.boldFoldout); + + if (m_foldout.extraSettings) + { + EditorGUI.indentLevel++; + + EditorGUILayout.PropertyField(m_OnFocusSelectAll, new GUIContent("OnFocus - Select All", "Should all the text be selected when the Input Field is selected.")); + EditorGUILayout.PropertyField(m_ResetOnDeActivation, new GUIContent("Reset On DeActivation", "Should the Text and Caret position be reset when Input Field is DeActivated.")); + EditorGUILayout.PropertyField(m_RestoreOriginalTextOnEscape, new GUIContent("Restore On ESC Key", "Should the original text be restored when pressing ESC.")); + EditorGUILayout.PropertyField(m_HideMobileKeyboard, new GUIContent("Hide Soft Keyboard", "Controls the visibility of the mobile virtual keyboard.")); + EditorGUILayout.PropertyField(m_HideMobileInput, new GUIContent("Hide Mobile Input", "Controls the visibility of the editable text field above the mobile virtual keyboard. Not supported on all mobile platforms.")); + EditorGUILayout.PropertyField(m_ReadOnly); + EditorGUILayout.PropertyField(m_RichText); + EditorGUILayout.PropertyField(m_RichTextEditingAllowed, new GUIContent("Allow Rich Text Editing")); + + EditorGUI.indentLevel--; + } + #endregion + + + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(m_OnValueChanged); + EditorGUILayout.PropertyField(m_OnEndEdit); + EditorGUILayout.PropertyField(m_OnSelect); + EditorGUILayout.PropertyField(m_OnDeselect); + + EditorGUI.EndDisabledGroup(); + + serializedObject.ApplyModifiedProperties(); + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_InputFieldEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_InputFieldEditor.cs.meta new file mode 100644 index 00000000..eeb62d8c --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_InputFieldEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aa160f27c3fe4052a5850e21108811b6 +timeCreated: 1457861621 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_MeshRendererEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_MeshRendererEditor.cs new file mode 100644 index 00000000..83d19f8c --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_MeshRendererEditor.cs @@ -0,0 +1,76 @@ +// When enabled, allows setting the material by dropping a material onto the MeshRenderer inspector component. +// The drawback is that the MeshRenderer inspector will not have properties for light probes, so if you need light probe support, do not enable this. +//#define ALLOW_MESHRENDERER_MATERIAL_DRAG_N_DROP + +using UnityEngine; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + // Disabled for compatibility reason as lightprobe setup isn't supported due to inability to inherit from MeshRendererEditor class +#if ALLOW_MESHRENDERER_MATERIAL_DRAG_N_DROP + [CanEditMultipleObjects] + [CustomEditor(typeof(MeshRenderer))] + public class TMP_MeshRendererEditor : Editor + { + private SerializedProperty m_Materials; + + void OnEnable() + { + m_Materials = serializedObject.FindProperty("m_Materials"); + } + + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + // Get a reference to the current material. + SerializedProperty material_prop = m_Materials.GetArrayElementAtIndex(0); + Material currentMaterial = material_prop.objectReferenceValue as Material; + + EditorGUI.BeginChangeCheck(); + base.OnInspectorGUI(); + if (EditorGUI.EndChangeCheck()) + { + material_prop = m_Materials.GetArrayElementAtIndex(0); + + TMP_FontAsset newFontAsset = null; + Material newMaterial = null; + + if (material_prop != null) + newMaterial = material_prop.objectReferenceValue as Material; + + // Check if the new material is referencing a different font atlas texture. + if (newMaterial != null && currentMaterial.GetInstanceID() != newMaterial.GetInstanceID()) + { + // Search for the Font Asset matching the new font atlas texture. + newFontAsset = TMP_EditorUtility.FindMatchingFontAsset(newMaterial); + } + + + GameObject[] objects = Selection.gameObjects; + + for (int i = 0; i < objects.Length; i++) + { + // Assign new font asset + if (newFontAsset != null) + { + TMP_Text textComponent = objects[i].GetComponent(); + + if (textComponent != null) + { + Undo.RecordObject(textComponent, "Font Asset Change"); + textComponent.font = newFontAsset; + } + } + + TMPro_EventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED(objects[i], currentMaterial, newMaterial); + } + } + } + } +#endif +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_MeshRendererEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_MeshRendererEditor.cs.meta new file mode 100644 index 00000000..d6b133fd --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_MeshRendererEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6d437b997e074079b4b2f6e395394f4b +timeCreated: 1462864011 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PackageUtilities.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PackageUtilities.cs new file mode 100644 index 00000000..5e50d76e --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PackageUtilities.cs @@ -0,0 +1,920 @@ +using UnityEngine; +using UnityEditor; +using System; +using System.IO; +using System.Linq; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using TMPro.EditorUtilities; + + +namespace TMPro +{ + /// + /// Data structure containing the target and replacement fileIDs and GUIDs which will require remapping from previous version of TextMesh Pro to the new TextMesh Pro UPM package. + /// + [System.Serializable] + struct AssetConversionRecord + { + public string referencedResource; + public string target; + public string replacement; + } + + + /// + /// Data structure containing a list of target and replacement fileID and GUID requiring remapping from previous versions of TextMesh Pro to the new TextMesh Pro UPM package. + /// This data structure is populated with the data contained in the PackageConversionData.json file included in the package. + /// + [System.Serializable] + class AssetConversionData + { + public List assetRecords; + } + + + public class TMP_ProjectConversionUtility : EditorWindow + { + // Create Sprite Asset Editor Window + [MenuItem("Window/TextMeshPro/Project Files GUID Remapping Tool", false, 2100)] + static void ShowConverterWindow() + { + var window = GetWindow(); + window.titleContent = new GUIContent("Conversion Tool"); + window.Focus(); + } + + private static HashSet m_IgnoreAssetTypes = new HashSet() + { + typeof(AnimatorOverrideController), + typeof(AudioClip), + typeof(AvatarMask), + typeof(ComputeShader), + typeof(Cubemap), + typeof(DefaultAsset), + typeof(Flare), + typeof(Font), + typeof(GUISkin), + typeof(HumanTemplate), + typeof(LightingDataAsset), + typeof(Mesh), + typeof(MonoScript), + typeof(PhysicMaterial), + typeof(PhysicsMaterial2D), + typeof(RenderTexture), + typeof(Shader), + typeof(TerrainData), + typeof(TextAsset), + typeof(Texture2D), + typeof(Texture2DArray), + typeof(Texture3D), + typeof(UnityEditor.Animations.AnimatorController), + typeof(UnityEditorInternal.AssemblyDefinitionAsset), + typeof(UnityEngine.AI.NavMeshData), + typeof(UnityEngine.Tilemaps.Tile), + typeof(UnityEngine.U2D.SpriteAtlas), + typeof(UnityEngine.Video.VideoClip), + }; + + /// + /// + /// + struct AssetModificationRecord + { + public string assetFilePath; + public string assetDataFile; + } + + struct AssetFileRecord + { + public string assetFilePath; + public string assetMetaFilePath; + + public AssetFileRecord(string filePath, string metaFilePath) + { + this.assetFilePath = filePath; + this.assetMetaFilePath = metaFilePath; + } + } + + private static string m_ProjectPath; + private static string m_ProjectFolderToScan; + private static bool m_IsAlreadyScanningProject; + private static bool m_CancelScanProcess; + private static string k_ProjectScanReportDefaultText = "Project Scan Results\n"; + private static string k_ProjectScanLabelPrefix = "Scanning: "; + private static string m_ProjectScanResults = string.Empty; + private static Vector2 m_ProjectScanResultScrollPosition; + private static float m_ProgressPercentage = 0; + + private static int m_ScanningTotalFiles; + private static int m_RemainingFilesToScan; + private static int m_ScanningCurrentFileIndex; + private static string m_ScanningCurrentFileName; + + private static AssetConversionData m_ConversionData; + + private static List m_ModifiedAssetList = new List(); + + + void OnEnable() + { + // Set Editor Window Size + SetEditorWindowSize(); + + m_ProjectScanResults = k_ProjectScanReportDefaultText; + } + + + void OnGUI() + { + GUILayout.BeginVertical(); + { + // Scan project files and resources + GUILayout.BeginVertical(EditorStyles.helpBox); + { + GUILayout.Label("Scan Project Files", EditorStyles.boldLabel); + GUILayout.Label("Press the Scan Project Files button to begin scanning your project for files & resources that were created with a previous version of TextMesh Pro.", TMP_UIStyleManager.label); + GUILayout.Space(10f); + GUILayout.Label("Project folder to be scanned. Example \"Assets/TextMesh Pro\""); + m_ProjectFolderToScan = EditorGUILayout.TextField("Folder Path: Assets/", m_ProjectFolderToScan); + GUILayout.Space(5f); + + GUI.enabled = m_IsAlreadyScanningProject == false ? true : false; + if (GUILayout.Button("Scan Project Files")) + { + m_CancelScanProcess = false; + + // Make sure Asset Serialization mode is set to ForceText and Version Control mode to Visible Meta Files. + if (CheckProjectSerializationAndSourceControlModes() == true) + { + m_ProjectPath = Path.GetFullPath("Assets/.."); + TMP_EditorCoroutine.StartCoroutine(ScanProjectFiles()); + } + else + { + EditorUtility.DisplayDialog("Project Settings Change Required", "In menu options \"Edit - Project Settings - Editor\", please change Asset Serialization Mode to ForceText and Source Control Mode to Visible Meta Files.", "OK", string.Empty); + } + } + GUI.enabled = true; + + // Display progress bar + Rect rect = GUILayoutUtility.GetRect(0f, 20f, GUILayout.ExpandWidth(true)); + EditorGUI.ProgressBar(rect, m_ProgressPercentage, "Scan Progress (" + m_ScanningCurrentFileIndex + "/" + m_ScanningTotalFiles + ")"); + + // Display cancel button and name of file currently being scanned. + if (m_IsAlreadyScanningProject) + { + Rect cancelRect = new Rect(rect.width - 20, rect.y + 2, 20, 16); + if (GUI.Button(cancelRect, "X")) + { + m_CancelScanProcess = true; + } + GUILayout.Label(k_ProjectScanLabelPrefix + m_ScanningCurrentFileName, TMP_UIStyleManager.label); + } + else + GUILayout.Label(string.Empty); + + GUILayout.Space(5); + + // Creation Feedback + GUILayout.BeginVertical(TMP_UIStyleManager.textAreaBoxWindow, GUILayout.ExpandHeight(true)); + { + m_ProjectScanResultScrollPosition = EditorGUILayout.BeginScrollView(m_ProjectScanResultScrollPosition, GUILayout.ExpandHeight(true)); + EditorGUILayout.LabelField(m_ProjectScanResults, TMP_UIStyleManager.label); + EditorGUILayout.EndScrollView(); + } + GUILayout.EndVertical(); + GUILayout.Space(5f); + } + GUILayout.EndVertical(); + + // Scan project files and resources + GUILayout.BeginVertical(EditorStyles.helpBox); + { + GUILayout.Label("Save Modified Project Files", EditorStyles.boldLabel); + GUILayout.Label("Pressing the Save Modified Project Files button will update the files in the Project Scan Results listed above. Please make sure that you have created a backup of your project first as these file modifications are permanent and cannot be undone.", TMP_UIStyleManager.label); + GUILayout.Space(5f); + + GUI.enabled = m_IsAlreadyScanningProject == false && m_ModifiedAssetList.Count > 0 ? true : false; + if (GUILayout.Button("Save Modified Project Files")) + { + UpdateProjectFiles(); + } + GUILayout.Space(10f); + } + GUILayout.EndVertical(); + + } + GUILayout.EndVertical(); + GUILayout.Space(5f); + } + + void OnInspectorUpdate() + { + Repaint(); + } + + + /// + /// Limits the minimum size of the editor window. + /// + void SetEditorWindowSize() + { + EditorWindow editorWindow = this; + + Vector2 currentWindowSize = editorWindow.minSize; + + editorWindow.minSize = new Vector2(Mathf.Max(640, currentWindowSize.x), Mathf.Max(420, currentWindowSize.y)); + } + + + /// + /// + /// + /// + /// + private static bool ShouldIgnoreFile(string filePath) + { + string fileExtension = Path.GetExtension(filePath); + Type fileType = AssetDatabase.GetMainAssetTypeAtPath(filePath); + + if (m_IgnoreAssetTypes.Contains(fileType)) + return true; + + // Exclude FBX + if (fileType == typeof(GameObject) && fileExtension.ToLower() == ".fbx") { return true; } + return false; + } + + + private IEnumerator ScanProjectFiles() + { + m_IsAlreadyScanningProject = true; + string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; + + // List containing assets that have been modified. + m_ProjectScanResults = k_ProjectScanReportDefaultText; + m_ModifiedAssetList.Clear(); + m_ProgressPercentage = 0; + + // Read Conversion Data from Json file. + if (m_ConversionData == null) + m_ConversionData = JsonUtility.FromJson(File.ReadAllText(packageFullPath + "/PackageConversionData.json")); + + // Get list of GUIDs for assets that might contain references to previous GUIDs that require updating. + string searchFolder = string.IsNullOrEmpty(m_ProjectFolderToScan) ? "Assets" : ("Assets/" + m_ProjectFolderToScan); + string[] guids = AssetDatabase.FindAssets("t:Object", new string[] { searchFolder }).Distinct().ToArray(); + + k_ProjectScanLabelPrefix = "Phase 1 - Filtering: "; + m_ScanningTotalFiles = guids.Length; + m_ScanningCurrentFileIndex = 0; + + List projectFilesToScan = new List(); + + foreach (var guid in guids) + { + if (m_CancelScanProcess) + break; + + string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); + + m_ScanningCurrentFileIndex += 1; + m_ScanningCurrentFileName = assetFilePath; + m_ProgressPercentage = (float)m_ScanningCurrentFileIndex / m_ScanningTotalFiles; + + // Filter out file types we have no interest in searching + if (ShouldIgnoreFile(assetFilePath)) + continue; + + string assetMetaFilePath = AssetDatabase.GetTextMetaFilePathFromAssetPath(assetFilePath); + + projectFilesToScan.Add(new AssetFileRecord(assetFilePath, assetMetaFilePath)); + + yield return null; + } + + m_RemainingFilesToScan = m_ScanningTotalFiles = projectFilesToScan.Count; + + k_ProjectScanLabelPrefix = "Phase 2 - Scanning: "; + + for (int i = 0; i < m_ScanningTotalFiles; i++) + { + if (m_CancelScanProcess) + break; + + AssetFileRecord fileRecord = projectFilesToScan[i]; + + Task.Run(() => + { + ScanProjectFileAsync(fileRecord); + + m_ScanningCurrentFileName = fileRecord.assetFilePath; + + int completedScans = m_ScanningTotalFiles - Interlocked.Decrement(ref m_RemainingFilesToScan); + + m_ScanningCurrentFileIndex = completedScans; + m_ProgressPercentage = (float)completedScans / m_ScanningTotalFiles; + }); + + if (i % 64 == 0) + yield return new WaitForSeconds(2.0f); + + } + + while (m_RemainingFilesToScan > 0 && !m_CancelScanProcess) + yield return null; + + m_IsAlreadyScanningProject = false; + m_ScanningCurrentFileName = string.Empty; + } + + + static void ScanProjectFileAsync(AssetFileRecord fileRecord) + { + if (m_CancelScanProcess) + return; + + // Read the asset data file + string assetDataFile = string.Empty; + bool hasFileChanged = false; + + try + { + assetDataFile = File.ReadAllText(m_ProjectPath + "/" + fileRecord.assetFilePath); + } + catch + { + // Continue to the next asset if we can't read the current one. + return; + } + + // Read the asset meta data file + string assetMetaFile = File.ReadAllText(m_ProjectPath + "/" + fileRecord.assetMetaFilePath); + bool hasMetaFileChanges = false; + + foreach (AssetConversionRecord record in m_ConversionData.assetRecords) + { + if (assetDataFile.Contains(record.target)) + { + hasFileChanged = true; + + assetDataFile = assetDataFile.Replace(record.target, record.replacement); + } + + //// Check meta file + if (assetMetaFile.Contains(record.target)) + { + hasMetaFileChanges = true; + + assetMetaFile = assetMetaFile.Replace(record.target, record.replacement); + } + } + + if (hasFileChanged) + { + AssetModificationRecord modifiedAsset; + modifiedAsset.assetFilePath = fileRecord.assetFilePath; + modifiedAsset.assetDataFile = assetDataFile; + + m_ModifiedAssetList.Add(modifiedAsset); + + m_ProjectScanResults += fileRecord.assetFilePath + "\n"; + } + + if (hasMetaFileChanges) + { + AssetModificationRecord modifiedAsset; + modifiedAsset.assetFilePath = fileRecord.assetMetaFilePath; + modifiedAsset.assetDataFile = assetMetaFile; + + m_ModifiedAssetList.Add(modifiedAsset); + + m_ProjectScanResults += fileRecord.assetMetaFilePath + "\n"; + } + } + + + /// + /// + /// + private static void ResetScanProcess() + { + m_IsAlreadyScanningProject = false; + m_ScanningCurrentFileName = string.Empty; + m_ProgressPercentage = 0; + m_ScanningCurrentFileIndex = 0; + m_ScanningTotalFiles = 0; + } + + + /// + /// + /// + private static void UpdateProjectFiles() + { + // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. + CheckProjectSerializationAndSourceControlModes(); + + string projectPath = Path.GetFullPath("Assets/.."); + + // Display dialogue to show user a list of project files that will be modified upon their consent. + if (EditorUtility.DisplayDialog("Save Modified Asset(s)?", "Are you sure you want to save all modified assets?", "YES", "NO")) + { + for (int i = 0; i < m_ModifiedAssetList.Count; i++) + { + // Make sure all file streams that might have been opened by Unity are closed. + //AssetDatabase.ReleaseCachedFileHandles(); + + //Debug.Log("Writing asset file [" + m_ModifiedAssetList[i].assetFilePath + "]."); + + File.WriteAllText(projectPath + "/" + m_ModifiedAssetList[i].assetFilePath, m_ModifiedAssetList[i].assetDataFile); + } + } + + AssetDatabase.Refresh(); + + m_ProgressPercentage = 0; + m_ProjectScanResults = k_ProjectScanReportDefaultText; + } + + + /// + /// Check project Asset Serialization and Source Control modes + /// + private static bool CheckProjectSerializationAndSourceControlModes() + { + // Check Project Asset Serialization and Visible Meta Files mode. + if (EditorSettings.serializationMode != SerializationMode.ForceText || EditorSettings.externalVersionControl != "Visible Meta Files") + { + return false; + } + + return true; + } + } + + + + public class TMP_PackageUtilities : Editor + { + + enum SaveAssetDialogueOptions { Unset = 0, Save = 1, SaveAll = 2, DoNotSave = 3 }; + + private static SerializationMode m_ProjectAssetSerializationMode; + private static string m_ProjectExternalVersionControl; + + struct AssetRemappingRecord + { + public string oldGuid; + public string newGuid; + public string assetPath; + } + + struct AssetModificationRecord + { + public string assetFilePath; + public string assetDataFile; + } + + // Create Sprite Asset Editor Window + //[MenuItem("Window/TextMeshPro/Generate New Package GUIDs", false, 1500)] + public static void GenerateNewPackageGUIDs_Menu() + { + GenerateNewPackageGUIDs(); + } + + + /// + /// + /// + [MenuItem("Window/TextMeshPro/Import TMP Essential Resources", false, 2050)] + public static void ImportProjectResourcesMenu() + { + ImportProjectResources(); + } + + + /// + /// + /// + [MenuItem("Window/TextMeshPro/Import TMP Examples and Extras", false, 2051)] + public static void ImportExamplesContentMenu() + { + ImportExtraContent(); + } + + + // Create Sprite Asset Editor Window + //[MenuItem("Window/TextMeshPro/Convert TMP Project Files to UPM", false, 1510)] + public static void ConvertProjectGUIDsMenu() + { + ConvertProjectGUIDsToUPM(); + + //GetVersionInfo(); + } + + + // Create Sprite Asset Editor Window + //[MenuItem("Window/TextMeshPro/Convert GUID (Source to DLL)", false, 2010)] + public static void ConvertGUIDFromSourceToDLLMenu() + { + //ConvertGUIDFromSourceToDLL(); + + //GetVersionInfo(); + } + + + // Create Sprite Asset Editor Window + //[MenuItem("Window/TextMeshPro/Convert GUID (DLL to Source)", false, 2020)] + public static void ConvertGUIDFromDllToSourceMenu() + { + //ConvertGUIDFromDLLToSource(); + + //GetVersionInfo(); + } + + + // Create Sprite Asset Editor Window + //[MenuItem("Window/TextMeshPro/Extract Package GUIDs", false, 1530)] + public static void ExtractPackageGUIDMenu() + { + ExtractPackageGUIDs(); + } + + + private static void GetVersionInfo() + { + string version = TMP_Settings.version; + Debug.Log("The version of this TextMesh Pro UPM package is (" + version + ")."); + } + + + /// + /// + /// + private static void ImportExtraContent() + { + string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; + + AssetDatabase.ImportPackage(packageFullPath + "/Package Resources/TMP Examples & Extras.unitypackage", true); + } + + + /// + /// + /// + private static void ImportProjectResources() + { + string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; + + AssetDatabase.ImportPackage(packageFullPath + "/Package Resources/TMP Essential Resources.unitypackage", true); + } + + + /// + /// + /// + private static void GenerateNewPackageGUIDs() + { + // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. + SetProjectSerializationAndSourceControlModes(); + + string projectPath = Path.GetFullPath("Assets/.."); + + // Clear existing dictionary of AssetRecords + List assetRecords = new List(); + + // Get full list of GUIDs used in the package which including folders. + string[] packageGUIDs = AssetDatabase.FindAssets("t:Object", new string[] { "Assets/Packages/com.unity.TextMeshPro" }); + + for (int i = 0; i < packageGUIDs.Length; i++) + { + // Could add a progress bar for this process (if needed) + + string guid = packageGUIDs[i]; + string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); + string assetMetaFilePath = AssetDatabase.GetTextMetaFilePathFromAssetPath(assetFilePath); + //System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetFilePath); + + AssetRemappingRecord assetRecord; + assetRecord.oldGuid = guid; + assetRecord.assetPath = assetFilePath; + + string newGUID = GenerateUniqueGUID(); + + assetRecord.newGuid = newGUID; + + if (assetRecords.FindIndex(item => item.oldGuid == guid) != -1) + continue; + + assetRecords.Add(assetRecord); + + // Read the meta file for the given asset. + string assetMetaFile = File.ReadAllText(projectPath + "/" + assetMetaFilePath); + + assetMetaFile = assetMetaFile.Replace("guid: " + guid, "guid: " + newGUID); + + File.WriteAllText(projectPath + "/" + assetMetaFilePath, assetMetaFile); + + //Debug.Log("Asset: [" + assetFilePath + "] Type: " + assetType + " Current GUID: [" + guid + "] New GUID: [" + newGUID + "]"); + } + + AssetDatabase.Refresh(); + + // Get list of GUIDs for assets that might need references to previous GUIDs which need to be updated. + packageGUIDs = AssetDatabase.FindAssets("t:Object"); // ("t:Object", new string[] { "Assets/Asset Importer" }); + + for (int i = 0; i < packageGUIDs.Length; i++) + { + // Could add a progress bar for this process + + string guid = packageGUIDs[i]; + string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); + System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetFilePath); + + // Filter out file types we are not interested in + if (assetType == typeof(DefaultAsset) || assetType == typeof(MonoScript) || assetType == typeof(Texture2D) || assetType == typeof(TextAsset) || assetType == typeof(Shader)) + continue; + + // Read the asset data file + string assetDataFile = File.ReadAllText(projectPath + "/" + assetFilePath); + + //Debug.Log("Searching Asset: [" + assetFilePath + "] of type: " + assetType); + + bool hasFileChanged = false; + + foreach (AssetRemappingRecord record in assetRecords) + { + if (assetDataFile.Contains(record.oldGuid)) + { + hasFileChanged = true; + + assetDataFile = assetDataFile.Replace(record.oldGuid, record.newGuid); + + Debug.Log("Replacing old GUID: [" + record.oldGuid + "] by new GUID: [" + record.newGuid + "] in asset file: [" + assetFilePath + "]."); + } + } + + if (hasFileChanged) + { + // Add file to list of changed files + File.WriteAllText(projectPath + "/" + assetFilePath, assetDataFile); + } + + } + + AssetDatabase.Refresh(); + + // Restore project Asset Serialization and Source Control modes. + RestoreProjectSerializationAndSourceControlModes(); + } + + + private static void ExtractPackageGUIDs() + { + // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. + SetProjectSerializationAndSourceControlModes(); + + string projectPath = Path.GetFullPath("Assets/.."); + + // Create new instance of AssetConversionData file + AssetConversionData data = new AssetConversionData(); + data.assetRecords = new List(); + + // Get full list of GUIDs used in the package which including folders. + string[] packageGUIDs = AssetDatabase.FindAssets("t:Object", new string[] { "Assets/Packages/com.unity.TextMeshPro" }); + + for (int i = 0; i < packageGUIDs.Length; i++) + { + // Could add a progress bar for this process (if needed) + + string guid = packageGUIDs[i]; + string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); + //string assetMetaFilePath = AssetDatabase.GetTextMetaFilePathFromAssetPath(assetFilePath); + + //ObjectIdentifier[] localIdentifider = BundleBuildInterface.GetPlayerObjectIdentifiersInAsset(new GUID(guid), BuildTarget.NoTarget); + //System.Type[] types = BundleBuildInterface.GetTypeForObjects(localIdentifider); + + System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetFilePath); + + // Filter out file types we are not interested in + if (assetType == typeof(DefaultAsset)) + continue; + + string newGuid = GenerateUniqueGUID(); + + AssetConversionRecord record; + record.referencedResource = Path.GetFileName(assetFilePath); + record.target = "fileID: 2108210716, guid: " + newGuid; + + record.replacement = "fileID: 11500000, guid: " + guid; + + //if (m_AssetRecords.FindIndex(item => item.oldGuid == guid) != -1) + // continue; + + data.assetRecords.Add(record); + + // Read the meta file for the given asset. + //string assetMetaFile = File.ReadAllText(projectPath + "/" + assetMetaFilePath); + + //assetMetaFile = assetMetaFile.Replace("guid: " + guid, "guid: " + newGUID); + + //File.WriteAllText(projectPath + "/" + assetMetaFilePath, assetMetaFile); + + Debug.Log("Asset: [" + Path.GetFileName(assetFilePath) + "] Type: " + assetType + " Current GUID: [" + guid + "] New GUID: [" + newGuid + "]"); + } + + // Write new information into JSON file + string dataFile = JsonUtility.ToJson(data, true); + + File.WriteAllText(projectPath + "/Assets/Packages/com.unity.TextMeshPro/PackageConversionData.json", dataFile); + + // Restore project Asset Serialization and Source Control modes. + RestoreProjectSerializationAndSourceControlModes(); + } + + + /// + /// + /// + private static void ConvertProjectGUIDsToUPM() + { + // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. + SetProjectSerializationAndSourceControlModes(); + + string projectPath = Path.GetFullPath("Assets/.."); + string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; + + // List containing assets that have been modified. + List modifiedAssetList = new List(); + + // Read Conversion Data from Json file. + AssetConversionData conversionData = JsonUtility.FromJson(File.ReadAllText(packageFullPath + "/PackageConversionData.json")); + + // Get list of GUIDs for assets that might contain references to previous GUIDs that require updating. + string[] projectGUIDs = AssetDatabase.FindAssets("t:Object"); + + for (int i = 0; i < projectGUIDs.Length; i++) + { + // Could add a progress bar for this process + + string guid = projectGUIDs[i]; + string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); + System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetFilePath); + + // Filter out file types we are not interested in + if (assetType == typeof(DefaultAsset) || assetType == typeof(MonoScript) || assetType == typeof(Texture2D) || assetType == typeof(TextAsset) || assetType == typeof(Shader)) + continue; + + // Read the asset data file + string assetDataFile = File.ReadAllText(projectPath + "/" + assetFilePath); + + //Debug.Log("Searching Asset: [" + assetFilePath + "] of type: " + assetType); + + bool hasFileChanged = false; + + foreach (AssetConversionRecord record in conversionData.assetRecords) + { + if (assetDataFile.Contains(record.target)) + { + hasFileChanged = true; + + assetDataFile = assetDataFile.Replace(record.target, record.replacement); + + Debug.Log("Replacing Reference to [" + record.referencedResource + "] using [" + record.target + "] with [" + record.replacement + "] in asset file: [" + assetFilePath + "]."); + } + } + + if (hasFileChanged) + { + Debug.Log("Adding [" + assetFilePath + "] to list of assets to be modified."); + + AssetModificationRecord modifiedAsset; + modifiedAsset.assetFilePath = assetFilePath; + modifiedAsset.assetDataFile = assetDataFile; + + modifiedAssetList.Add(modifiedAsset); + } + + } + + // Scan project meta files to update GUIDs of assets whose GUID has changed. + projectGUIDs = AssetDatabase.FindAssets("t:Object"); + + for (int i = 0; i < projectGUIDs.Length; i++) + { + string guid = projectGUIDs[i]; + string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); + string assetMetaFilePath = AssetDatabase.GetTextMetaFilePathFromAssetPath(assetFilePath); + + // Read the asset meta data file + string assetMetaFile = File.ReadAllText(projectPath + "/" + assetMetaFilePath); + + bool hasFileChanged = false; + + foreach (AssetConversionRecord record in conversionData.assetRecords) + { + if (assetMetaFile.Contains(record.target)) + { + hasFileChanged = true; + + assetMetaFile = assetMetaFile.Replace(record.target, record.replacement); + + Debug.Log("Replacing Reference to [" + record.referencedResource + "] using [" + record.target + "] with [" + record.replacement + "] in asset file: [" + assetMetaFilePath + "]."); + } + } + + if (hasFileChanged) + { + Debug.Log("Adding [" + assetMetaFilePath + "] to list of meta files to be modified."); + + AssetModificationRecord modifiedAsset; + modifiedAsset.assetFilePath = assetMetaFilePath; + modifiedAsset.assetDataFile = assetMetaFile; + + modifiedAssetList.Add(modifiedAsset); + } + } + + // Display dialogue to show user a list of project files that will be modified upon their consent. + if (EditorUtility.DisplayDialog("Save Modified Asset(s)?", "Are you sure you want to save all modified assets?", "YES", "NO")) + { + for (int i = 0; i < modifiedAssetList.Count; i++) + { + // Make sure all file streams that might have been opened by Unity are closed. + //AssetDatabase.ReleaseCachedFileHandles(); + + Debug.Log("Writing asset file [" + modifiedAssetList[i].assetFilePath + "]."); + + //File.WriteAllText(projectPath + "/" + modifiedAssetList[i].assetFilePath, modifiedAssetList[i].assetDataFile); + } + + } + + AssetDatabase.Refresh(); + + // Restore project Asset Serialization and Source Control modes. + RestoreProjectSerializationAndSourceControlModes(); + } + + + /// + /// + /// + /// + private static string GenerateUniqueGUID() + { + string monoGuid = System.Guid.NewGuid().ToString(); + + char[] charGuid = new char[32]; + int index = 0; + for (int i = 0; i < monoGuid.Length; i++) + { + if (monoGuid[i] != '-') + charGuid[index++] = monoGuid[i]; + } + + string guid = new string(charGuid); + + // Make sure new GUID is not already used by some other asset. + if (AssetDatabase.GUIDToAssetPath(guid) != string.Empty) + guid = GenerateUniqueGUID(); + + return guid; + } + + + /// + /// Change project asset serialization mode to ForceText (if necessary) + /// + private static void SetProjectSerializationAndSourceControlModes() + { + // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. + m_ProjectAssetSerializationMode = EditorSettings.serializationMode; + if (m_ProjectAssetSerializationMode != SerializationMode.ForceText) + UnityEditor.EditorSettings.serializationMode = SerializationMode.ForceText; + + m_ProjectExternalVersionControl = EditorSettings.externalVersionControl; + if (m_ProjectExternalVersionControl != "Visible Meta Files") + UnityEditor.EditorSettings.externalVersionControl = "Visible Meta Files"; + } + + + /// + /// Revert potential change to asset serialization mode (if necessary) + /// + private static void RestoreProjectSerializationAndSourceControlModes() + { + // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. + if (m_ProjectAssetSerializationMode != EditorSettings.serializationMode) + EditorSettings.serializationMode = m_ProjectAssetSerializationMode; + + if (m_ProjectExternalVersionControl != EditorSettings.externalVersionControl) + EditorSettings.externalVersionControl = m_ProjectExternalVersionControl; + } + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PackageUtilities.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PackageUtilities.cs.meta new file mode 100644 index 00000000..e03778cc --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PackageUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 68eedd4e5b33b37429c02c4add0036fe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PostBuildProcessHandler.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PostBuildProcessHandler.cs new file mode 100644 index 00000000..a8b800ac --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PostBuildProcessHandler.cs @@ -0,0 +1,63 @@ +using UnityEngine; +using UnityEditor; +using UnityEditor.Callbacks; +using System.IO; + + +namespace TMPro +{ + public class TMP_PostBuildProcessHandler + { + [PostProcessBuildAttribute(10000)] + public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) + { + // Check if TMP Essential Resource are present in user project. + if (target == BuildTarget.iOS && File.Exists(GetEssentialProjectResourcesPath() + "/Resources/TMP Settings.asset") && TMP_Settings.enableEmojiSupport) + { + string file = Path.Combine(pathToBuiltProject, "Classes/UI/Keyboard.mm"); + string content = File.ReadAllText(file); + content = content.Replace("FILTER_EMOJIS_IOS_KEYBOARD 1", "FILTER_EMOJIS_IOS_KEYBOARD 0"); + File.WriteAllText(file, content); + } + } + + + private static string GetEssentialProjectResourcesPath() + { + // Find the potential location of the TextMesh Pro folder in the user project. + string projectPath = Path.GetFullPath("Assets/.."); + if (Directory.Exists(projectPath)) + { + // Search for default location of TMP Essential Resources + if (Directory.Exists(projectPath + "/Assets/TextMesh Pro/Resources")) + { + return "Assets/TextMesh Pro"; + } + + // Search for potential alternative locations in the user project + string[] matchingPaths = Directory.GetDirectories(projectPath, "TextMesh Pro", SearchOption.AllDirectories); + projectPath = ValidateLocation(matchingPaths, projectPath); + if (projectPath != null) return projectPath; + } + + return null; + } + + + private static string ValidateLocation(string[] paths, string projectPath) + { + for (int i = 0; i < paths.Length; i++) + { + // Check if any of the matching directories contain a GUISkins directory. + if (Directory.Exists(paths[i] + "/Resources")) + { + string folderPath = paths[i].Replace(projectPath, ""); + folderPath = folderPath.TrimStart('\\', '/'); + return folderPath; + } + } + + return null; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta new file mode 100644 index 00000000..af212b86 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6fdea2af3daa40fe8f88e5e9cfc17abb +timeCreated: 1479886230 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ProjectTextSettings.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ProjectTextSettings.cs new file mode 100644 index 00000000..b8695be2 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ProjectTextSettings.cs @@ -0,0 +1,43 @@ +#if !UNITY_2018_3_OR_NEWER +using UnityEditor; + +namespace TMPro +{ + + public static class TMP_ProjectTextSettings + { + // Open Project Text Settings + [MenuItem("Edit/Project Settings/TextMeshPro Settings", false, 309)] + public static void SelectProjectTextSettings() + { + TMP_Settings textSettings = TMP_Settings.instance; + + if (textSettings) + { + Selection.activeObject = textSettings; + + // TODO: Do we want to ping the Project Text Settings asset in the Project Inspector + EditorUtility.FocusProjectWindow(); + EditorGUIUtility.PingObject(textSettings); + } + else + TMPro_EventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED); + } + + + // Event received when TMP resources have been loaded. + static void ON_RESOURCES_LOADED() + { + TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); + + TMP_Settings textSettings = TMP_Settings.instance; + + Selection.activeObject = textSettings; + + // TODO: Do we want to ping the Project Text Settings asset in the Project Inspector + EditorUtility.FocusProjectWindow(); + EditorGUIUtility.PingObject(textSettings); + } + } +} +#endif \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ProjectTextSettings.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ProjectTextSettings.cs.meta new file mode 100644 index 00000000..6d194543 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ProjectTextSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0e751e877ed14d71a6b8e63ac54949cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ResourcesLoader.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ResourcesLoader.cs new file mode 100644 index 00000000..090bd774 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ResourcesLoader.cs @@ -0,0 +1,68 @@ +using UnityEditor; +using UnityEngine; +using System.Collections; + +namespace TMPro.EditorUtilities +{ + + //[InitializeOnLoad] + class TMP_ResourcesLoader + { + + /// + /// Function to pre-load the TMP Resources + /// + public static void LoadTextMeshProResources() + { + //TMP_Settings.LoadDefaultSettings(); + //TMP_StyleSheet.LoadDefaultStyleSheet(); + } + + + static TMP_ResourcesLoader() + { + //Debug.Log("Loading TMP Resources..."); + + // Get current targetted platform + + + //string Settings = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone); + //TMPro.TMP_Settings.LoadDefaultSettings(); + //TMPro.TMP_StyleSheet.LoadDefaultStyleSheet(); + } + + + + //[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] + //static void OnBeforeSceneLoaded() + //{ + //Debug.Log("Before scene is loaded."); + + // //TMPro.TMP_Settings.LoadDefaultSettings(); + // //TMPro.TMP_StyleSheet.LoadDefaultStyleSheet(); + + // //ShaderVariantCollection collection = new ShaderVariantCollection(); + // //Shader s0 = Shader.Find("TextMeshPro/Mobile/Distance Field"); + // //ShaderVariantCollection.ShaderVariant tmp_Variant = new ShaderVariantCollection.ShaderVariant(s0, UnityEngine.Rendering.PassType.Normal, string.Empty); + + // //collection.Add(tmp_Variant); + // //collection.WarmUp(); + //} + + } + + //static class TMP_ProjectSettings + //{ + // [InitializeOnLoadMethod] + // static void SetProjectDefineSymbols() + // { + // string currentBuildSettings = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); + + // //Check for and inject TMP_INSTALLED + // if (!currentBuildSettings.Contains("TMP_PRESENT")) + // { + // PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, currentBuildSettings + ";TMP_PRESENT"); + // } + // } + //} +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ResourcesLoader.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ResourcesLoader.cs.meta new file mode 100644 index 00000000..8b322e2f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_ResourcesLoader.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7241c7dc25374fc1a6ab3ef9da79c363 +timeCreated: 1465441092 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SDFShaderGUI.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SDFShaderGUI.cs new file mode 100644 index 00000000..2728f26f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SDFShaderGUI.cs @@ -0,0 +1,442 @@ +using UnityEngine; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + public class TMP_SDFShaderGUI : TMP_BaseShaderGUI + { + static ShaderFeature s_OutlineFeature, s_UnderlayFeature, s_BevelFeature, s_GlowFeature, s_MaskFeature; + + static bool s_Face = true, s_Outline = true, s_Underlay, s_Lighting, s_Glow, s_Bevel, s_Light, s_Bump, s_Env; + + static string[] + s_FaceUvSpeedNames = { "_FaceUVSpeedX", "_FaceUVSpeedY" }, + s_OutlineUvSpeedNames = { "_OutlineUVSpeedX", "_OutlineUVSpeedY" }; + + static TMP_SDFShaderGUI() + { + s_OutlineFeature = new ShaderFeature() + { + undoLabel = "Outline", + keywords = new[] { "OUTLINE_ON" } + }; + + s_UnderlayFeature = new ShaderFeature() + { + undoLabel = "Underlay", + keywords = new[] { "UNDERLAY_ON", "UNDERLAY_INNER" }, + label = new GUIContent("Underlay Type"), + keywordLabels = new[] + { + new GUIContent("None"), new GUIContent("Normal"), new GUIContent("Inner") + } + }; + + s_BevelFeature = new ShaderFeature() + { + undoLabel = "Bevel", + keywords = new[] { "BEVEL_ON" } + }; + + s_GlowFeature = new ShaderFeature() + { + undoLabel = "Glow", + keywords = new[] { "GLOW_ON" } + }; + + s_MaskFeature = new ShaderFeature() + { + undoLabel = "Mask", + keywords = new[] { "MASK_HARD", "MASK_SOFT" }, + label = new GUIContent("Mask"), + keywordLabels = new[] + { + new GUIContent("Mask Off"), new GUIContent("Mask Hard"), new GUIContent("Mask Soft") + } + }; + } + + protected override void DoGUI() + { + s_Face = BeginPanel("Face", s_Face); + if (s_Face) + { + DoFacePanel(); + } + + EndPanel(); + + s_Outline = m_Material.HasProperty(ShaderUtilities.ID_OutlineTex) ? BeginPanel("Outline", s_Outline) : BeginPanel("Outline", s_OutlineFeature, s_Outline); + if (s_Outline) + { + DoOutlinePanel(); + } + + EndPanel(); + + if (m_Material.HasProperty(ShaderUtilities.ID_UnderlayColor)) + { + s_Underlay = BeginPanel("Underlay", s_UnderlayFeature, s_Underlay); + if (s_Underlay) + { + DoUnderlayPanel(); + } + + EndPanel(); + } + + if (m_Material.HasProperty("_SpecularColor")) + { + s_Lighting = BeginPanel("Lighting", s_BevelFeature, s_Lighting); + if (s_Lighting) + { + s_Bevel = BeginPanel("Bevel", s_Bevel); + if (s_Bevel) + { + DoBevelPanel(); + } + + EndPanel(); + + s_Light = BeginPanel("Local Lighting", s_Light); + if (s_Light) + { + DoLocalLightingPanel(); + } + + EndPanel(); + + s_Bump = BeginPanel("Bump Map", s_Bump); + if (s_Bump) + { + DoBumpMapPanel(); + } + + EndPanel(); + + s_Env = BeginPanel("Environment Map", s_Env); + if (s_Env) + { + DoEnvMapPanel(); + } + + EndPanel(); + } + + EndPanel(); + } + else if (m_Material.HasProperty("_SpecColor")) + { + s_Bevel = BeginPanel("Bevel", s_Bevel); + if (s_Bevel) + { + DoBevelPanel(); + } + + EndPanel(); + + s_Light = BeginPanel("Surface Lighting", s_Light); + if (s_Light) + { + DoSurfaceLightingPanel(); + } + + EndPanel(); + + s_Bump = BeginPanel("Bump Map", s_Bump); + if (s_Bump) + { + DoBumpMapPanel(); + } + + EndPanel(); + + s_Env = BeginPanel("Environment Map", s_Env); + if (s_Env) + { + DoEnvMapPanel(); + } + + EndPanel(); + } + + if (m_Material.HasProperty(ShaderUtilities.ID_GlowColor)) + { + s_Glow = BeginPanel("Glow", s_GlowFeature, s_Glow); + if (s_Glow) + { + DoGlowPanel(); + } + + EndPanel(); + } + + s_DebugExtended = BeginPanel("Debug Settings", s_DebugExtended); + if (s_DebugExtended) + { + DoDebugPanel(); + } + + EndPanel(); + } + + void DoFacePanel() + { + EditorGUI.indentLevel += 1; + DoColor("_FaceColor", "Color"); + if (m_Material.HasProperty(ShaderUtilities.ID_FaceTex)) + { + if (m_Material.HasProperty("_FaceUVSpeedX")) + { + DoTexture2D("_FaceTex", "Texture", true, s_FaceUvSpeedNames); + } + else + { + DoTexture2D("_FaceTex", "Texture", true); + } + } + + DoSlider("_OutlineSoftness", "Softness"); + DoSlider("_FaceDilate", "Dilate"); + if (m_Material.HasProperty(ShaderUtilities.ID_Shininess)) + { + DoSlider("_FaceShininess", "Gloss"); + } + + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoOutlinePanel() + { + EditorGUI.indentLevel += 1; + DoColor("_OutlineColor", "Color"); + if (m_Material.HasProperty(ShaderUtilities.ID_OutlineTex)) + { + if (m_Material.HasProperty("_OutlineUVSpeedX")) + { + DoTexture2D("_OutlineTex", "Texture", true, s_OutlineUvSpeedNames); + } + else + { + DoTexture2D("_OutlineTex", "Texture", true); + } + } + + DoSlider("_OutlineWidth", "Thickness"); + if (m_Material.HasProperty("_OutlineShininess")) + { + DoSlider("_OutlineShininess", "Gloss"); + } + + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoUnderlayPanel() + { + EditorGUI.indentLevel += 1; + s_UnderlayFeature.DoPopup(m_Editor, m_Material); + DoColor("_UnderlayColor", "Color"); + DoSlider("_UnderlayOffsetX", "Offset X"); + DoSlider("_UnderlayOffsetY", "Offset Y"); + DoSlider("_UnderlayDilate", "Dilate"); + DoSlider("_UnderlaySoftness", "Softness"); + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + static GUIContent[] s_BevelTypeLabels = + { + new GUIContent("Outer Bevel"), + new GUIContent("Inner Bevel") + }; + + void DoBevelPanel() + { + EditorGUI.indentLevel += 1; + DoPopup("_ShaderFlags", "Type", s_BevelTypeLabels); + DoSlider("_Bevel", "Amount"); + DoSlider("_BevelOffset", "Offset"); + DoSlider("_BevelWidth", "Width"); + DoSlider("_BevelRoundness", "Roundness"); + DoSlider("_BevelClamp", "Clamp"); + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoLocalLightingPanel() + { + EditorGUI.indentLevel += 1; + DoSlider("_LightAngle", "Light Angle"); + DoColor("_SpecularColor", "Specular Color"); + DoSlider("_SpecularPower", "Specular Power"); + DoSlider("_Reflectivity", "Reflectivity Power"); + DoSlider("_Diffuse", "Diffuse Shadow"); + DoSlider("_Ambient", "Ambient Shadow"); + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoSurfaceLightingPanel() + { + EditorGUI.indentLevel += 1; + DoColor("_SpecColor", "Specular Color"); + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoBumpMapPanel() + { + EditorGUI.indentLevel += 1; + DoTexture2D("_BumpMap", "Texture"); + DoSlider("_BumpFace", "Face"); + DoSlider("_BumpOutline", "Outline"); + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoEnvMapPanel() + { + EditorGUI.indentLevel += 1; + DoColor("_ReflectFaceColor", "Face Color"); + DoColor("_ReflectOutlineColor", "Outline Color"); + DoCubeMap("_Cube", "Texture"); + DoVector3("_EnvMatrixRotation", "Rotation"); + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoGlowPanel() + { + EditorGUI.indentLevel += 1; + DoColor("_GlowColor", "Color"); + DoSlider("_GlowOffset", "Offset"); + DoSlider("_GlowInner", "Inner"); + DoSlider("_GlowOuter", "Outer"); + DoSlider("_GlowPower", "Power"); + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoDebugPanel() + { + EditorGUI.indentLevel += 1; + DoTexture2D("_MainTex", "Font Atlas"); + DoFloat("_GradientScale", "Gradient Scale"); + DoFloat("_TextureWidth", "Texture Width"); + DoFloat("_TextureHeight", "Texture Height"); + EditorGUILayout.Space(); + DoFloat("_ScaleX", "Scale X"); + DoFloat("_ScaleY", "Scale Y"); + + if (m_Material.HasProperty(ShaderUtilities.ID_Sharpness)) + DoSlider("_Sharpness", "Sharpness"); + + DoSlider("_PerspectiveFilter", "Perspective Filter"); + EditorGUILayout.Space(); + DoFloat("_VertexOffsetX", "Offset X"); + DoFloat("_VertexOffsetY", "Offset Y"); + + if (m_Material.HasProperty(ShaderUtilities.ID_MaskCoord)) + { + EditorGUILayout.Space(); + s_MaskFeature.ReadState(m_Material); + s_MaskFeature.DoPopup(m_Editor, m_Material); + if (s_MaskFeature.Active) + { + DoMaskSubgroup(); + } + + EditorGUILayout.Space(); + DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels); + } + else if (m_Material.HasProperty("_MaskTex")) + { + DoMaskTexSubgroup(); + } + else if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX)) + { + EditorGUILayout.Space(); + DoFloat("_MaskSoftnessX", "Softness X"); + DoFloat("_MaskSoftnessY", "Softness Y"); + DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels); + } + + if (m_Material.HasProperty(ShaderUtilities.ID_StencilID)) + { + EditorGUILayout.Space(); + DoFloat("_Stencil", "Stencil ID"); + DoFloat("_StencilComp", "Stencil Comp"); + } + + EditorGUILayout.Space(); + + EditorGUI.BeginChangeCheck(); + bool useRatios = EditorGUILayout.Toggle("Use Ratios", !m_Material.IsKeywordEnabled("RATIOS_OFF")); + if (EditorGUI.EndChangeCheck()) + { + m_Editor.RegisterPropertyChangeUndo("Use Ratios"); + if (useRatios) + { + m_Material.DisableKeyword("RATIOS_OFF"); + } + else + { + m_Material.EnableKeyword("RATIOS_OFF"); + } + } + + EditorGUI.BeginDisabledGroup(true); + DoFloat("_ScaleRatioA", "Scale Ratio A"); + DoFloat("_ScaleRatioB", "Scale Ratio B"); + DoFloat("_ScaleRatioC", "Scale Ratio C"); + EditorGUI.EndDisabledGroup(); + EditorGUI.indentLevel -= 1; + EditorGUILayout.Space(); + } + + void DoMaskSubgroup() + { + DoVector("_MaskCoord", "Mask Bounds", s_XywhVectorLabels); + if (Selection.activeGameObject != null) + { + Renderer renderer = Selection.activeGameObject.GetComponent(); + if (renderer != null) + { + Rect rect = EditorGUILayout.GetControlRect(); + rect.x += EditorGUIUtility.labelWidth; + rect.width -= EditorGUIUtility.labelWidth; + if (GUI.Button(rect, "Match Renderer Bounds")) + { + FindProperty("_MaskCoord", m_Properties).vectorValue = new Vector4( + 0, + 0, + Mathf.Round(renderer.bounds.extents.x * 1000) / 1000, + Mathf.Round(renderer.bounds.extents.y * 1000) / 1000 + ); + } + } + } + + if (s_MaskFeature.State == 1) + { + DoFloat("_MaskSoftnessX", "Softness X"); + DoFloat("_MaskSoftnessY", "Softness Y"); + } + } + + void DoMaskTexSubgroup() + { + EditorGUILayout.Space(); + DoTexture2D("_MaskTex", "Mask Texture"); + DoToggle("_MaskInverse", "Inverse Mask"); + DoColor("_MaskEdgeColor", "Edge Color"); + DoSlider("_MaskEdgeSoftness", "Edge Softness"); + DoSlider("_MaskWipeControl", "Wipe Position"); + DoFloat("_MaskSoftnessX", "Softness X"); + DoFloat("_MaskSoftnessY", "Softness Y"); + DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels); + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SDFShaderGUI.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SDFShaderGUI.cs.meta new file mode 100644 index 00000000..c643afa1 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SDFShaderGUI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8413ca0e506d42a1a4bd9769f204ad16 +timeCreated: 1469844718 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SerializedPropertyHolder.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SerializedPropertyHolder.cs new file mode 100644 index 00000000..2ba34d69 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SerializedPropertyHolder.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using UnityEditor; + +namespace TMPro +{ + class TMP_SerializedPropertyHolder : ScriptableObject + { + public TMP_FontAsset fontAsset; + public uint firstCharacter; + public uint secondCharacter; + + public TMP_GlyphPairAdjustmentRecord glyphPairAdjustmentRecord = new TMP_GlyphPairAdjustmentRecord(new TMP_GlyphAdjustmentRecord(), new TMP_GlyphAdjustmentRecord()); + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta new file mode 100644 index 00000000..cde31db9 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c4a050f089abb04ebd4125e419f4548 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SettingsEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SettingsEditor.cs new file mode 100644 index 00000000..571c9cd3 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SettingsEditor.cs @@ -0,0 +1,341 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using UnityEditorInternal; + +#pragma warning disable 0414 // Disabled a few warnings for not yet implemented features. + +namespace TMPro.EditorUtilities +{ + [CustomEditor(typeof(TMP_Settings))] + public class TMP_SettingsEditor : Editor + { + internal class Styles + { + public static readonly GUIContent defaultFontAssetLabel = new GUIContent("Default Font Asset", "The Font Asset that will be assigned by default to newly created text objects when no Font Asset is specified."); + public static readonly GUIContent defaultFontAssetPathLabel = new GUIContent("Path: Resources/", "The relative path to a Resources folder where the Font Assets and Material Presets are located.\nExample \"Fonts & Materials/\""); + + public static readonly GUIContent fallbackFontAssetsLabel = new GUIContent("Fallback Font Assets", "The Font Assets that will be searched to locate and replace missing characters from a given Font Asset."); + public static readonly GUIContent fallbackFontAssetsListLabel = new GUIContent("Fallback Font Assets List", "The Font Assets that will be searched to locate and replace missing characters from a given Font Asset."); + + public static readonly GUIContent fallbackMaterialSettingsLabel = new GUIContent("Fallback Material Settings"); + public static readonly GUIContent matchMaterialPresetLabel = new GUIContent("Match Material Presets"); + + public static readonly GUIContent containerDefaultSettingsLabel = new GUIContent("Text Container Default Settings"); + + public static readonly GUIContent textMeshProLabel = new GUIContent("TextMeshPro"); + public static readonly GUIContent textMeshProUiLabel = new GUIContent("TextMeshPro UI"); + public static readonly GUIContent enableRaycastTarget = new GUIContent("Enable Raycast Target"); + public static readonly GUIContent autoSizeContainerLabel = new GUIContent("Auto Size Text Container", "Set the size of the text container to match the text."); + + public static readonly GUIContent textComponentDefaultSettingsLabel = new GUIContent("Text Component Default Settings"); + public static readonly GUIContent defaultFontSize = new GUIContent("Default Font Size"); + public static readonly GUIContent autoSizeRatioLabel = new GUIContent("Text Auto Size Ratios"); + public static readonly GUIContent minLabel = new GUIContent("Min"); + public static readonly GUIContent maxLabel = new GUIContent("Max"); + + public static readonly GUIContent wordWrappingLabel = new GUIContent("Word Wrapping"); + public static readonly GUIContent kerningLabel = new GUIContent("Kerning"); + public static readonly GUIContent extraPaddingLabel = new GUIContent("Extra Padding"); + public static readonly GUIContent tintAllSpritesLabel = new GUIContent("Tint All Sprites"); + public static readonly GUIContent parseEscapeCharactersLabel = new GUIContent("Parse Escape Sequence"); + + public static readonly GUIContent dynamicFontSystemSettingsLabel = new GUIContent("Dynamic Font System Settings"); + public static readonly GUIContent getFontFeaturesAtRuntime = new GUIContent("Get Font Features at Runtime", "Determines if Glyph Adjustment Data will be retrieved from font files at runtime when new characters and glyphs are added to font assets."); + + public static readonly GUIContent missingGlyphLabel = new GUIContent("Replacement Character", "The character to be displayed when the requested character is not found in any font asset or fallbacks."); + public static readonly GUIContent disableWarningsLabel = new GUIContent("Disable warnings", "Disable warning messages in the Console."); + + public static readonly GUIContent defaultSpriteAssetLabel = new GUIContent("Default Sprite Asset", "The Sprite Asset that will be assigned by default when using the tag when no Sprite Asset is specified."); + public static readonly GUIContent enableEmojiSupportLabel = new GUIContent("iOS Emoji Support", "Enables Emoji support for Touch Screen Keyboards on target devices."); + public static readonly GUIContent spriteAssetsPathLabel = new GUIContent("Path: Resources/", "The relative path to a Resources folder where the Sprite Assets are located.\nExample \"Sprite Assets/\""); + + public static readonly GUIContent defaultStyleSheetLabel = new GUIContent("Default Style Sheet", "The Style Sheet that will be used for all text objects in this project."); + + public static readonly GUIContent colorGradientPresetsLabel = new GUIContent("Color Gradient Presets", "The relative path to a Resources folder where the Color Gradient Presets are located.\nExample \"Color Gradient Presets/\""); + public static readonly GUIContent colorGradientsPathLabel = new GUIContent("Path: Resources/", "The relative path to a Resources folder where the Color Gradient Presets are located.\nExample \"Color Gradient Presets/\""); + + public static readonly GUIContent lineBreakingLabel = new GUIContent("Line Breaking for Asian languages", "The text assets that contain the Leading and Following characters which define the rules for line breaking with Asian languages."); + } + + SerializedProperty m_PropFontAsset; + SerializedProperty m_PropDefaultFontAssetPath; + SerializedProperty m_PropDefaultFontSize; + SerializedProperty m_PropDefaultAutoSizeMinRatio; + SerializedProperty m_PropDefaultAutoSizeMaxRatio; + SerializedProperty m_PropDefaultTextMeshProTextContainerSize; + SerializedProperty m_PropDefaultTextMeshProUITextContainerSize; + SerializedProperty m_PropAutoSizeTextContainer; + SerializedProperty m_PropEnableRaycastTarget; + + SerializedProperty m_PropSpriteAsset; + SerializedProperty m_PropSpriteAssetPath; + SerializedProperty m_PropEnableEmojiSupport; + SerializedProperty m_PropStyleSheet; + ReorderableList m_List; + + SerializedProperty m_PropColorGradientPresetsPath; + + SerializedProperty m_PropMatchMaterialPreset; + SerializedProperty m_PropWordWrapping; + SerializedProperty m_PropKerning; + SerializedProperty m_PropExtraPadding; + SerializedProperty m_PropTintAllSprites; + SerializedProperty m_PropParseEscapeCharacters; + SerializedProperty m_PropMissingGlyphCharacter; + + SerializedProperty m_GetFontFeaturesAtRuntime; + + SerializedProperty m_PropWarningsDisabled; + + SerializedProperty m_PropLeadingCharacters; + SerializedProperty m_PropFollowingCharacters; + + public void OnEnable() + { + if (target == null) + return; + + m_PropFontAsset = serializedObject.FindProperty("m_defaultFontAsset"); + m_PropDefaultFontAssetPath = serializedObject.FindProperty("m_defaultFontAssetPath"); + m_PropDefaultFontSize = serializedObject.FindProperty("m_defaultFontSize"); + m_PropDefaultAutoSizeMinRatio = serializedObject.FindProperty("m_defaultAutoSizeMinRatio"); + m_PropDefaultAutoSizeMaxRatio = serializedObject.FindProperty("m_defaultAutoSizeMaxRatio"); + m_PropDefaultTextMeshProTextContainerSize = serializedObject.FindProperty("m_defaultTextMeshProTextContainerSize"); + m_PropDefaultTextMeshProUITextContainerSize = serializedObject.FindProperty("m_defaultTextMeshProUITextContainerSize"); + m_PropAutoSizeTextContainer = serializedObject.FindProperty("m_autoSizeTextContainer"); + m_PropEnableRaycastTarget = serializedObject.FindProperty("m_EnableRaycastTarget"); + + m_PropSpriteAsset = serializedObject.FindProperty("m_defaultSpriteAsset"); + m_PropSpriteAssetPath = serializedObject.FindProperty("m_defaultSpriteAssetPath"); + m_PropEnableEmojiSupport = serializedObject.FindProperty("m_enableEmojiSupport"); + m_PropStyleSheet = serializedObject.FindProperty("m_defaultStyleSheet"); + m_PropColorGradientPresetsPath = serializedObject.FindProperty("m_defaultColorGradientPresetsPath"); + + m_List = new ReorderableList(serializedObject, serializedObject.FindProperty("m_fallbackFontAssets"), true, true, true, true); + + m_List.drawElementCallback = (rect, index, isActive, isFocused) => + { + var element = m_List.serializedProperty.GetArrayElementAtIndex(index); + rect.y += 2; + EditorGUI.PropertyField(new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), element, GUIContent.none); + }; + + m_List.drawHeaderCallback = rect => + { + EditorGUI.LabelField(rect, Styles.fallbackFontAssetsListLabel); + }; + + m_PropMatchMaterialPreset = serializedObject.FindProperty("m_matchMaterialPreset"); + + m_PropWordWrapping = serializedObject.FindProperty("m_enableWordWrapping"); + m_PropKerning = serializedObject.FindProperty("m_enableKerning"); + m_PropExtraPadding = serializedObject.FindProperty("m_enableExtraPadding"); + m_PropTintAllSprites = serializedObject.FindProperty("m_enableTintAllSprites"); + m_PropParseEscapeCharacters = serializedObject.FindProperty("m_enableParseEscapeCharacters"); + m_PropMissingGlyphCharacter = serializedObject.FindProperty("m_missingGlyphCharacter"); + + m_PropWarningsDisabled = serializedObject.FindProperty("m_warningsDisabled"); + + m_GetFontFeaturesAtRuntime = serializedObject.FindProperty("m_GetFontFeaturesAtRuntime"); + + m_PropLeadingCharacters = serializedObject.FindProperty("m_leadingCharacters"); + m_PropFollowingCharacters = serializedObject.FindProperty("m_followingCharacters"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + float labelWidth = EditorGUIUtility.labelWidth; + float fieldWidth = EditorGUIUtility.fieldWidth; + + // TextMeshPro Font Info Panel + EditorGUI.indentLevel = 0; + + // FONT ASSET + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label(Styles.defaultFontAssetLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + EditorGUILayout.PropertyField(m_PropFontAsset, Styles.defaultFontAssetLabel); + EditorGUILayout.PropertyField(m_PropDefaultFontAssetPath, Styles.defaultFontAssetPathLabel); + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + + // FALLBACK FONT ASSETs + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label(Styles.fallbackFontAssetsLabel, EditorStyles.boldLabel); + m_List.DoLayoutList(); + + GUILayout.Label(Styles.fallbackMaterialSettingsLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + EditorGUILayout.PropertyField(m_PropMatchMaterialPreset, Styles.matchMaterialPresetLabel); + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + + // MISSING GLYPHS + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label(Styles.dynamicFontSystemSettingsLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + EditorGUILayout.PropertyField(m_GetFontFeaturesAtRuntime, Styles.getFontFeaturesAtRuntime); + EditorGUILayout.PropertyField(m_PropMissingGlyphCharacter, Styles.missingGlyphLabel); + EditorGUILayout.PropertyField(m_PropWarningsDisabled, Styles.disableWarningsLabel); + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + + // TEXT OBJECT DEFAULT PROPERTIES + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label(Styles.containerDefaultSettingsLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + + EditorGUILayout.PropertyField(m_PropDefaultTextMeshProTextContainerSize, Styles.textMeshProLabel); + EditorGUILayout.PropertyField(m_PropDefaultTextMeshProUITextContainerSize, Styles.textMeshProUiLabel); + EditorGUILayout.PropertyField(m_PropEnableRaycastTarget, Styles.enableRaycastTarget); + EditorGUILayout.PropertyField(m_PropAutoSizeTextContainer, Styles.autoSizeContainerLabel); + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + + GUILayout.Label(Styles.textComponentDefaultSettingsLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + EditorGUILayout.PropertyField(m_PropDefaultFontSize, Styles.defaultFontSize); + + EditorGUILayout.BeginHorizontal(); + { + EditorGUILayout.PrefixLabel(Styles.autoSizeRatioLabel); + EditorGUIUtility.labelWidth = 32; + EditorGUIUtility.fieldWidth = 10; + + EditorGUI.indentLevel = 0; + EditorGUILayout.PropertyField(m_PropDefaultAutoSizeMinRatio, Styles.minLabel); + EditorGUILayout.PropertyField(m_PropDefaultAutoSizeMaxRatio, Styles.maxLabel); + EditorGUI.indentLevel = 1; + } + EditorGUILayout.EndHorizontal(); + + EditorGUIUtility.labelWidth = labelWidth; + EditorGUIUtility.fieldWidth = fieldWidth; + + EditorGUILayout.PropertyField(m_PropWordWrapping, Styles.wordWrappingLabel); + EditorGUILayout.PropertyField(m_PropKerning, Styles.kerningLabel); + + EditorGUILayout.PropertyField(m_PropExtraPadding, Styles.extraPaddingLabel); + EditorGUILayout.PropertyField(m_PropTintAllSprites, Styles.tintAllSpritesLabel); + + EditorGUILayout.PropertyField(m_PropParseEscapeCharacters, Styles.parseEscapeCharactersLabel); + + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + + // SPRITE ASSET + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label(Styles.defaultSpriteAssetLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + EditorGUILayout.PropertyField(m_PropSpriteAsset, Styles.defaultSpriteAssetLabel); + EditorGUILayout.PropertyField(m_PropEnableEmojiSupport, Styles.enableEmojiSupportLabel); + EditorGUILayout.PropertyField(m_PropSpriteAssetPath, Styles.spriteAssetsPathLabel); + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + + // STYLE SHEET + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label(Styles.defaultStyleSheetLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_PropStyleSheet, Styles.defaultStyleSheetLabel); + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + TMP_StyleSheet.UpdateStyleSheet(); + } + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + + // COLOR GRADIENT PRESETS + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label(Styles.colorGradientPresetsLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + EditorGUILayout.PropertyField(m_PropColorGradientPresetsPath, Styles.colorGradientsPathLabel); + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + + // LINE BREAKING RULE + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label(Styles.lineBreakingLabel, EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + EditorGUILayout.PropertyField(m_PropLeadingCharacters); + EditorGUILayout.PropertyField(m_PropFollowingCharacters); + EditorGUI.indentLevel = 0; + + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + + if (serializedObject.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(target); + TMPro_EventManager.ON_TMP_SETTINGS_CHANGED(); + } + } + } + +#if UNITY_2018_3_OR_NEWER + class TMP_ResourceImporterProvider : SettingsProvider + { + TMP_PackageResourceImporter m_ResourceImporter; + + public TMP_ResourceImporterProvider() + : base("Project/TextMesh Pro", SettingsScope.Project) + { + } + + public override void OnGUI(string searchContext) + { + // Lazy creation that supports domain reload + if (m_ResourceImporter == null) + m_ResourceImporter = new TMP_PackageResourceImporter(); + + m_ResourceImporter.OnGUI(); + } + + public override void OnDeactivate() + { + if (m_ResourceImporter != null) + m_ResourceImporter.OnDestroy(); + } + + static UnityEngine.Object GetTMPSettings() + { + return Resources.Load("TMP Settings"); + } + + [SettingsProviderGroup] + static SettingsProvider[] CreateTMPSettingsProvider() + { + var providers = new List { new TMP_ResourceImporterProvider() }; + + if (GetTMPSettings() != null) + { + var provider = new AssetSettingsProvider("Project/TextMesh Pro/Settings", GetTMPSettings); + provider.PopulateSearchKeywordsFromGUIContentProperties(); + providers.Add(provider); + } + + return providers.ToArray(); + } + } +#endif +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SettingsEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SettingsEditor.cs.meta new file mode 100644 index 00000000..a719ae77 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SettingsEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0386b6eb838c47138cd51d1c1b879a35 +timeCreated: 1436658550 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetEditor.cs new file mode 100644 index 00000000..4df588ef --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetEditor.cs @@ -0,0 +1,896 @@ +using UnityEngine; +using UnityEngine.TextCore; +using UnityEditor; +using UnityEditorInternal; +using System.Collections.Generic; + + + + +namespace TMPro.EditorUtilities +{ + + [CustomEditor(typeof(TMP_SpriteAsset))] + public class TMP_SpriteAssetEditor : Editor + { + struct UI_PanelState + { + public static bool spriteAssetInfoPanel = true; + public static bool fallbackSpriteAssetPanel = true; + public static bool spriteCharacterTablePanel; + public static bool spriteGlyphTablePanel; + } + + private static string[] s_UiStateLabel = new string[] { "(Click to collapse) ", "(Click to expand) " }; + + int m_moveToIndex; + int m_selectedElement = -1; + int m_CurrentCharacterPage; + int m_CurrentGlyphPage; + + const string k_UndoRedo = "UndoRedoPerformed"; + + string m_CharacterSearchPattern; + List m_CharacterSearchList; + bool m_IsCharacterSearchDirty; + + string m_GlyphSearchPattern; + List m_GlyphSearchList; + bool m_IsGlyphSearchDirty; + + SerializedProperty m_spriteAtlas_prop; + SerializedProperty m_material_prop; + SerializedProperty m_SpriteCharacterTableProperty; + SerializedProperty m_SpriteGlyphTableProperty; + ReorderableList m_fallbackSpriteAssetList; + + TMP_SpriteAsset m_SpriteAsset; + + bool isAssetDirty; + + float m_xOffset; + float m_yOffset; + float m_xAdvance; + float m_scale; + + public void OnEnable() + { + m_SpriteAsset = target as TMP_SpriteAsset; + + m_spriteAtlas_prop = serializedObject.FindProperty("spriteSheet"); + m_material_prop = serializedObject.FindProperty("material"); + m_SpriteCharacterTableProperty = serializedObject.FindProperty("m_SpriteCharacterTable"); + m_SpriteGlyphTableProperty = serializedObject.FindProperty("m_SpriteGlyphTable"); + + // Fallback TMP Sprite Asset list + m_fallbackSpriteAssetList = new ReorderableList(serializedObject, serializedObject.FindProperty("fallbackSpriteAssets"), true, true, true, true); + + m_fallbackSpriteAssetList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => + { + var element = m_fallbackSpriteAssetList.serializedProperty.GetArrayElementAtIndex(index); + rect.y += 2; + EditorGUI.PropertyField(new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), element, GUIContent.none); + }; + + m_fallbackSpriteAssetList.drawHeaderCallback = rect => + { + EditorGUI.LabelField(rect, new GUIContent("Fallback Sprite Asset List", "Select the Sprite Assets that will be searched and used as fallback when a given sprite is missing from this sprite asset.")); + }; + } + + + public override void OnInspectorGUI() + { + + //Debug.Log("OnInspectorGUI Called."); + Event currentEvent = Event.current; + string evt_cmd = currentEvent.commandName; // Get Current Event CommandName to check for Undo Events + + serializedObject.Update(); + + Rect rect; + + // TEXTMESHPRO SPRITE INFO PANEL + GUILayout.Label("Sprite Info", EditorStyles.boldLabel); + EditorGUI.indentLevel = 1; + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_spriteAtlas_prop , new GUIContent("Sprite Atlas")); + if (EditorGUI.EndChangeCheck()) + { + // Assign the new sprite atlas texture to the current material + Texture2D tex = m_spriteAtlas_prop.objectReferenceValue as Texture2D; + if (tex != null) + { + Material mat = m_material_prop.objectReferenceValue as Material; + if (mat != null) + mat.mainTexture = tex; + } + } + + EditorGUILayout.PropertyField(m_material_prop, new GUIContent("Default Material")); + + EditorGUILayout.Space(); + + // FALLBACK SPRITE ASSETS + EditorGUI.indentLevel = 0; + UI_PanelState.fallbackSpriteAssetPanel = EditorGUILayout.Foldout(UI_PanelState.fallbackSpriteAssetPanel, new GUIContent("Fallback Sprite Assets", "Select the Sprite Assets that will be searched and used as fallback when a given sprite is missing from this sprite asset."), true, TMP_UIStyleManager.boldFoldout); + + if (UI_PanelState.fallbackSpriteAssetPanel) + { + m_fallbackSpriteAssetList.DoLayoutList(); + } + + // SPRITE CHARACTER TABLE + #region Display Sprite Character Table + EditorGUI.indentLevel = 0; + rect = EditorGUILayout.GetControlRect(false, 24); + + if (GUI.Button(rect, new GUIContent("Sprite Character Table", "List of sprite characters contained in this sprite asset."), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.spriteCharacterTablePanel = !UI_PanelState.spriteCharacterTablePanel; + + GUI.Label(rect, (UI_PanelState.spriteCharacterTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.spriteCharacterTablePanel) + { + int arraySize = m_SpriteCharacterTableProperty.arraySize; + int itemsPerPage = 10; + + // Display Glyph Management Tools + EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.ExpandWidth(true)); + { + // Search Bar implementation + #region DISPLAY SEARCH BAR + EditorGUILayout.BeginHorizontal(); + { + EditorGUIUtility.labelWidth = 110f; + EditorGUI.BeginChangeCheck(); + string searchPattern = EditorGUILayout.TextField("Sprite Search", m_CharacterSearchPattern, "SearchTextField"); + if (EditorGUI.EndChangeCheck() || m_IsCharacterSearchDirty) + { + if (string.IsNullOrEmpty(searchPattern) == false) + { + //GUIUtility.keyboardControl = 0; + m_CharacterSearchPattern = searchPattern.ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim(); + + // Search Glyph Table for potential matches + SearchCharacterTable(m_CharacterSearchPattern, ref m_CharacterSearchList); + } + else + m_CharacterSearchPattern = null; + + m_IsCharacterSearchDirty = false; + } + + string styleName = string.IsNullOrEmpty(m_CharacterSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; + if (GUILayout.Button(GUIContent.none, styleName)) + { + GUIUtility.keyboardControl = 0; + m_CharacterSearchPattern = string.Empty; + } + } + EditorGUILayout.EndHorizontal(); + #endregion + + // Display Page Navigation + if (!string.IsNullOrEmpty(m_CharacterSearchPattern)) + arraySize = m_CharacterSearchList.Count; + + // Display Page Navigation + DisplayPageNavigation(ref m_CurrentCharacterPage, arraySize, itemsPerPage); + } + EditorGUILayout.EndVertical(); + + if (arraySize > 0) + { + // Display each SpriteInfo entry using the SpriteInfo property drawer. + for (int i = itemsPerPage * m_CurrentCharacterPage; i < arraySize && i < itemsPerPage * (m_CurrentCharacterPage + 1); i++) + { + // Define the start of the selection region of the element. + Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + int elementIndex = i; + if (!string.IsNullOrEmpty(m_CharacterSearchPattern)) + elementIndex = m_CharacterSearchList[i]; + + SerializedProperty spriteCharacterProperty = m_SpriteCharacterTableProperty.GetArrayElementAtIndex(elementIndex); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + { + EditorGUI.BeginDisabledGroup(i != m_selectedElement); + { + EditorGUILayout.PropertyField(spriteCharacterProperty); + } + EditorGUI.EndDisabledGroup(); + } + EditorGUILayout.EndVertical(); + + // Define the end of the selection region of the element. + Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + // Check for Item selection + Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); + if (DoSelectionCheck(selectionArea)) + { + if (m_selectedElement == i) + { + m_selectedElement = -1; + } + else + { + m_selectedElement = i; + GUIUtility.keyboardControl = 0; + } + } + + // Draw & Handle Section Area + if (m_selectedElement == i) + { + // Draw selection highlight + TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); + + // Draw options to MoveUp, MoveDown, Add or Remove Sprites + Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); + controlRect.width /= 8; + + // Move sprite up. + bool guiEnabled = GUI.enabled; + if (i == 0) { GUI.enabled = false; } + if (GUI.Button(controlRect, "Up")) + { + SwapCharacterElements(i, i - 1); + } + GUI.enabled = guiEnabled; + + // Move sprite down. + controlRect.x += controlRect.width; + if (i == arraySize - 1) { GUI.enabled = false; } + if (GUI.Button(controlRect, "Down")) + { + SwapCharacterElements(i, i + 1); + } + GUI.enabled = guiEnabled; + + // Move sprite to new index + controlRect.x += controlRect.width * 2; + //if (i == arraySize - 1) { GUI.enabled = false; } + m_moveToIndex = EditorGUI.IntField(controlRect, m_moveToIndex); + controlRect.x -= controlRect.width; + if (GUI.Button(controlRect, "Goto")) + { + MoveCharacterToIndex(i, m_moveToIndex); + } + //controlRect.x += controlRect.width; + GUI.enabled = guiEnabled; + + // Add new Sprite + controlRect.x += controlRect.width * 4; + if (GUI.Button(controlRect, "+")) + { + m_SpriteCharacterTableProperty.arraySize += 1; + + int index = m_SpriteCharacterTableProperty.arraySize - 1; + + SerializedProperty spriteInfo_prop = m_SpriteCharacterTableProperty.GetArrayElementAtIndex(index); + + // Copy properties of the selected element + CopyCharacterSerializedProperty(m_SpriteCharacterTableProperty.GetArrayElementAtIndex(elementIndex), ref spriteInfo_prop); + + //spriteInfo_prop.FindPropertyRelative("m_Index").intValue = index; + serializedObject.ApplyModifiedProperties(); + + m_IsCharacterSearchDirty = true; + } + + // Delete selected Sprite + controlRect.x += controlRect.width; + if (m_selectedElement == -1) GUI.enabled = false; + if (GUI.Button(controlRect, "-")) + { + m_SpriteCharacterTableProperty.DeleteArrayElementAtIndex(elementIndex); + + m_selectedElement = -1; + serializedObject.ApplyModifiedProperties(); + + m_IsCharacterSearchDirty = true; + + return; + } + + + } + } + } + + DisplayPageNavigation(ref m_CurrentCharacterPage, arraySize, itemsPerPage); + + EditorGUIUtility.labelWidth = 40f; + EditorGUIUtility.fieldWidth = 20f; + + GUILayout.Space(5f); + + // GLOBAL TOOLS + #region Global Tools + /* + GUI.enabled = true; + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + rect = EditorGUILayout.GetControlRect(false, 40); + + float width = (rect.width - 75f) / 4; + EditorGUI.LabelField(rect, "Global Offsets & Scale", EditorStyles.boldLabel); + + + rect.x += 70; + bool old_ChangedState = GUI.changed; + + GUI.changed = false; + m_xOffset = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 0, rect.y + 20, width - 5f, 18), new GUIContent("OX:"), m_xOffset); + if (GUI.changed) UpdateGlobalProperty("m_HorizontalBearingX", m_xOffset); + + m_yOffset = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 1, rect.y + 20, width - 5f, 18), new GUIContent("OY:"), m_yOffset); + if (GUI.changed) UpdateGlobalProperty("m_HorizontalBearingY", m_yOffset); + + m_xAdvance = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 2, rect.y + 20, width - 5f, 18), new GUIContent("ADV."), m_xAdvance); + if (GUI.changed) UpdateGlobalProperty("m_HorizontalAdvance", m_xAdvance); + + m_scale = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 3, rect.y + 20, width - 5f, 18), new GUIContent("SF."), m_scale); + if (GUI.changed) UpdateGlobalProperty("m_Scale", m_scale); + + EditorGUILayout.EndVertical(); + + GUI.changed = old_ChangedState; + */ + #endregion + + } + #endregion + + + // SPRITE GLYPH TABLE + #region Display Sprite Glyph Table + EditorGUI.indentLevel = 0; + rect = EditorGUILayout.GetControlRect(false, 24); + + if (GUI.Button(rect, new GUIContent("Sprite Glyph Table", "A list of the SpriteGlyphs contained in this sprite asset."), TMP_UIStyleManager.sectionHeader)) + UI_PanelState.spriteGlyphTablePanel = !UI_PanelState.spriteGlyphTablePanel; + + GUI.Label(rect, (UI_PanelState.spriteGlyphTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); + + if (UI_PanelState.spriteGlyphTablePanel) + { + int arraySize = m_SpriteGlyphTableProperty.arraySize; + int itemsPerPage = 10; + + // Display Glyph Management Tools + EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.ExpandWidth(true)); + { + // Search Bar implementation + #region DISPLAY SEARCH BAR + EditorGUILayout.BeginHorizontal(); + { + EditorGUIUtility.labelWidth = 110f; + EditorGUI.BeginChangeCheck(); + string searchPattern = EditorGUILayout.TextField("Sprite Search", m_GlyphSearchPattern, "SearchTextField"); + if (EditorGUI.EndChangeCheck() || m_IsGlyphSearchDirty) + { + if (string.IsNullOrEmpty(searchPattern) == false) + { + //GUIUtility.keyboardControl = 0; + m_GlyphSearchPattern = searchPattern.ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim(); + + // Search Glyph Table for potential matches + SearchCharacterTable(m_GlyphSearchPattern, ref m_GlyphSearchList); + } + else + m_GlyphSearchPattern = null; + + m_IsGlyphSearchDirty = false; + } + + string styleName = string.IsNullOrEmpty(m_GlyphSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; + if (GUILayout.Button(GUIContent.none, styleName)) + { + GUIUtility.keyboardControl = 0; + m_GlyphSearchPattern = string.Empty; + } + } + EditorGUILayout.EndHorizontal(); + #endregion + + // Display Page Navigation + if (!string.IsNullOrEmpty(m_GlyphSearchPattern)) + arraySize = m_GlyphSearchList.Count; + + // Display Page Navigation + DisplayPageNavigation(ref m_CurrentGlyphPage, arraySize, itemsPerPage); + } + EditorGUILayout.EndVertical(); + + if (arraySize > 0) + { + // Display each SpriteInfo entry using the SpriteInfo property drawer. + for (int i = itemsPerPage * m_CurrentGlyphPage; i < arraySize && i < itemsPerPage * (m_CurrentGlyphPage + 1); i++) + { + // Define the start of the selection region of the element. + Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + int elementIndex = i; + if (!string.IsNullOrEmpty(m_GlyphSearchPattern)) + elementIndex = m_GlyphSearchList[i]; + + SerializedProperty spriteGlyphProperty = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(elementIndex); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + { + EditorGUI.BeginDisabledGroup(i != m_selectedElement); + { + EditorGUILayout.PropertyField(spriteGlyphProperty); + } + EditorGUI.EndDisabledGroup(); + } + EditorGUILayout.EndVertical(); + + // Define the end of the selection region of the element. + Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + // Check for Item selection + Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); + if (DoSelectionCheck(selectionArea)) + { + if (m_selectedElement == i) + { + m_selectedElement = -1; + } + else + { + m_selectedElement = i; + GUIUtility.keyboardControl = 0; + } + } + + // Draw & Handle Section Area + if (m_selectedElement == i) + { + // Draw selection highlight + TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); + + // Draw options to MoveUp, MoveDown, Add or Remove Sprites + Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); + controlRect.width /= 8; + + // Move sprite up. + bool guiEnabled = GUI.enabled; + if (i == 0) { GUI.enabled = false; } + if (GUI.Button(controlRect, "Up")) + { + SwapGlyphElements(i, i - 1); + } + GUI.enabled = guiEnabled; + + // Move sprite down. + controlRect.x += controlRect.width; + if (i == arraySize - 1) { GUI.enabled = false; } + if (GUI.Button(controlRect, "Down")) + { + SwapGlyphElements(i, i + 1); + } + GUI.enabled = guiEnabled; + + // Move sprite to new index + controlRect.x += controlRect.width * 2; + //if (i == arraySize - 1) { GUI.enabled = false; } + m_moveToIndex = EditorGUI.IntField(controlRect, m_moveToIndex); + controlRect.x -= controlRect.width; + if (GUI.Button(controlRect, "Goto")) + { + MoveGlyphToIndex(i, m_moveToIndex); + } + //controlRect.x += controlRect.width; + GUI.enabled = guiEnabled; + + // Add new Sprite + controlRect.x += controlRect.width * 4; + if (GUI.Button(controlRect, "+")) + { + m_SpriteGlyphTableProperty.arraySize += 1; + + int index = m_SpriteGlyphTableProperty.arraySize - 1; + + SerializedProperty newSpriteGlyphProperty = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(index); + + // Copy properties of the selected element + CopyGlyphSerializedProperty(m_SpriteGlyphTableProperty.GetArrayElementAtIndex(elementIndex), ref newSpriteGlyphProperty); + + newSpriteGlyphProperty.FindPropertyRelative("m_Index").intValue = index; + + serializedObject.ApplyModifiedProperties(); + + m_IsGlyphSearchDirty = true; + + //m_SpriteAsset.UpdateLookupTables(); + } + + // Delete selected Sprite + controlRect.x += controlRect.width; + if (m_selectedElement == -1) GUI.enabled = false; + if (GUI.Button(controlRect, "-")) + { + SerializedProperty selectedSpriteGlyphProperty = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(elementIndex); + + int selectedGlyphIndex = selectedSpriteGlyphProperty.FindPropertyRelative("m_Index").intValue; + + m_SpriteGlyphTableProperty.DeleteArrayElementAtIndex(elementIndex); + + // Remove all Sprite Characters referencing this glyph. + for (int j = 0; j < m_SpriteCharacterTableProperty.arraySize; j++) + { + int glyphIndex = m_SpriteCharacterTableProperty.GetArrayElementAtIndex(j).FindPropertyRelative("m_GlyphIndex").intValue; + + if (glyphIndex == selectedGlyphIndex) + { + // Remove character + m_SpriteCharacterTableProperty.DeleteArrayElementAtIndex(j); + } + } + + m_selectedElement = -1; + serializedObject.ApplyModifiedProperties(); + + m_IsGlyphSearchDirty = true; + + //m_SpriteAsset.UpdateLookupTables(); + + return; + } + + + } + } + } + + DisplayPageNavigation(ref m_CurrentGlyphPage, arraySize, itemsPerPage); + + EditorGUIUtility.labelWidth = 40f; + EditorGUIUtility.fieldWidth = 20f; + + GUILayout.Space(5f); + + // GLOBAL TOOLS + #region Global Tools + GUI.enabled = true; + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + rect = EditorGUILayout.GetControlRect(false, 40); + + float width = (rect.width - 75f) / 4; + EditorGUI.LabelField(rect, "Global Offsets & Scale", EditorStyles.boldLabel); + + + rect.x += 70; + bool old_ChangedState = GUI.changed; + + GUI.changed = false; + m_xOffset = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 0, rect.y + 20, width - 5f, 18), new GUIContent("OX:"), m_xOffset); + if (GUI.changed) UpdateGlobalProperty("m_HorizontalBearingX", m_xOffset); + + m_yOffset = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 1, rect.y + 20, width - 5f, 18), new GUIContent("OY:"), m_yOffset); + if (GUI.changed) UpdateGlobalProperty("m_HorizontalBearingY", m_yOffset); + + m_xAdvance = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 2, rect.y + 20, width - 5f, 18), new GUIContent("ADV."), m_xAdvance); + if (GUI.changed) UpdateGlobalProperty("m_HorizontalAdvance", m_xAdvance); + + m_scale = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 3, rect.y + 20, width - 5f, 18), new GUIContent("SF."), m_scale); + if (GUI.changed) UpdateGlobalProperty("m_Scale", m_scale); + + EditorGUILayout.EndVertical(); + #endregion + + GUI.changed = old_ChangedState; + + } + #endregion + + + if (serializedObject.ApplyModifiedProperties() || evt_cmd == k_UndoRedo || isAssetDirty) + { + if (m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty || evt_cmd == k_UndoRedo) + m_SpriteAsset.UpdateLookupTables(); + + TMPro_EventManager.ON_SPRITE_ASSET_PROPERTY_CHANGED(true, m_SpriteAsset); + + isAssetDirty = false; + EditorUtility.SetDirty(target); + } + + // Clear selection if mouse event was not consumed. + GUI.enabled = true; + if (currentEvent.type == EventType.MouseDown && currentEvent.button == 0) + m_selectedElement = -1; + + } + + + /// + /// + /// + /// + /// + void DisplayPageNavigation(ref int currentPage, int arraySize, int itemsPerPage) + { + Rect pagePos = EditorGUILayout.GetControlRect(false, 20); + pagePos.width /= 3; + + int shiftMultiplier = Event.current.shift ? 10 : 1; // Page + Shift goes 10 page forward + + // Previous Page + GUI.enabled = currentPage > 0; + + if (GUI.Button(pagePos, "Previous Page")) + { + currentPage -= 1 * shiftMultiplier; + //m_isNewPage = true; + } + + // Page Counter + GUI.enabled = true; + pagePos.x += pagePos.width; + int totalPages = (int)(arraySize / (float)itemsPerPage + 0.999f); + GUI.Label(pagePos, "Page " + (currentPage + 1) + " / " + totalPages, TMP_UIStyleManager.centeredLabel); + + // Next Page + pagePos.x += pagePos.width; + GUI.enabled = itemsPerPage * (currentPage + 1) < arraySize; + + if (GUI.Button(pagePos, "Next Page")) + { + currentPage += 1 * shiftMultiplier; + //m_isNewPage = true; + } + + // Clamp page range + currentPage = Mathf.Clamp(currentPage, 0, arraySize / itemsPerPage); + + GUI.enabled = true; + } + + + /// + /// Method to update the properties of all sprites + /// + /// + /// + void UpdateGlobalProperty(string property, float value) + { + int arraySize = m_SpriteGlyphTableProperty.arraySize; + + for (int i = 0; i < arraySize; i++) + { + // Get a reference to the sprite glyph. + SerializedProperty spriteGlyphProperty = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(i); + + if (property == "m_Scale") + { + spriteGlyphProperty.FindPropertyRelative(property).floatValue = value; + } + else + { + SerializedProperty glyphMetricsProperty = spriteGlyphProperty.FindPropertyRelative("m_Metrics"); + glyphMetricsProperty.FindPropertyRelative(property).floatValue = value; + } + } + + GUI.changed = false; + } + + // Check if any of the Style elements were clicked on. + private bool DoSelectionCheck(Rect selectionArea) + { + Event currentEvent = Event.current; + + switch (currentEvent.type) + { + case EventType.MouseDown: + if (selectionArea.Contains(currentEvent.mousePosition) && currentEvent.button == 0) + { + currentEvent.Use(); + return true; + } + break; + } + + return false; + } + + + /// + /// Swap the sprite item at the currently selected array index to another index. + /// + /// Selected index. + /// New index. + void SwapCharacterElements(int selectedIndex, int newIndex) + { + m_SpriteCharacterTableProperty.MoveArrayElement(selectedIndex, newIndex); + m_selectedElement = newIndex; + m_IsCharacterSearchDirty = true; + m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + } + + /// + /// Move Sprite Element at selected index to another index and reorder sprite list. + /// + /// + /// + void MoveCharacterToIndex(int selectedIndex, int newIndex) + { + int arraySize = m_SpriteCharacterTableProperty.arraySize; + + if (newIndex >= arraySize) + newIndex = arraySize - 1; + + m_SpriteCharacterTableProperty.MoveArrayElement(selectedIndex, newIndex); + + m_selectedElement = newIndex; + m_IsCharacterSearchDirty = true; + m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + + // TODO: Need to handle switching pages if the character or glyph is moved to a different page. + } + + /// + /// + /// + /// + /// + void SwapGlyphElements(int selectedIndex, int newIndex) + { + m_SpriteGlyphTableProperty.MoveArrayElement(selectedIndex, newIndex); + m_selectedElement = newIndex; + m_IsGlyphSearchDirty = true; + m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + } + + /// + /// Move Sprite Element at selected index to another index and reorder sprite list. + /// + /// + /// + void MoveGlyphToIndex(int selectedIndex, int newIndex) + { + int arraySize = m_SpriteGlyphTableProperty.arraySize; + + if (newIndex >= arraySize) + newIndex = arraySize - 1; + + m_SpriteGlyphTableProperty.MoveArrayElement(selectedIndex, newIndex); + + m_selectedElement = newIndex; + m_IsGlyphSearchDirty = true; + m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + + // TODO: Need to handle switching pages if the character or glyph is moved to a different page. + } + + + /// + /// + /// + /// + /// + void CopyCharacterSerializedProperty(SerializedProperty source, ref SerializedProperty target) + { + target.FindPropertyRelative("m_Name").stringValue = source.FindPropertyRelative("m_Name").stringValue; + target.FindPropertyRelative("m_HashCode").intValue = source.FindPropertyRelative("m_HashCode").intValue; + target.FindPropertyRelative("m_Unicode").intValue = source.FindPropertyRelative("m_Unicode").intValue; + target.FindPropertyRelative("m_GlyphIndex").intValue = source.FindPropertyRelative("m_GlyphIndex").intValue; + target.FindPropertyRelative("m_Scale").floatValue = source.FindPropertyRelative("m_Scale").floatValue; + } + + void CopyGlyphSerializedProperty(SerializedProperty srcGlyph, ref SerializedProperty dstGlyph) + { + // TODO : Should make a generic function which copies each of the properties. + + // Index + dstGlyph.FindPropertyRelative("m_Index").intValue = srcGlyph.FindPropertyRelative("m_Index").intValue; + + // GlyphMetrics + SerializedProperty srcGlyphMetrics = srcGlyph.FindPropertyRelative("m_Metrics"); + SerializedProperty dstGlyphMetrics = dstGlyph.FindPropertyRelative("m_Metrics"); + + dstGlyphMetrics.FindPropertyRelative("m_Width").floatValue = srcGlyphMetrics.FindPropertyRelative("m_Width").floatValue; + dstGlyphMetrics.FindPropertyRelative("m_Height").floatValue = srcGlyphMetrics.FindPropertyRelative("m_Height").floatValue; + dstGlyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue; + dstGlyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue; + dstGlyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue; + + // GlyphRect + SerializedProperty srcGlyphRect = srcGlyph.FindPropertyRelative("m_GlyphRect"); + SerializedProperty dstGlyphRect = dstGlyph.FindPropertyRelative("m_GlyphRect"); + + dstGlyphRect.FindPropertyRelative("m_X").intValue = srcGlyphRect.FindPropertyRelative("m_X").intValue; + dstGlyphRect.FindPropertyRelative("m_Y").intValue = srcGlyphRect.FindPropertyRelative("m_Y").intValue; + dstGlyphRect.FindPropertyRelative("m_Width").intValue = srcGlyphRect.FindPropertyRelative("m_Width").intValue; + dstGlyphRect.FindPropertyRelative("m_Height").intValue = srcGlyphRect.FindPropertyRelative("m_Height").intValue; + + dstGlyph.FindPropertyRelative("m_Scale").floatValue = srcGlyph.FindPropertyRelative("m_Scale").floatValue; + dstGlyph.FindPropertyRelative("m_AtlasIndex").intValue = srcGlyph.FindPropertyRelative("m_AtlasIndex").intValue; + } + + + /// + /// + /// + /// + /// + void SearchCharacterTable(string searchPattern, ref List searchResults) + { + if (searchResults == null) searchResults = new List(); + searchResults.Clear(); + + int arraySize = m_SpriteCharacterTableProperty.arraySize; + + for (int i = 0; i < arraySize; i++) + { + SerializedProperty sourceSprite = m_SpriteCharacterTableProperty.GetArrayElementAtIndex(i); + + // Check for potential match against array index + if (i.ToString().Contains(searchPattern)) + { + searchResults.Add(i); + continue; + } + + // Check for potential match against decimal id + int id = sourceSprite.FindPropertyRelative("m_GlyphIndex").intValue; + if (id.ToString().Contains(searchPattern)) + { + searchResults.Add(i); + continue; + } + + // Check for potential match against name + string name = sourceSprite.FindPropertyRelative("m_Name").stringValue.ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim(); + if (name.Contains(searchPattern)) + { + searchResults.Add(i); + continue; + } + } + } + + void SearchGlyphTable(string searchPattern, ref List searchResults) + { + if (searchResults == null) searchResults = new List(); + searchResults.Clear(); + + int arraySize = m_SpriteGlyphTableProperty.arraySize; + + for (int i = 0; i < arraySize; i++) + { + SerializedProperty sourceSprite = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(i); + + // Check for potential match against array index + if (i.ToString().Contains(searchPattern)) + { + searchResults.Add(i); + continue; + } + + // Check for potential match against decimal id + int id = sourceSprite.FindPropertyRelative("m_GlyphIndex").intValue; + if (id.ToString().Contains(searchPattern)) + { + searchResults.Add(i); + continue; + } + + // Check for potential match against name + string name = sourceSprite.FindPropertyRelative("m_Name").stringValue.ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim(); + if (name.Contains(searchPattern)) + { + searchResults.Add(i); + continue; + } + } + } + + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta new file mode 100644 index 00000000..9fcede33 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b09be1f217d34247af54863a2f5587e1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetImporter.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetImporter.cs new file mode 100644 index 00000000..dc4f0932 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetImporter.cs @@ -0,0 +1,232 @@ +using UnityEngine; +using UnityEditor; +using System.IO; +using System.Collections.Generic; +using TMPro.EditorUtilities; +using TMPro.SpriteAssetUtilities; + +namespace TMPro +{ + public class TMP_SpriteAssetImporter : EditorWindow + { + // Create Sprite Asset Editor Window + [MenuItem("Window/TextMeshPro/Sprite Importer", false, 2026)] + public static void ShowFontAtlasCreatorWindow() + { + var window = GetWindow(); + window.titleContent = new GUIContent("Sprite Importer"); + window.Focus(); + } + + Texture2D m_SpriteAtlas; + SpriteAssetImportFormats m_SpriteDataFormat = SpriteAssetImportFormats.TexturePacker; + TextAsset m_JsonFile; + + string m_CreationFeedback; + + TMP_SpriteAsset m_SpriteAsset; + List m_SpriteInfoList = new List(); + + + void OnEnable() + { + // Set Editor Window Size + SetEditorWindowSize(); + } + + public void OnGUI() + { + DrawEditorPanel(); + } + + + void DrawEditorPanel() + { + // label + GUILayout.Label("Import Settings", EditorStyles.boldLabel); + + EditorGUI.BeginChangeCheck(); + + // Sprite Texture Selection + m_JsonFile = EditorGUILayout.ObjectField("Sprite Data Source", m_JsonFile, typeof(TextAsset), false) as TextAsset; + + m_SpriteDataFormat = (SpriteAssetImportFormats)EditorGUILayout.EnumPopup("Import Format", m_SpriteDataFormat); + + // Sprite Texture Selection + m_SpriteAtlas = EditorGUILayout.ObjectField("Sprite Texture Atlas", m_SpriteAtlas, typeof(Texture2D), false) as Texture2D; + + if (EditorGUI.EndChangeCheck()) + { + m_CreationFeedback = string.Empty; + } + + GUILayout.Space(10); + + GUI.enabled = m_JsonFile != null && m_SpriteAtlas != null && m_SpriteDataFormat == SpriteAssetImportFormats.TexturePacker; + + // Create Sprite Asset + if (GUILayout.Button("Create Sprite Asset")) + { + m_CreationFeedback = string.Empty; + + // Read json data file + if (m_JsonFile != null && m_SpriteDataFormat == SpriteAssetImportFormats.TexturePacker) + { + TexturePacker.SpriteDataObject sprites = JsonUtility.FromJson(m_JsonFile.text); + + if (sprites != null && sprites.frames != null && sprites.frames.Count > 0) + { + int spriteCount = sprites.frames.Count; + + // Update import results + m_CreationFeedback = "Import Results\n--------------------\n"; + m_CreationFeedback += "" + spriteCount + " Sprites were imported from file."; + + // Create sprite info list + m_SpriteInfoList = CreateSpriteInfoList(sprites); + } + } + + } + + GUI.enabled = true; + + // Creation Feedback + GUILayout.Space(5); + GUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.Height(60)); + { + EditorGUILayout.LabelField(m_CreationFeedback, TMP_UIStyleManager.label); + } + GUILayout.EndVertical(); + + GUILayout.Space(5); + GUI.enabled = m_JsonFile != null && m_SpriteAtlas && m_SpriteInfoList != null && m_SpriteInfoList.Count > 0; // Enable Save Button if font_Atlas is not Null. + if (GUILayout.Button("Save Sprite Asset") && m_JsonFile != null) + { + string filePath = EditorUtility.SaveFilePanel("Save Sprite Asset File", new FileInfo(AssetDatabase.GetAssetPath(m_JsonFile)).DirectoryName, m_JsonFile.name, "asset"); + + if (filePath.Length == 0) + return; + + SaveSpriteAsset(filePath); + } + GUI.enabled = true; + } + + + /// + /// + /// + List CreateSpriteInfoList(TexturePacker.SpriteDataObject spriteDataObject) + { + List importedSprites = spriteDataObject.frames; + + List spriteInfoList = new List(); + + for (int i = 0; i < importedSprites.Count; i++) + { + TMP_Sprite sprite = new TMP_Sprite(); + + sprite.id = i; + sprite.name = Path.GetFileNameWithoutExtension(importedSprites[i].filename) ?? ""; + sprite.hashCode = TMP_TextUtilities.GetSimpleHashCode(sprite.name); + + // Attempt to extract Unicode value from name + int unicode; + int indexOfSeperator = sprite.name.IndexOf('-'); + if (indexOfSeperator != -1) + unicode = TMP_TextUtilities.StringHexToInt(sprite.name.Substring(indexOfSeperator + 1)); + else + unicode = TMP_TextUtilities.StringHexToInt(sprite.name); + + sprite.unicode = unicode; + + sprite.x = importedSprites[i].frame.x; + sprite.y = m_SpriteAtlas.height - (importedSprites[i].frame.y + importedSprites[i].frame.h); + sprite.width = importedSprites[i].frame.w; + sprite.height = importedSprites[i].frame.h; + + //Calculate sprite pivot position + sprite.pivot = importedSprites[i].pivot; + + // Properties the can be modified + sprite.xAdvance = sprite.width; + sprite.scale = 1.0f; + sprite.xOffset = 0 - (sprite.width * sprite.pivot.x); + sprite.yOffset = sprite.height - (sprite.height * sprite.pivot.y); + + spriteInfoList.Add(sprite); + } + + return spriteInfoList; + } + + + /// + /// + /// + /// + void SaveSpriteAsset(string filePath) + { + filePath = filePath.Substring(0, filePath.Length - 6); // Trim file extension from filePath. + + string dataPath = Application.dataPath; + + if (filePath.IndexOf(dataPath, System.StringComparison.InvariantCultureIgnoreCase) == -1) + { + Debug.LogError("You're saving the font asset in a directory outside of this project folder. This is not supported. Please select a directory under \"" + dataPath + "\""); + return; + } + + string relativeAssetPath = filePath.Substring(dataPath.Length - 6); + string dirName = Path.GetDirectoryName(relativeAssetPath); + string fileName = Path.GetFileNameWithoutExtension(relativeAssetPath); + string pathNoExt = dirName + "/" + fileName; + + + // Create new Sprite Asset using this texture + m_SpriteAsset = CreateInstance(); + AssetDatabase.CreateAsset(m_SpriteAsset, pathNoExt + ".asset"); + + // Compute the hash code for the sprite asset. + m_SpriteAsset.hashCode = TMP_TextUtilities.GetSimpleHashCode(m_SpriteAsset.name); + + // Assign new Sprite Sheet texture to the Sprite Asset. + m_SpriteAsset.spriteSheet = m_SpriteAtlas; + m_SpriteAsset.spriteInfoList = m_SpriteInfoList; + + // Add new default material for sprite asset. + AddDefaultMaterial(m_SpriteAsset); + } + + + /// + /// Create and add new default material to sprite asset. + /// + /// + static void AddDefaultMaterial(TMP_SpriteAsset spriteAsset) + { + Shader shader = Shader.Find("TextMeshPro/Sprite"); + Material material = new Material(shader); + material.SetTexture(ShaderUtilities.ID_MainTex, spriteAsset.spriteSheet); + + spriteAsset.material = material; + material.hideFlags = HideFlags.HideInHierarchy; + AssetDatabase.AddObjectToAsset(material, spriteAsset); + } + + + /// + /// Limits the minimum size of the editor window. + /// + void SetEditorWindowSize() + { + EditorWindow editorWindow = this; + + Vector2 currentWindowSize = editorWindow.minSize; + + editorWindow.minSize = new Vector2(Mathf.Max(230, currentWindowSize.x), Mathf.Max(300, currentWindowSize.y)); + } + + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta new file mode 100644 index 00000000..d60763a5 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f1ea944dcf8849ebab391e461b99ccb7 +timeCreated: 1480023525 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetMenu.cs new file mode 100644 index 00000000..5155e1a1 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetMenu.cs @@ -0,0 +1,329 @@ +using UnityEngine; +using UnityEngine.TextCore; +using UnityEditor; +using System.Linq; +using System.IO; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro.EditorUtilities +{ + + public static class TMP_SpriteAssetMenu + { + // Add a Context Menu to the Sprite Asset Editor Panel to Create and Add a Default Material. + [MenuItem("CONTEXT/TMP_SpriteAsset/Add Default Material", false, 2200)] + static void CopyTexture(MenuCommand command) + { + TMP_SpriteAsset spriteAsset = (TMP_SpriteAsset)command.context; + + // Make sure the sprite asset already contains a default material + if (spriteAsset != null && spriteAsset.material == null) + { + // Add new default material for sprite asset. + AddDefaultMaterial(spriteAsset); + } + } + + // Add a Context Menu to the Sprite Asset Editor Panel to update existing sprite assets. + [MenuItem("CONTEXT/TMP_SpriteAsset/Update Sprite Asset", false, 2100)] + static void UpdateSpriteAsset(MenuCommand command) + { + TMP_SpriteAsset spriteAsset = (TMP_SpriteAsset)command.context; + + if (spriteAsset == null) + return; + + // Get a list of all the sprites contained in the texture referenced by the sprite asset. + // This only works if the texture is set to sprite mode. + string filePath = AssetDatabase.GetAssetPath(spriteAsset.spriteSheet); + + if (string.IsNullOrEmpty(filePath)) + return; + + // Get all the Sprites sorted Left to Right / Top to Bottom + Sprite[] sprites = AssetDatabase.LoadAllAssetsAtPath(filePath).Select(x => x as Sprite).Where(x => x != null).OrderByDescending(x => x.rect.y).ThenBy(x => x.rect.x).ToArray(); + + List spriteGlyphTable = spriteAsset.spriteGlyphTable; + + // Finding available glyph indexes to insert new glyphs into. + var tempGlyphTable = spriteGlyphTable.OrderBy(glyph => glyph.index).ToList(); + List availableGlyphIndexes = new List(); + + int elementIndex = 0; + for (uint i = 0; i < tempGlyphTable[tempGlyphTable.Count - 1].index; i++) + { + uint currentElementIndex = tempGlyphTable[elementIndex].index; + + if (i == currentElementIndex) + elementIndex += 1; + else + availableGlyphIndexes.Add(i); + } + + // Iterate over each of the sprites in the texture to try to match them to existing sprites in the sprite asset. + for (int i = 0; i < sprites.Length; i++) + { + int id = sprites[i].GetInstanceID(); + + int glyphIndex = spriteGlyphTable.FindIndex(item => item.sprite.GetInstanceID() == id); + + if (glyphIndex == -1) + { + // Add new Sprite Glyph to the table + Sprite sprite = sprites[i]; + + TMP_SpriteGlyph spriteGlyph = new TMP_SpriteGlyph(); + + // Get available glyph index + if (availableGlyphIndexes.Count > 0) + { + spriteGlyph.index = availableGlyphIndexes[0]; + availableGlyphIndexes.RemoveAt(0); + } + else + spriteGlyph.index = (uint)spriteGlyphTable.Count; + + spriteGlyph.metrics = new GlyphMetrics(sprite.rect.width, sprite.rect.height, -sprite.pivot.x, sprite.rect.height - sprite.pivot.y, sprite.rect.width); + spriteGlyph.glyphRect = new GlyphRect(sprite.rect); + spriteGlyph.scale = 1.0f; + spriteGlyph.sprite = sprite; + + spriteGlyphTable.Add(spriteGlyph); + + TMP_SpriteCharacter spriteCharacter = new TMP_SpriteCharacter(0, spriteGlyph); + spriteCharacter.name = sprite.name; + spriteCharacter.scale = 1.0f; + + spriteAsset.spriteCharacterTable.Add(spriteCharacter); + } + else + { + // Look for changes in existing Sprite Glyph + Sprite sprite = sprites[i]; + + TMP_SpriteGlyph spriteGlyph = spriteGlyphTable[glyphIndex]; + + // We only update changes to the sprite position / glyph rect. + if (spriteGlyph.glyphRect.x != sprite.rect.x || spriteGlyph.glyphRect.y != sprite.rect.y || spriteGlyph.glyphRect.width != sprite.rect.width || spriteGlyph.glyphRect.height != sprite.rect.height) + spriteGlyph.glyphRect = new GlyphRect(sprite.rect); + } + } + + // Sort glyph table by glyph index + spriteAsset.SortGlyphTable(); + spriteAsset.UpdateLookupTables(); + TMPro_EventManager.ON_SPRITE_ASSET_PROPERTY_CHANGED(true, spriteAsset); + } + + + [MenuItem("Assets/Create/TextMeshPro/Sprite Asset", false, 110)] + public static void CreateSpriteAsset() + { + Object target = Selection.activeObject; + + // Make sure the selection is a texture. + if (target == null || target.GetType() != typeof(Texture2D)) + { + Debug.LogWarning("A texture which contains sprites must first be selected in order to create a TextMesh Pro Sprite Asset."); + return; + } + + Texture2D sourceTex = target as Texture2D; + + // Get the path to the selected texture. + string filePathWithName = AssetDatabase.GetAssetPath(sourceTex); + string fileNameWithExtension = Path.GetFileName(filePathWithName); + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(filePathWithName); + string filePath = filePathWithName.Replace(fileNameWithExtension, ""); + + // Check if Sprite Asset already exists + TMP_SpriteAsset spriteAsset = AssetDatabase.LoadAssetAtPath(filePath + fileNameWithoutExtension + ".asset", typeof(TMP_SpriteAsset)) as TMP_SpriteAsset; + bool isNewAsset = spriteAsset == null ? true : false; + + if (isNewAsset) + { + // Create new Sprite Asset using this texture + spriteAsset = ScriptableObject.CreateInstance(); + AssetDatabase.CreateAsset(spriteAsset, filePath + fileNameWithoutExtension + ".asset"); + + spriteAsset.version = "1.1.0"; + + // Compute the hash code for the sprite asset. + spriteAsset.hashCode = TMP_TextUtilities.GetSimpleHashCode(spriteAsset.name); + + // Assign new Sprite Sheet texture to the Sprite Asset. + spriteAsset.spriteSheet = sourceTex; + + List spriteGlyphTable = new List(); + List spriteCharacterTable = new List(); + + PopulateSpriteTables(sourceTex, ref spriteCharacterTable, ref spriteGlyphTable); + + spriteAsset.spriteCharacterTable = spriteCharacterTable; + spriteAsset.spriteGlyphTable = spriteGlyphTable; + + // Add new default material for sprite asset. + AddDefaultMaterial(spriteAsset); + } + //else + //{ + // spriteAsset.spriteInfoList = UpdateSpriteInfo(spriteAsset); + + // // Make sure the sprite asset already contains a default material + // if (spriteAsset.material == null) + // { + // // Add new default material for sprite asset. + // AddDefaultMaterial(spriteAsset); + // } + + //} + + // Update Lookup tables. + spriteAsset.UpdateLookupTables(); + + // Get the Sprites contained in the Sprite Sheet + EditorUtility.SetDirty(spriteAsset); + + //spriteAsset.sprites = sprites; + + // Set source texture back to Not Readable. + //texImporter.isReadable = false; + + + AssetDatabase.SaveAssets(); + + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(spriteAsset)); // Re-import font asset to get the new updated version. + + //AssetDatabase.Refresh(); + } + + + private static void PopulateSpriteTables(Texture source, ref List spriteCharacterTable, ref List spriteGlyphTable) + { + //Debug.Log("Creating new Sprite Asset."); + + string filePath = AssetDatabase.GetAssetPath(source); + + // Get all the Sprites sorted by Index + Sprite[] sprites = AssetDatabase.LoadAllAssetsAtPath(filePath).Select(x => x as Sprite).Where(x => x != null).OrderByDescending(x => x.rect.y).ThenBy(x => x.rect.x).ToArray(); + + for (int i = 0; i < sprites.Length; i++) + { + Sprite sprite = sprites[i]; + + TMP_SpriteGlyph spriteGlyph = new TMP_SpriteGlyph(); + spriteGlyph.index = (uint)i; + spriteGlyph.metrics = new GlyphMetrics(sprite.rect.width, sprite.rect.height, -sprite.pivot.x, sprite.rect.height - sprite.pivot.y, sprite.rect.width); + spriteGlyph.glyphRect = new GlyphRect(sprite.rect); + spriteGlyph.scale = 1.0f; + spriteGlyph.sprite = sprite; + + spriteGlyphTable.Add(spriteGlyph); + + TMP_SpriteCharacter spriteCharacter = new TMP_SpriteCharacter(0, spriteGlyph); + spriteCharacter.name = sprite.name; + spriteCharacter.scale = 1.0f; + + spriteCharacterTable.Add(spriteCharacter); + } + } + + + /// + /// Create and add new default material to sprite asset. + /// + /// + private static void AddDefaultMaterial(TMP_SpriteAsset spriteAsset) + { + Shader shader = Shader.Find("TextMeshPro/Sprite"); + Material material = new Material(shader); + material.SetTexture(ShaderUtilities.ID_MainTex, spriteAsset.spriteSheet); + + spriteAsset.material = material; + material.hideFlags = HideFlags.HideInHierarchy; + AssetDatabase.AddObjectToAsset(material, spriteAsset); + } + + + // Update existing SpriteInfo + private static List UpdateSpriteInfo(TMP_SpriteAsset spriteAsset) + { + //Debug.Log("Updating Sprite Asset."); + + string filePath = AssetDatabase.GetAssetPath(spriteAsset.spriteSheet); + + // Get all the Sprites sorted Left to Right / Top to Bottom + Sprite[] sprites = AssetDatabase.LoadAllAssetsAtPath(filePath).Select(x => x as Sprite).Where(x => x != null).OrderByDescending(x => x.rect.y).ThenBy(x => x.rect.x).ToArray(); + + for (int i = 0; i < sprites.Length; i++) + { + Sprite sprite = sprites[i]; + + // Check if the sprite is already contained in the SpriteInfoList + int index = -1; + if (spriteAsset.spriteInfoList.Count > i && spriteAsset.spriteInfoList[i].sprite != null) + index = spriteAsset.spriteInfoList.FindIndex(item => item.sprite.GetInstanceID() == sprite.GetInstanceID()); + + // Use existing SpriteInfo if it already exists + TMP_Sprite spriteInfo = index == -1 ? new TMP_Sprite() : spriteAsset.spriteInfoList[index]; + + Rect spriteRect = sprite.rect; + spriteInfo.x = spriteRect.x; + spriteInfo.y = spriteRect.y; + spriteInfo.width = spriteRect.width; + spriteInfo.height = spriteRect.height; + + // Get Sprite Pivot + Vector2 pivot = new Vector2(0 - (sprite.bounds.min.x) / (sprite.bounds.extents.x * 2), 0 - (sprite.bounds.min.y) / (sprite.bounds.extents.y * 2)); + + // The position of the pivot influences the Offset position. + spriteInfo.pivot = new Vector2(0 - pivot.x * spriteRect.width, spriteRect.height - pivot.y * spriteRect.height); + + if (index == -1) + { + // Find the next available index for this Sprite + int[] ids = spriteAsset.spriteInfoList.Select(item => item.id).ToArray(); + + int id = 0; + for (int j = 0; j < ids.Length; j++ ) + { + if (ids[0] != 0) break; + + if (j > 0 && (ids[j] - ids[j - 1]) > 1) + { + id = ids[j - 1] + 1; + break; + } + + id = j + 1; + } + + spriteInfo.sprite = sprite; + spriteInfo.name = sprite.name; + spriteInfo.hashCode = TMP_TextUtilities.GetSimpleHashCode(spriteInfo.name); + spriteInfo.id = id; + spriteInfo.xAdvance = spriteRect.width; + spriteInfo.scale = 1.0f; + + spriteInfo.xOffset = spriteInfo.pivot.x; + spriteInfo.yOffset = spriteInfo.pivot.y; + + spriteAsset.spriteInfoList.Add(spriteInfo); + + // Sort the Sprites by ID + spriteAsset.spriteInfoList = spriteAsset.spriteInfoList.OrderBy(s => s.id).ToList(); + } + else + { + spriteAsset.spriteInfoList[index] = spriteInfo; + } + } + + return spriteAsset.spriteInfoList; + } + + + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta new file mode 100644 index 00000000..850ab1f2 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1048a87135154606808bf2030da32d18 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs new file mode 100644 index 00000000..abe49a68 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs @@ -0,0 +1,225 @@ +using UnityEngine; +using UnityEngine.TextCore; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(TMP_SpriteCharacter))] + public class TMP_SpriteCharacterPropertyDrawer : PropertyDrawer + { + int m_GlyphSelectedForEditing = -1; + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty prop_SpriteName = property.FindPropertyRelative("m_Name"); + SerializedProperty prop_SpriteNameHashCode = property.FindPropertyRelative("m_HashCode"); + SerializedProperty prop_SpriteUnicode = property.FindPropertyRelative("m_Unicode"); + SerializedProperty prop_SpriteGlyphIndex = property.FindPropertyRelative("m_GlyphIndex"); + SerializedProperty prop_SpriteScale = property.FindPropertyRelative("m_Scale"); + + + GUIStyle style = new GUIStyle(EditorStyles.label); + style.richText = true; + + EditorGUIUtility.labelWidth = 40f; + EditorGUIUtility.fieldWidth = 50; + + Rect rect = new Rect(position.x + 60, position.y, position.width, 49); + + // Display non-editable fields + if (GUI.enabled == false) + { + // Sprite Character Index + int.TryParse(property.displayName.Split(' ')[1], out int spriteCharacterIndex); + EditorGUI.LabelField(new Rect(rect.x, rect.y, 75f, 18), new GUIContent("Index: " + spriteCharacterIndex + ""), style); + + EditorGUI.LabelField(new Rect(rect.x + 75f, rect.y, 120f, 18), new GUIContent("Unicode: 0x" + prop_SpriteUnicode.intValue.ToString("X") + ""), style); + EditorGUI.LabelField(new Rect(rect.x + 195f, rect.y, rect.width - 255, 18), new GUIContent("Name: " + prop_SpriteName.stringValue + ""), style); + + EditorGUI.LabelField(new Rect(rect.x, rect.y + 18, 120, 18), new GUIContent("Glyph ID: " + prop_SpriteGlyphIndex.intValue + ""), style); + + // Draw Sprite Glyph (if exists) + DrawSpriteGlyph(position, property); + + EditorGUI.LabelField(new Rect(rect.x, rect.y + 36, 80, 18), new GUIContent("Scale: " + prop_SpriteScale.floatValue + ""), style); + } + else // Display editable fields + { + // Get a reference to the underlying Sprite Asset + TMP_SpriteAsset spriteAsset = property.serializedObject.targetObject as TMP_SpriteAsset; + + // Sprite Character Index + int.TryParse(property.displayName.Split(' ')[1], out int spriteCharacterIndex); + + EditorGUI.LabelField(new Rect(rect.x, rect.y, 75f, 18), new GUIContent("Index: " + spriteCharacterIndex + ""), style); + + EditorGUIUtility.labelWidth = 55f; + GUI.SetNextControlName("Unicode Input"); + EditorGUI.BeginChangeCheck(); + string unicode = EditorGUI.DelayedTextField(new Rect(rect.x + 75f, rect.y, 120, 18), "Unicode:", prop_SpriteUnicode.intValue.ToString("X")); + + if (GUI.GetNameOfFocusedControl() == "Unicode Input") + { + //Filter out unwanted characters. + char chr = Event.current.character; + if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F')) + { + Event.current.character = '\0'; + } + } + + if (EditorGUI.EndChangeCheck()) + { + // Update Unicode value + prop_SpriteUnicode.intValue = TMP_TextUtilities.StringHexToInt(unicode); + spriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + } + + EditorGUIUtility.labelWidth = 41f; + EditorGUI.BeginChangeCheck(); + EditorGUI.DelayedTextField(new Rect(rect.x + 195f, rect.y, rect.width - 255, 18), prop_SpriteName, new GUIContent("Name:")); + if (EditorGUI.EndChangeCheck()) + { + // Recompute hashCode for new name + prop_SpriteNameHashCode.intValue = TMP_TextUtilities.GetSimpleHashCode(prop_SpriteName.stringValue); + spriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + } + + EditorGUIUtility.labelWidth = 59f; + EditorGUI.BeginChangeCheck(); + EditorGUI.DelayedIntField(new Rect(rect.x, rect.y + 18, 100, 18), prop_SpriteGlyphIndex, new GUIContent("Glyph ID:")); + if (EditorGUI.EndChangeCheck()) + { + spriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + } + + // Draw Sprite Glyph (if exists) + DrawSpriteGlyph(position, property); + + int glyphIndex = prop_SpriteGlyphIndex.intValue; + + // Reset glyph selection if new character has been selected. + if (GUI.enabled && m_GlyphSelectedForEditing != glyphIndex) + m_GlyphSelectedForEditing = -1; + + // Display button to edit the glyph data. + if (GUI.Button(new Rect(rect.x + 120, rect.y + 18, 75, 18), new GUIContent("Edit Glyph"))) + { + if (m_GlyphSelectedForEditing == -1) + m_GlyphSelectedForEditing = glyphIndex; + else + m_GlyphSelectedForEditing = -1; + + // Button clicks should not result in potential change. + GUI.changed = false; + } + + // Show the glyph property drawer if selected + if (glyphIndex == m_GlyphSelectedForEditing && GUI.enabled) + { + if (spriteAsset != null) + { + // Lookup glyph and draw glyph (if available) + int elementIndex = spriteAsset.spriteGlyphTable.FindIndex(item => item.index == glyphIndex); + + if (elementIndex != -1) + { + // Get a reference to the Sprite Glyph Table + SerializedProperty prop_SpriteGlyphTable = property.serializedObject.FindProperty("m_SpriteGlyphTable"); + + SerializedProperty prop_SpriteGlyph = prop_SpriteGlyphTable.GetArrayElementAtIndex(elementIndex); + SerializedProperty prop_GlyphMetrics = prop_SpriteGlyph.FindPropertyRelative("m_Metrics"); + SerializedProperty prop_GlyphRect = prop_SpriteGlyph.FindPropertyRelative("m_GlyphRect"); + + Rect newRect = EditorGUILayout.GetControlRect(false, 115); + EditorGUI.DrawRect(new Rect(newRect.x + 62, newRect.y - 20, newRect.width - 62, newRect.height - 5), new Color(0.1f, 0.1f, 0.1f, 0.45f)); + EditorGUI.DrawRect(new Rect(newRect.x + 63, newRect.y - 19, newRect.width - 64, newRect.height - 7), new Color(0.3f, 0.3f, 0.3f, 0.8f)); + + // Display GlyphRect + newRect.x += 65; + newRect.y -= 18; + newRect.width += 5; + EditorGUI.PropertyField(newRect, prop_GlyphRect); + + // Display GlyphMetrics + newRect.y += 45; + EditorGUI.PropertyField(newRect, prop_GlyphMetrics); + + rect.y += 120; + } + } + } + + EditorGUIUtility.labelWidth = 39f; + EditorGUI.PropertyField(new Rect(rect.x, rect.y + 36, 80, 18), prop_SpriteScale, new GUIContent("Scale:")); + } + } + + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return 58; + } + + + void DrawSpriteGlyph(Rect position, SerializedProperty property) + { + // Get a reference to the sprite glyph table + TMP_SpriteAsset spriteAsset = property.serializedObject.targetObject as TMP_SpriteAsset; + + if (spriteAsset == null) + return; + + int glyphIndex = property.FindPropertyRelative("m_GlyphIndex").intValue; + + // Lookup glyph and draw glyph (if available) + int elementIndex = spriteAsset.spriteGlyphTable.FindIndex(item => item.index == glyphIndex); + + if (elementIndex != -1) + { + // Get a reference to the Sprite Glyph Table + SerializedProperty prop_SpriteGlyphTable = property.serializedObject.FindProperty("m_SpriteGlyphTable"); + SerializedProperty prop_SpriteGlyph = prop_SpriteGlyphTable.GetArrayElementAtIndex(elementIndex); + SerializedProperty prop_GlyphRect = prop_SpriteGlyph.FindPropertyRelative("m_GlyphRect"); + + // Get a reference to the sprite texture + Texture tex = spriteAsset.spriteSheet; + + // Return if we don't have a texture assigned to the sprite asset. + if (tex == null) + { + Debug.LogWarning("Please assign a valid Sprite Atlas texture to the [" + spriteAsset.name + "] Sprite Asset.", spriteAsset); + return; + } + + Vector2 spriteTexPosition = new Vector2(position.x, position.y); + Vector2 spriteSize = new Vector2(48, 48); + Vector2 alignmentOffset = new Vector2((58 - spriteSize.x) / 2, (58 - spriteSize.y) / 2); + + float x = prop_GlyphRect.FindPropertyRelative("m_X").intValue; + float y = prop_GlyphRect.FindPropertyRelative("m_Y").intValue; + float spriteWidth = prop_GlyphRect.FindPropertyRelative("m_Width").intValue; + float spriteHeight = prop_GlyphRect.FindPropertyRelative("m_Height").intValue; + + if (spriteWidth >= spriteHeight) + { + spriteSize.y = spriteHeight * spriteSize.x / spriteWidth; + spriteTexPosition.y += (spriteSize.x - spriteSize.y) / 2; + } + else + { + spriteSize.x = spriteWidth * spriteSize.y / spriteHeight; + spriteTexPosition.x += (spriteSize.y - spriteSize.x) / 2; + } + + // Compute the normalized texture coordinates + Rect texCoords = new Rect(x / tex.width, y / tex.height, spriteWidth / tex.width, spriteHeight / tex.height); + GUI.DrawTextureWithTexCoords(new Rect(spriteTexPosition.x + alignmentOffset.x, spriteTexPosition.y + alignmentOffset.y, spriteSize.x, spriteSize.y), tex, texCoords, true); + } + } + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta new file mode 100644 index 00000000..0733749d --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 37cff9f5a86ae494c8cb04423580480d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs new file mode 100644 index 00000000..06f527ec --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs @@ -0,0 +1,93 @@ +using UnityEngine; +using UnityEngine.TextCore; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(TMP_SpriteGlyph))] + public class TMP_SpriteGlyphPropertyDrawer : PropertyDrawer + { + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty prop_GlyphIndex = property.FindPropertyRelative("m_Index"); + SerializedProperty prop_GlyphMetrics = property.FindPropertyRelative("m_Metrics"); + SerializedProperty prop_GlyphRect = property.FindPropertyRelative("m_GlyphRect"); + SerializedProperty prop_Scale = property.FindPropertyRelative("m_Scale"); + SerializedProperty prop_AtlasIndex = property.FindPropertyRelative("m_AtlasIndex"); + + GUIStyle style = new GUIStyle(EditorStyles.label); + style.richText = true; + + Rect rect = new Rect(position.x + 70, position.y, position.width, 49); + + // Draw GlyphRect + EditorGUI.PropertyField(rect, prop_GlyphRect); + + // Draw GlyphMetrics + rect.y += 45; + EditorGUI.PropertyField(rect, prop_GlyphMetrics); + + EditorGUIUtility.labelWidth = 40f; + EditorGUI.PropertyField(new Rect(rect.x, rect.y + 65, 75, 18), prop_Scale, new GUIContent("Scale:")); + + EditorGUIUtility.labelWidth = 74f; + EditorGUI.PropertyField(new Rect(rect.x + 85, rect.y + 65, 95, 18), prop_AtlasIndex, new GUIContent("Atlas Index:")); + + DrawGlyph(position, property); + + int.TryParse(property.displayName.Split(' ')[1], out int spriteCharacterIndex); + float labelWidthIndex = GUI.skin.label.CalcSize(new GUIContent("#" + spriteCharacterIndex)).x; + EditorGUI.LabelField(new Rect(position.x, position.y + 5, 64f, 18f), new GUIContent("#" + spriteCharacterIndex), style); + + float labelWidthID = GUI.skin.label.CalcSize(new GUIContent("ID: " + prop_GlyphIndex.intValue)).x; + EditorGUI.LabelField(new Rect(position.x + (64 - labelWidthID) / 2, position.y + 110, 64f, 18f), new GUIContent("ID: " + prop_GlyphIndex.intValue + ""), style); + } + + void DrawGlyph(Rect position, SerializedProperty property) + { + // Get a reference to the sprite texture + Texture tex = (property.serializedObject.targetObject as TMP_SpriteAsset).spriteSheet; + + // Return if we don't have a texture assigned to the sprite asset. + if (tex == null) + { + Debug.LogWarning("Please assign a valid Sprite Atlas texture to the [" + property.serializedObject.targetObject.name + "] Sprite Asset.", property.serializedObject.targetObject); + return; + } + + Vector2 spriteTexPosition = new Vector2(position.x, position.y); + Vector2 spriteSize = new Vector2(65, 65); + + SerializedProperty prop_GlyphRect = property.FindPropertyRelative("m_GlyphRect"); + + int spriteImageX = prop_GlyphRect.FindPropertyRelative("m_X").intValue; + int spriteImageY = prop_GlyphRect.FindPropertyRelative("m_Y").intValue; + int spriteImageWidth = prop_GlyphRect.FindPropertyRelative("m_Width").intValue; + int spriteImageHeight = prop_GlyphRect.FindPropertyRelative("m_Height").intValue; + + if (spriteImageWidth >= spriteImageHeight) + { + spriteSize.y = spriteImageHeight * spriteSize.x / spriteImageWidth; + spriteTexPosition.y += (spriteSize.x - spriteSize.y) / 2; + } + else + { + spriteSize.x = spriteImageWidth * spriteSize.y / spriteImageHeight; + spriteTexPosition.x += (spriteSize.y - spriteSize.x) / 2; + } + + // Compute the normalized texture coordinates + Rect texCoords = new Rect((float)spriteImageX / tex.width, (float)spriteImageY / tex.height, (float)spriteImageWidth / tex.width, (float)spriteImageHeight / tex.height); + GUI.DrawTextureWithTexCoords(new Rect(spriteTexPosition.x + 5, spriteTexPosition.y + 32f, spriteSize.x, spriteSize.y), tex, texCoords, true); + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return 130f; + } + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta new file mode 100644 index 00000000..04145626 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 056819c66570ca54cadb72330a354050 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleAssetMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleAssetMenu.cs new file mode 100644 index 00000000..0ae9c386 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleAssetMenu.cs @@ -0,0 +1,49 @@ +using UnityEngine; +using UnityEditor; +using System.IO; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + public static class TMP_StyleAssetMenu + { + + [MenuItem("Assets/Create/TextMeshPro/Style Sheet", false, 120)] + public static void CreateTextMeshProObjectPerform() + { + string filePath; + if (Selection.assetGUIDs.Length == 0) + { + // No asset selected. + filePath = "Assets"; + } + else + { + // Get the path of the selected folder or asset. + filePath = AssetDatabase.GUIDToAssetPath(Selection.assetGUIDs[0]); + + // Get the file extension of the selected asset as it might need to be removed. + string fileExtension = Path.GetExtension(filePath); + if (fileExtension != "") + { + filePath = Path.GetDirectoryName(filePath); + } + } + + + string filePathWithName = AssetDatabase.GenerateUniqueAssetPath(filePath + "/TMP StyleSheet.asset"); + + //// Create new Style Sheet Asset. + TMP_StyleSheet styleSheet = ScriptableObject.CreateInstance(); + + AssetDatabase.CreateAsset(styleSheet, filePathWithName); + + EditorUtility.SetDirty(styleSheet); + + AssetDatabase.SaveAssets(); + } + } + +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleAssetMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleAssetMenu.cs.meta new file mode 100644 index 00000000..cb44dc27 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleAssetMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 23a562f2cac6401f9f91251c68a1a794 +timeCreated: 1432690168 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleSheetEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleSheetEditor.cs new file mode 100644 index 00000000..2e7f6de8 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleSheetEditor.cs @@ -0,0 +1,278 @@ +using UnityEngine; +using UnityEditor; + + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(TMP_Style))] + public class StyleDrawer : PropertyDrawer + { + public static readonly float height = 95f; + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return height; + } + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SerializedProperty nameProperty = property.FindPropertyRelative("m_Name"); + SerializedProperty hashCodeProperty = property.FindPropertyRelative("m_HashCode"); + SerializedProperty openingDefinitionProperty = property.FindPropertyRelative("m_OpeningDefinition"); + SerializedProperty closingDefinitionProperty = property.FindPropertyRelative("m_ClosingDefinition"); + SerializedProperty openingDefinitionArray = property.FindPropertyRelative("m_OpeningTagArray"); + SerializedProperty closingDefinitionArray = property.FindPropertyRelative("m_ClosingTagArray"); + + + EditorGUIUtility.labelWidth = 90; + position.height = EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; + float labelHeight = position.height + 2f; + + EditorGUI.BeginChangeCheck(); + Rect rect0 = new Rect(position.x, position.y, (position.width) / 2 + 5, position.height); + EditorGUI.PropertyField(rect0, nameProperty); + if (EditorGUI.EndChangeCheck()) + { + // Recompute HashCode if name has changed. + hashCodeProperty.intValue = TMP_TextUtilities.GetSimpleHashCode(nameProperty.stringValue); + + property.serializedObject.ApplyModifiedProperties(); + // Dictionary needs to be updated since HashCode has changed. + TMP_StyleSheet.RefreshStyles(); + } + + // HashCode + Rect rect1 = new Rect(rect0.x + rect0.width + 5, position.y, 65, position.height); + GUI.Label(rect1, "HashCode"); + GUI.enabled = false; + rect1.x += 65; + rect1.width = position.width / 2 - 75; + EditorGUI.PropertyField(rect1, hashCodeProperty, GUIContent.none); + + GUI.enabled = true; + + // Text Tags + EditorGUI.BeginChangeCheck(); + + // Opening Tags + position.y += labelHeight; + GUI.Label(position, "Opening Tags"); + Rect textRect1 = new Rect(108, position.y, position.width - 86, 35); + openingDefinitionProperty.stringValue = EditorGUI.TextArea(textRect1, openingDefinitionProperty.stringValue); + if (EditorGUI.EndChangeCheck()) + { + // If any properties have changed, we need to update the Opening and Closing Arrays. + int size = openingDefinitionProperty.stringValue.Length; + + // Adjust array size to match new string length. + if (openingDefinitionArray.arraySize != size) openingDefinitionArray.arraySize = size; + + for (int i = 0; i < size; i++) + { + SerializedProperty element = openingDefinitionArray.GetArrayElementAtIndex(i); + element.intValue = openingDefinitionProperty.stringValue[i]; + } + } + + EditorGUI.BeginChangeCheck(); + + // Closing Tags + position.y += 38; + GUI.Label(position, "Closing Tags"); + Rect textRect2 = new Rect(108, position.y, position.width - 86, 35); + closingDefinitionProperty.stringValue = EditorGUI.TextArea(textRect2, closingDefinitionProperty.stringValue); + + if (EditorGUI.EndChangeCheck()) + { + // If any properties have changed, we need to update the Opening and Closing Arrays. + int size = closingDefinitionProperty.stringValue.Length; + + // Adjust array size to match new string length. + if (closingDefinitionArray.arraySize != size) closingDefinitionArray.arraySize = size; + + for (int i = 0; i < size; i++) + { + SerializedProperty element = closingDefinitionArray.GetArrayElementAtIndex(i); + element.intValue = closingDefinitionProperty.stringValue[i]; + } + } + + } + } + + + + [CustomEditor(typeof(TMP_StyleSheet)), CanEditMultipleObjects] + public class TMP_StyleEditor : Editor + { + + SerializedProperty m_StyleListProp; + + int m_SelectedElement = -1; + + //private Event m_CurrentEvent; + int m_Page; + + + + void OnEnable() + { + m_StyleListProp = serializedObject.FindProperty("m_StyleList"); + } + + + public override void OnInspectorGUI() + { + Event currentEvent = Event.current; + + serializedObject.Update(); + + int arraySize = m_StyleListProp.arraySize; + int itemsPerPage = (Screen.height - 178) / 111; + + if (arraySize > 0) + { + // Display each Style entry using the StyleDrawer PropertyDrawer. + for (int i = itemsPerPage * m_Page; i < arraySize && i < itemsPerPage * (m_Page + 1); i++) + { + + // Define the start of the selection region of the element. + Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + SerializedProperty spriteInfo = m_StyleListProp.GetArrayElementAtIndex(i); + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(spriteInfo); + EditorGUILayout.EndVertical(); + if (EditorGUI.EndChangeCheck()) + { + // + } + + // Define the end of the selection region of the element. + Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); + + // Check for Item selection + Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); + if (DoSelectionCheck(selectionArea)) + { + if (m_SelectedElement == i) + { + m_SelectedElement = -1; + } + else + { + m_SelectedElement = i; + GUIUtility.keyboardControl = 0; + } + } + + // Handle Selection Highlighting + if (m_SelectedElement == i) + { + TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); + } + } + } + + int shiftMultiplier = currentEvent.shift ? 10 : 1; // Page + Shift goes 10 page forward + + GUILayout.Space(-3f); + + Rect pagePos = EditorGUILayout.GetControlRect(false, 20); + pagePos.width /= 6; + + // Return if we can't display any items. + if (itemsPerPage == 0) return; + + + // Add new style. + pagePos.x += pagePos.width * 4; + if (GUI.Button(pagePos, "+")) + { + m_StyleListProp.arraySize += 1; + serializedObject.ApplyModifiedProperties(); + TMP_StyleSheet.RefreshStyles(); + } + + + // Delete selected style. + pagePos.x += pagePos.width; + if (m_SelectedElement == -1) GUI.enabled = false; + if (GUI.Button(pagePos, "-")) + { + if (m_SelectedElement != -1) + m_StyleListProp.DeleteArrayElementAtIndex(m_SelectedElement); + + m_SelectedElement = -1; + serializedObject.ApplyModifiedProperties(); + TMP_StyleSheet.RefreshStyles(); + } + + GUILayout.Space(5f); + + pagePos = EditorGUILayout.GetControlRect(false, 20); + pagePos.width /= 3; + + + // Previous Page + if (m_Page > 0) GUI.enabled = true; + else GUI.enabled = false; + + if (GUI.Button(pagePos, "Previous")) + m_Page -= 1 * shiftMultiplier; + + // PAGE COUNTER + GUI.enabled = true; + pagePos.x += pagePos.width; + int totalPages = (int)(arraySize / (float)itemsPerPage + 0.999f); + GUI.Label(pagePos, "Page " + (m_Page + 1) + " / " + totalPages, TMP_UIStyleManager.centeredLabel); + + // Next Page + pagePos.x += pagePos.width; + if (itemsPerPage * (m_Page + 1) < arraySize) GUI.enabled = true; + else GUI.enabled = false; + + if (GUI.Button(pagePos, "Next")) + m_Page += 1 * shiftMultiplier; + + // Clamp page range + m_Page = Mathf.Clamp(m_Page, 0, arraySize / itemsPerPage); + + + if (serializedObject.ApplyModifiedProperties()) + TMPro_EventManager.ON_TEXT_STYLE_PROPERTY_CHANGED(true); + + // Clear selection if mouse event was not consumed. + GUI.enabled = true; + if (currentEvent.type == EventType.MouseDown && currentEvent.button == 0) + m_SelectedElement = -1; + + + } + + + // Check if any of the Style elements were clicked on. + static bool DoSelectionCheck(Rect selectionArea) + { + Event currentEvent = Event.current; + + switch (currentEvent.type) + { + case EventType.MouseDown: + if (selectionArea.Contains(currentEvent.mousePosition) && currentEvent.button == 0) + { + currentEvent.Use(); + return true; + } + break; + } + + return false; + } + + } + +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleSheetEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleSheetEditor.cs.meta new file mode 100644 index 00000000..a3bff26f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_StyleSheetEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 34e2c9b9d9e44953933afe37461f44e6 +timeCreated: 1432683777 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMeshUI_Editor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMeshUI_Editor.cs new file mode 100644 index 00000000..1cbea769 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMeshUI_Editor.cs @@ -0,0 +1,98 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace TMPro.EditorUtilities +{ + [CustomEditor(typeof(TMP_SubMeshUI)), CanEditMultipleObjects] + public class TMP_SubMeshUI_Editor : Editor + { + private struct m_foldout + { // Track Inspector foldout panel states, globally. + //public static bool textInput = true; + public static bool fontSettings = true; + //public static bool extraSettings = false; + //public static bool shadowSetting = false; + //public static bool materialEditor = true; + } + + private SerializedProperty fontAsset_prop; + private SerializedProperty spriteAsset_prop; + + private TMP_SubMeshUI m_SubMeshComponent; + + private CanvasRenderer m_canvasRenderer; + private Editor m_materialEditor; + private Material m_targetMaterial; + + + public void OnEnable() + { + fontAsset_prop = serializedObject.FindProperty("m_fontAsset"); + spriteAsset_prop = serializedObject.FindProperty("m_spriteAsset"); + + m_SubMeshComponent = target as TMP_SubMeshUI; + //m_rectTransform = m_SubMeshComponent.rectTransform; + m_canvasRenderer = m_SubMeshComponent.canvasRenderer; + + + // Create new Material Editor if one does not exists + if (m_canvasRenderer != null && m_canvasRenderer.GetMaterial() != null) + { + m_materialEditor = Editor.CreateEditor(m_canvasRenderer.GetMaterial()); + m_targetMaterial = m_canvasRenderer.GetMaterial(); + } + } + + + public void OnDisable() + { + // Destroy material editor if one exists + if (m_materialEditor != null) + { + //Debug.Log("Destroying Inline Material Editor."); + DestroyImmediate(m_materialEditor); + } + } + + + + public override void OnInspectorGUI() + { + GUI.enabled = false; + EditorGUILayout.PropertyField(fontAsset_prop); + EditorGUILayout.PropertyField(spriteAsset_prop); + GUI.enabled = true; + + EditorGUILayout.Space(); + + // If a Custom Material Editor exists, we use it. + if (m_canvasRenderer != null && m_canvasRenderer.GetMaterial() != null) + { + Material mat = m_canvasRenderer.GetMaterial(); + + //Debug.Log(mat + " " + m_targetMaterial); + + if (mat != m_targetMaterial) + { + // Destroy previous Material Instance + //Debug.Log("New Material has been assigned."); + m_targetMaterial = mat; + DestroyImmediate(m_materialEditor); + } + + + if (m_materialEditor == null) + { + m_materialEditor = Editor.CreateEditor(mat); + } + + m_materialEditor.DrawHeader(); + + + m_materialEditor.OnInspectorGUI(); + } + } + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta new file mode 100644 index 00000000..b82410e5 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6b01141ed8f74d198965c86f25eb7040 +timeCreated: 1452757501 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMesh_Editor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMesh_Editor.cs new file mode 100644 index 00000000..b5a3cc7c --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMesh_Editor.cs @@ -0,0 +1,76 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace TMPro.EditorUtilities +{ + [CustomEditor(typeof(TMP_SubMesh)), CanEditMultipleObjects] + public class TMP_SubMesh_Editor : Editor + { + private struct m_foldout + { // Track Inspector foldout panel states, globally. + //public static bool textInput = true; + public static bool fontSettings = true; + //public static bool extraSettings = false; + //public static bool shadowSetting = false; + //public static bool materialEditor = true; + } + + private SerializedProperty fontAsset_prop; + private SerializedProperty spriteAsset_prop; + + private TMP_SubMesh m_SubMeshComponent; + private Renderer m_Renderer; + + public void OnEnable() + { + fontAsset_prop = serializedObject.FindProperty("m_fontAsset"); + spriteAsset_prop = serializedObject.FindProperty("m_spriteAsset"); + + m_SubMeshComponent = target as TMP_SubMesh; + + m_Renderer = m_SubMeshComponent.renderer; + } + + + public override void OnInspectorGUI() + { + EditorGUI.indentLevel = 0; + + GUI.enabled = false; + EditorGUILayout.PropertyField(fontAsset_prop); + EditorGUILayout.PropertyField(spriteAsset_prop); + GUI.enabled = true; + + EditorGUI.BeginChangeCheck(); + + // SORTING LAYERS + var sortingLayerNames = SortingLayerHelper.sortingLayerNames; + + // Look up the layer name using the current layer ID + string oldName = SortingLayerHelper.GetSortingLayerNameFromID(m_Renderer.sortingLayerID); + + // Use the name to look up our array index into the names list + int oldLayerIndex = System.Array.IndexOf(sortingLayerNames, oldName); + + // Show the pop-up for the names + int newLayerIndex = EditorGUILayout.Popup("Sorting Layer", oldLayerIndex, sortingLayerNames); + + // If the index changes, look up the ID for the new index to store as the new ID + if (newLayerIndex != oldLayerIndex) + { + //Undo.RecordObject(renderer, "Edit Sorting Layer"); + m_Renderer.sortingLayerID = SortingLayerHelper.GetSortingLayerIDForIndex(newLayerIndex); + //EditorUtility.SetDirty(renderer); + } + + // Expose the manual sorting order + int newSortingLayerOrder = EditorGUILayout.IntField("Order in Layer", m_Renderer.sortingOrder); + if (newSortingLayerOrder != m_Renderer.sortingOrder) + { + //Undo.RecordObject(renderer, "Edit Sorting Order"); + m_Renderer.sortingOrder = newSortingLayerOrder; + } + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMesh_Editor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMesh_Editor.cs.meta new file mode 100644 index 00000000..fd4713b3 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_SubMesh_Editor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dd2fe74169b54bf58fca17288513ef38 +timeCreated: 1456189048 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_TextAlignmentDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_TextAlignmentDrawer.cs new file mode 100644 index 00000000..dbb271c5 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_TextAlignmentDrawer.cs @@ -0,0 +1,119 @@ +using UnityEngine; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + + [CustomPropertyDrawer(typeof(TextAlignmentOptions))] + public class TMP_TextAlignmentDrawer : PropertyDrawer + { + const int k_AlignmentButtonWidth = 24; + const int k_AlignmentButtonHeight = 20; + const int k_WideViewWidth = 504; + const int k_ControlsSpacing = 6; + const int k_GroupWidth = k_AlignmentButtonWidth * 6; + static readonly int k_TextAlignmentHash = "DoTextAligmentControl".GetHashCode(); + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return EditorGUIUtility.currentViewWidth > k_WideViewWidth ? k_AlignmentButtonHeight : k_AlignmentButtonHeight * 2 + 3; + } + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + var id = GUIUtility.GetControlID(k_TextAlignmentHash, FocusType.Keyboard, position); + + EditorGUI.BeginProperty(position, label, property); + { + var controlArea = EditorGUI.PrefixLabel(position, id, label); + + var horizontalAligment = new Rect(controlArea.x, controlArea.y, k_GroupWidth, k_AlignmentButtonHeight); + var verticalAligment = new Rect(!(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.x : horizontalAligment.xMax + k_ControlsSpacing, !(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.y + k_AlignmentButtonHeight + 3 : controlArea.y, k_GroupWidth, k_AlignmentButtonHeight); + + EditorGUI.BeginChangeCheck(); + + var selectedHorizontal = DoHorizontalAligmentControl(horizontalAligment, property); + var selectedVertical = DoVerticalAligmentControl(verticalAligment, property); + + if (EditorGUI.EndChangeCheck()) + { + var value = (0x1 << selectedHorizontal) | (0x100 << selectedVertical); + property.intValue = value; + } + } + EditorGUI.EndProperty(); + } + + static int DoHorizontalAligmentControl(Rect position, SerializedProperty alignment) + { + var selected = TMP_EditorUtility.GetHorizontalAlignmentGridValue(alignment.intValue); + + var values = new bool[6]; + + values[selected] = true; + + if (alignment.hasMultipleDifferentValues) + { + foreach (var obj in alignment.serializedObject.targetObjects) + { + var text = obj as TMP_Text; + if (text != null) + { + values[TMP_EditorUtility.GetHorizontalAlignmentGridValue((int)text.alignment)] = true; + } + } + } + + position.width = k_AlignmentButtonWidth; + + for (var i = 0; i < values.Length; i++) + { + var oldValue = values[i]; + var newValue = TMP_EditorUtility.EditorToggle(position, oldValue, TMP_UIStyleManager.alignContentA[i], i == 0 ? TMP_UIStyleManager.alignmentButtonLeft : (i == 5 ? TMP_UIStyleManager.alignmentButtonRight : TMP_UIStyleManager.alignmentButtonMid)); + if (newValue != oldValue) + { + selected = i; + } + position.x += position.width; + } + + return selected; + } + + static int DoVerticalAligmentControl(Rect position, SerializedProperty alignment) + { + var selected = TMP_EditorUtility.GetVerticalAlignmentGridValue(alignment.intValue); + + var values = new bool[6]; + + values[selected] = true; + + if (alignment.hasMultipleDifferentValues) + { + foreach (var obj in alignment.serializedObject.targetObjects) + { + var text = obj as TMP_Text; + if (text != null) + { + values[TMP_EditorUtility.GetVerticalAlignmentGridValue((int)text.alignment)] = true; + } + } + } + + position.width = k_AlignmentButtonWidth; + + for (var i = 0; i < values.Length; i++) + { + var oldValue = values[i]; + var newValue = TMP_EditorUtility.EditorToggle(position, oldValue, TMP_UIStyleManager.alignContentB[i], i == 0 ? TMP_UIStyleManager.alignmentButtonLeft : (i == 5 ? TMP_UIStyleManager.alignmentButtonRight : TMP_UIStyleManager.alignmentButtonMid)); + if (newValue != oldValue) + { + selected = i; + } + position.x += position.width; + } + + return selected; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta new file mode 100644 index 00000000..a68a2739 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c55a64c7570474f47a94abe39ebfef04 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UIStyleManager.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UIStyleManager.cs new file mode 100644 index 00000000..0a94a997 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UIStyleManager.cs @@ -0,0 +1,134 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + public static class TMP_UIStyleManager + { + public static GUIStyle label; + public static GUIStyle textAreaBoxWindow; + public static GUIStyle boldFoldout; + public static GUIStyle panelTitle; + public static GUIStyle sectionHeader; + public static GUIStyle centeredLabel; + public static GUIStyle rightLabel; + public static GUIStyle wrappingTextArea; + + public static GUIStyle alignmentButtonLeft; + public static GUIStyle alignmentButtonMid; + public static GUIStyle alignmentButtonRight; + + // Alignment Button Textures + public static Texture2D alignLeft; + public static Texture2D alignCenter; + public static Texture2D alignRight; + public static Texture2D alignJustified; + public static Texture2D alignFlush; + public static Texture2D alignGeoCenter; + public static Texture2D alignTop; + public static Texture2D alignMiddle; + public static Texture2D alignBottom; + public static Texture2D alignBaseline; + public static Texture2D alignMidline; + public static Texture2D alignCapline; + public static Texture2D sectionHeaderTexture; + + public static GUIContent[] alignContentA; + public static GUIContent[] alignContentB; + + static TMP_UIStyleManager() + { + // Find to location of the TextMesh Pro Asset Folder (as users may have moved it) + var tmproAssetFolderPath = TMP_EditorUtility.packageRelativePath; + + if (EditorGUIUtility.isProSkin) + { + alignLeft = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignLeft.psd", typeof(Texture2D)) as Texture2D; + alignCenter = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCenter.psd", typeof(Texture2D)) as Texture2D; + alignRight = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignRight.psd", typeof(Texture2D)) as Texture2D; + alignJustified = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignJustified.psd", typeof(Texture2D)) as Texture2D; + alignFlush = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignFlush.psd", typeof(Texture2D)) as Texture2D; + alignGeoCenter = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCenterGeo.psd", typeof(Texture2D)) as Texture2D; + alignTop = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignTop.psd", typeof(Texture2D)) as Texture2D; + alignMiddle = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignMiddle.psd", typeof(Texture2D)) as Texture2D; + alignBottom = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignBottom.psd", typeof(Texture2D)) as Texture2D; + alignBaseline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignBaseLine.psd", typeof(Texture2D)) as Texture2D; + alignMidline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignMidLine.psd", typeof(Texture2D)) as Texture2D; + alignCapline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCapLine.psd", typeof(Texture2D)) as Texture2D; + sectionHeaderTexture = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/SectionHeader_Dark.psd", typeof(Texture2D)) as Texture2D; + } + else + { + alignLeft = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignLeft_Light.psd", typeof(Texture2D)) as Texture2D; + alignCenter = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCenter_Light.psd", typeof(Texture2D)) as Texture2D; + alignRight = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignRight_Light.psd", typeof(Texture2D)) as Texture2D; + alignJustified = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignJustified_Light.psd", typeof(Texture2D)) as Texture2D; + alignFlush = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignFlush_Light.psd", typeof(Texture2D)) as Texture2D; + alignGeoCenter = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd", typeof(Texture2D)) as Texture2D; + alignTop = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignTop_Light.psd", typeof(Texture2D)) as Texture2D; + alignMiddle = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignMiddle_Light.psd", typeof(Texture2D)) as Texture2D; + alignBottom = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignBottom_Light.psd", typeof(Texture2D)) as Texture2D; + alignBaseline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignBaseLine_Light.psd", typeof(Texture2D)) as Texture2D; + alignMidline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignMidLine_Light.psd", typeof(Texture2D)) as Texture2D; + alignCapline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCapLine_Light.psd", typeof(Texture2D)) as Texture2D; + sectionHeaderTexture = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/SectionHeader_Light.psd", typeof(Texture2D)) as Texture2D; + } + + label = new GUIStyle(EditorStyles.label) { richText = true, wordWrap = true, stretchWidth = true }; + textAreaBoxWindow = new GUIStyle(EditorStyles.textArea) { richText = true }; + boldFoldout = new GUIStyle(EditorStyles.foldout) { fontStyle = FontStyle.Bold }; + panelTitle = new GUIStyle(EditorStyles.label) { fontStyle = FontStyle.Bold }; + + sectionHeader = new GUIStyle(EditorStyles.label) { fixedHeight = 22, richText = true, border = new RectOffset(9, 9, 0, 0), overflow = new RectOffset(9, 0, 0, 0), padding = new RectOffset(0, 0, 4, 0) }; + sectionHeader.normal.background = sectionHeaderTexture; + + centeredLabel = new GUIStyle(EditorStyles.label) { alignment = TextAnchor.MiddleCenter}; + rightLabel = new GUIStyle(EditorStyles.label) { alignment = TextAnchor.MiddleRight, richText = true }; + + + alignmentButtonLeft = new GUIStyle(EditorStyles.miniButtonLeft); + alignmentButtonLeft.padding.left = 4; + alignmentButtonLeft.padding.right = 4; + alignmentButtonLeft.padding.top = 2; + alignmentButtonLeft.padding.bottom = 2; + + alignmentButtonMid = new GUIStyle(EditorStyles.miniButtonMid); + alignmentButtonMid.padding.left = 4; + alignmentButtonMid.padding.right = 4; + alignmentButtonLeft.padding.top = 2; + alignmentButtonLeft.padding.bottom = 2; + + alignmentButtonRight = new GUIStyle(EditorStyles.miniButtonRight); + alignmentButtonRight.padding.left = 4; + alignmentButtonRight.padding.right = 4; + alignmentButtonLeft.padding.top = 2; + alignmentButtonLeft.padding.bottom = 2; + + wrappingTextArea = new GUIStyle(EditorStyles.textArea); + wrappingTextArea.wordWrap = true; + + alignContentA = new [] + { + new GUIContent(alignLeft, "Left"), + new GUIContent(alignCenter, "Center"), + new GUIContent(alignRight, "Right"), + new GUIContent(alignJustified, "Justified"), + new GUIContent(alignFlush, "Flush"), + new GUIContent(alignGeoCenter, "Geometry Center") + }; + + alignContentB = new [] + { + new GUIContent(alignTop, "Top"), + new GUIContent(alignMiddle, "Middle"), + new GUIContent(alignBottom, "Bottom"), + new GUIContent(alignBaseline, "Baseline"), + new GUIContent(alignMidline, "Midline"), + new GUIContent(alignCapline, "Capline") + }; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UIStyleManager.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UIStyleManager.cs.meta new file mode 100644 index 00000000..9c09bfa3 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UIStyleManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 30a939dce2fd4073955f2f20e659d506 +timeCreated: 1426454127 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UiEditorPanel.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UiEditorPanel.cs new file mode 100644 index 00000000..87181650 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UiEditorPanel.cs @@ -0,0 +1,91 @@ +using UnityEngine; +using UnityEngine.UI; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + + [CustomEditor(typeof(TextMeshProUGUI), true), CanEditMultipleObjects] + public class TMP_UiEditorPanel : TMP_BaseEditorPanel + { + static readonly GUIContent k_RaycastTargetLabel = new GUIContent("Raycast Target", "Whether the text blocks raycasts from the Graphic Raycaster."); + + SerializedProperty m_RaycastTargetProp; + + protected override void OnEnable() + { + base.OnEnable(); + m_RaycastTargetProp = serializedObject.FindProperty("m_RaycastTarget"); + } + + protected override void DrawExtraSettings() + { + Foldout.extraSettings = EditorGUILayout.Foldout(Foldout.extraSettings, k_ExtraSettingsLabel, true, TMP_UIStyleManager.boldFoldout); + if (Foldout.extraSettings) + { + EditorGUI.indentLevel += 1; + + DrawMargins(); + + DrawGeometrySorting(); + + DrawRichText(); + + DrawRaycastTarget(); + + DrawParsing(); + + DrawKerning(); + + DrawPadding(); + + EditorGUI.indentLevel -= 1; + } + } + + protected void DrawRaycastTarget() + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_RaycastTargetProp, k_RaycastTargetLabel); + if (EditorGUI.EndChangeCheck()) + { + // Change needs to propagate to the child sub objects. + Graphic[] graphicComponents = m_TextComponent.GetComponentsInChildren(); + for (int i = 1; i < graphicComponents.Length; i++) + graphicComponents[i].raycastTarget = m_RaycastTargetProp.boolValue; + + m_HavePropertiesChanged = true; + } + } + + // Method to handle multi object selection + protected override bool IsMixSelectionTypes() + { + GameObject[] objects = Selection.gameObjects; + if (objects.Length > 1) + { + for (int i = 0; i < objects.Length; i++) + { + if (objects[i].GetComponent() == null) + return true; + } + } + return false; + } + protected override void OnUndoRedo() + { + int undoEventId = Undo.GetCurrentGroup(); + int lastUndoEventId = s_EventId; + + if (undoEventId != lastUndoEventId) + { + for (int i = 0; i < targets.Length; i++) + { + //Debug.Log("Undo & Redo Performed detected in Editor Panel. Event ID:" + Undo.GetCurrentGroup()); + TMPro_EventManager.ON_TEXTMESHPRO_UGUI_PROPERTY_CHANGED(true, targets[i] as TextMeshProUGUI); + s_EventId = undoEventId; + } + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UiEditorPanel.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UiEditorPanel.cs.meta new file mode 100644 index 00000000..ea3b36b3 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMP_UiEditorPanel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 21c0044a7f964773be90d197a78e4703 +timeCreated: 1443571501 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_ContextMenus.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_ContextMenus.cs new file mode 100644 index 00000000..8d65b706 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_ContextMenus.cs @@ -0,0 +1,341 @@ +using UnityEngine; +using UnityEditor; +using System.IO; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + public class TMP_ContextMenus : Editor + { + + private static Texture m_copiedTexture; + + private static Material m_copiedProperties; + private static Material m_copiedAtlasProperties; + + + // Add a Context Menu to the Texture Editor Panel to allow Copy / Paste of Texture. + [MenuItem("CONTEXT/Texture/Copy", false, 2000)] + static void CopyTexture(MenuCommand command) + { + m_copiedTexture = command.context as Texture; + } + + + // Select the currently assigned material or material preset. + [MenuItem("CONTEXT/Material/Select Material", false, 500)] + static void SelectMaterial(MenuCommand command) + { + Material mat = command.context as Material; + + // Select current material + EditorUtility.FocusProjectWindow(); + EditorGUIUtility.PingObject(mat); + } + + + // Add a Context Menu to allow easy duplication of the Material. + [MenuItem("CONTEXT/Material/Create Material Preset", false)] + static void DuplicateMaterial(MenuCommand command) + { + // Get the type of text object + // If material is not a base material, we get material leaks... + + Material source_Mat = (Material)command.context; + if (!EditorUtility.IsPersistent(source_Mat)) + { + Debug.LogWarning("Material is an instance and cannot be converted into a permanent asset."); + return; + } + + + string assetPath = AssetDatabase.GetAssetPath(source_Mat).Split('.')[0]; + + Material duplicate = new Material(source_Mat); + + // Need to manually copy the shader keywords + duplicate.shaderKeywords = source_Mat.shaderKeywords; + + AssetDatabase.CreateAsset(duplicate, AssetDatabase.GenerateUniqueAssetPath(assetPath + ".mat")); + + // Assign duplicate Material to selected object (if one is) + if (Selection.activeGameObject != null) + { + TMP_Text textObject = Selection.activeGameObject.GetComponent(); + if (textObject != null) + { + textObject.fontSharedMaterial = duplicate; + } + else + { + TMP_SubMesh subMeshObject = Selection.activeGameObject.GetComponent(); + + if (subMeshObject != null) + subMeshObject.sharedMaterial = duplicate; + else + { + TMP_SubMeshUI subMeshUIObject = Selection.activeGameObject.GetComponent(); + + if (subMeshUIObject != null) + subMeshUIObject.sharedMaterial = duplicate; + } + } + } + + // Ping newly created Material Preset. + EditorUtility.FocusProjectWindow(); + EditorGUIUtility.PingObject(duplicate); + } + + + //[MenuItem("CONTEXT/MaterialComponent/Copy Material Properties", false)] + [MenuItem("CONTEXT/Material/Copy Material Properties", false)] + static void CopyMaterialProperties(MenuCommand command) + { + Material mat = null; + if (command.context.GetType() == typeof(Material)) + mat = (Material)command.context; + else + { + mat = Selection.activeGameObject.GetComponent().GetMaterial(); + } + + m_copiedProperties = new Material(mat); + + m_copiedProperties.shaderKeywords = mat.shaderKeywords; + + m_copiedProperties.hideFlags = HideFlags.DontSave; + } + + + // PASTE MATERIAL + //[MenuItem("CONTEXT/MaterialComponent/Paste Material Properties", false)] + [MenuItem("CONTEXT/Material/Paste Material Properties", false)] + static void PasteMaterialProperties(MenuCommand command) + { + + if (m_copiedProperties == null) + { + Debug.LogWarning("No Material Properties to Paste. Use Copy Material Properties first."); + return; + } + + Material mat = null; + if (command.context.GetType() == typeof(Material)) + mat = (Material)command.context; + else + { + mat = Selection.activeGameObject.GetComponent().GetMaterial(); + } + + Undo.RecordObject(mat, "Paste Material"); + + ShaderUtilities.GetShaderPropertyIDs(); // Make sure we have valid Property IDs + if (mat.HasProperty(ShaderUtilities.ID_GradientScale)) + { + // Preserve unique SDF properties from destination material. + m_copiedProperties.SetTexture(ShaderUtilities.ID_MainTex, mat.GetTexture(ShaderUtilities.ID_MainTex)); + m_copiedProperties.SetFloat(ShaderUtilities.ID_GradientScale, mat.GetFloat(ShaderUtilities.ID_GradientScale)); + m_copiedProperties.SetFloat(ShaderUtilities.ID_TextureWidth, mat.GetFloat(ShaderUtilities.ID_TextureWidth)); + m_copiedProperties.SetFloat(ShaderUtilities.ID_TextureHeight, mat.GetFloat(ShaderUtilities.ID_TextureHeight)); + } + + EditorShaderUtilities.CopyMaterialProperties(m_copiedProperties, mat); + + // Copy ShaderKeywords from one material to the other. + mat.shaderKeywords = m_copiedProperties.shaderKeywords; + + // Let TextMeshPro Objects that this mat has changed. + TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, mat); + } + + + // Enable Resetting of Material properties without losing unique properties of the font atlas. + [MenuItem("CONTEXT/Material/Reset", false, 2100)] + static void ResetSettings(MenuCommand command) + { + + Material mat = null; + if (command.context.GetType() == typeof(Material)) + mat = (Material)command.context; + else + { + mat = Selection.activeGameObject.GetComponent().GetMaterial(); + } + + Undo.RecordObject(mat, "Reset Material"); + + ShaderUtilities.GetShaderPropertyIDs(); // Make sure we have valid Property IDs + if (mat.HasProperty(ShaderUtilities.ID_GradientScale)) + { + // Copy unique properties of the SDF Material + var texture = mat.GetTexture(ShaderUtilities.ID_MainTex); + var gradientScale = mat.GetFloat(ShaderUtilities.ID_GradientScale); + var texWidth = mat.GetFloat(ShaderUtilities.ID_TextureWidth); + var texHeight = mat.GetFloat(ShaderUtilities.ID_TextureHeight); + + var stencilId = 0.0f; + var stencilComp = 0.0f; + + if (mat.HasProperty(ShaderUtilities.ID_StencilID)) + { + stencilId = mat.GetFloat(ShaderUtilities.ID_StencilID); + stencilComp = mat.GetFloat(ShaderUtilities.ID_StencilComp); + } + + var normalWeight = mat.GetFloat(ShaderUtilities.ID_WeightNormal); + var boldWeight = mat.GetFloat(ShaderUtilities.ID_WeightBold); + + // Reset the material + Unsupported.SmartReset(mat); + + // Reset ShaderKeywords + mat.shaderKeywords = new string[0]; // { "BEVEL_OFF", "GLOW_OFF", "UNDERLAY_OFF" }; + + // Copy unique material properties back to the material. + mat.SetTexture(ShaderUtilities.ID_MainTex, texture); + mat.SetFloat(ShaderUtilities.ID_GradientScale, gradientScale); + mat.SetFloat(ShaderUtilities.ID_TextureWidth, texWidth); + mat.SetFloat(ShaderUtilities.ID_TextureHeight, texHeight); + + if (mat.HasProperty(ShaderUtilities.ID_StencilID)) + { + mat.SetFloat(ShaderUtilities.ID_StencilID, stencilId); + mat.SetFloat(ShaderUtilities.ID_StencilComp, stencilComp); + } + + mat.SetFloat(ShaderUtilities.ID_WeightNormal, normalWeight); + mat.SetFloat(ShaderUtilities.ID_WeightBold, boldWeight); + } + else + { + Unsupported.SmartReset(mat); + } + + TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, mat); + } + + + + //This function is used for debugging and fixing potentially broken font atlas links. + [MenuItem("CONTEXT/Material/Copy Atlas", false, 2000)] + static void CopyAtlas(MenuCommand command) + { + Material mat = command.context as Material; + + m_copiedAtlasProperties = new Material(mat); + m_copiedAtlasProperties.hideFlags = HideFlags.DontSave; + } + + + // This function is used for debugging and fixing potentially broken font atlas links + [MenuItem("CONTEXT/Material/Paste Atlas", false, 2001)] + static void PasteAtlas(MenuCommand command) + { + Material mat = command.context as Material; + + if (m_copiedAtlasProperties != null) + { + Undo.RecordObject(mat, "Paste Texture"); + + ShaderUtilities.GetShaderPropertyIDs(); // Make sure we have valid Property IDs + mat.SetTexture(ShaderUtilities.ID_MainTex, m_copiedAtlasProperties.GetTexture(ShaderUtilities.ID_MainTex)); + mat.SetFloat(ShaderUtilities.ID_GradientScale, m_copiedAtlasProperties.GetFloat(ShaderUtilities.ID_GradientScale)); + mat.SetFloat(ShaderUtilities.ID_TextureWidth, m_copiedAtlasProperties.GetFloat(ShaderUtilities.ID_TextureWidth)); + mat.SetFloat(ShaderUtilities.ID_TextureHeight, m_copiedAtlasProperties.GetFloat(ShaderUtilities.ID_TextureHeight)); + } + else if (m_copiedTexture != null) + { + Undo.RecordObject(mat, "Paste Texture"); + + mat.SetTexture(ShaderUtilities.ID_MainTex, m_copiedTexture); + } + + //DestroyImmediate(m_copiedAtlasProperties); + } + + + // Context Menus for TMPro Font Assets + //This function is used for debugging and fixing potentially broken font atlas links. + [MenuItem("CONTEXT/TMP_FontAsset/Extract Atlas", false, 2100)] + static void ExtractAtlas(MenuCommand command) + { + TMP_FontAsset font = command.context as TMP_FontAsset; + + string fontPath = AssetDatabase.GetAssetPath(font); + string texPath = Path.GetDirectoryName(fontPath) + "/" + Path.GetFileNameWithoutExtension(fontPath) + " Atlas.png"; + + // Create a Serialized Object of the texture to allow us to make it readable. + SerializedObject texprop = new SerializedObject(font.material.GetTexture(ShaderUtilities.ID_MainTex)); + texprop.FindProperty("m_IsReadable").boolValue = true; + texprop.ApplyModifiedProperties(); + + // Create a copy of the texture. + Texture2D tex = Instantiate(font.material.GetTexture(ShaderUtilities.ID_MainTex)) as Texture2D; + + // Set the texture to not readable again. + texprop.FindProperty("m_IsReadable").boolValue = false; + texprop.ApplyModifiedProperties(); + + Debug.Log(texPath); + // Saving File for Debug + var pngData = tex.EncodeToPNG(); + File.WriteAllBytes(texPath, pngData); + + AssetDatabase.Refresh(); + DestroyImmediate(tex); + } + + /// + /// + /// + /// + [MenuItem("CONTEXT/TMP_FontAsset/Update Atlas Texture...", false, 2000)] + static void RegenerateFontAsset(MenuCommand command) + { + TMP_FontAsset fontAsset = command.context as TMP_FontAsset; + + if (fontAsset != null) + { + TMPro_FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(fontAsset); + } + } + + + /// + /// Clear Font Asset Data + /// + /// + [MenuItem("CONTEXT/TMP_FontAsset/Reset", false, 100)] + static void ClearFontAssetData(MenuCommand command) + { + TMP_FontAsset fontAsset = command.context as TMP_FontAsset; + + if (fontAsset != null && Selection.activeObject != fontAsset) + { + Selection.activeObject = fontAsset; + } + + fontAsset.ClearFontAssetData(true); + + TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, fontAsset); + } + + + [MenuItem("CONTEXT/TrueTypeFontImporter/Create TMP Font Asset...", false, 200)] + static void CreateFontAsset(MenuCommand command) + { + TrueTypeFontImporter importer = command.context as TrueTypeFontImporter; + + if (importer != null) + { + Font sourceFontFile = AssetDatabase.LoadAssetAtPath(importer.assetPath); + + if (sourceFontFile) + TMPro_FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(sourceFontFile); + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_ContextMenus.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_ContextMenus.cs.meta new file mode 100644 index 00000000..f16753fe --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_ContextMenus.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 44e1d646473a40178712cb2150f54cec +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_CreateObjectMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_CreateObjectMenu.cs new file mode 100644 index 00000000..a7c1cc15 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_CreateObjectMenu.cs @@ -0,0 +1,311 @@ +using UnityEngine; +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEditor.Experimental.SceneManagement; +using UnityEngine.SceneManagement; +using UnityEngine.UI; +using UnityEngine.EventSystems; + + +namespace TMPro.EditorUtilities +{ + public static class TMPro_CreateObjectMenu + { + + /// + /// Create a TextMeshPro object that works with the Mesh Renderer + /// + /// + [MenuItem("GameObject/3D Object/Text - TextMeshPro", false, 30)] + static void CreateTextMeshProObjectPerform(MenuCommand command) + { + GameObject go = new GameObject("Text (TMP)"); + + // Add support for new prefab mode + StageUtility.PlaceGameObjectInCurrentStage(go); + + TextMeshPro textMeshPro = go.AddComponent(); + textMeshPro.text = "Sample text"; + textMeshPro.alignment = TextAlignmentOptions.TopLeft; + + Undo.RegisterCreatedObjectUndo((Object)go, "Create " + go.name); + + GameObject contextObject = command.context as GameObject; + if (contextObject != null) + { + GameObjectUtility.SetParentAndAlign(go, contextObject); + Undo.SetTransformParent(go.transform, contextObject.transform, "Parent " + go.name); + } + + Selection.activeGameObject = go; + } + + + /// + /// Create a TextMeshPro object that works with the CanvasRenderer + /// + /// + [MenuItem("GameObject/UI/Text - TextMeshPro", false, 2001)] + static void CreateTextMeshProGuiObjectPerform(MenuCommand menuCommand) + { + GameObject go = TMP_DefaultControls.CreateText(GetStandardResources()); + + // Override text color and font size + TMP_Text textComponent = go.GetComponent(); + textComponent.color = Color.white; + if (textComponent.m_isWaitingOnResourceLoad == false) + textComponent.fontSize = TMP_Settings.defaultFontSize; + + PlaceUIElementRoot(go, menuCommand); + } + + [MenuItem("GameObject/UI/Button - TextMeshPro", false, 2031)] + static public void AddButton(MenuCommand menuCommand) + { + GameObject go = TMP_DefaultControls.CreateButton(GetStandardResources()); + + // Override font size + TMP_Text textComponent = go.GetComponentInChildren(); + textComponent.fontSize = 24; + + PlaceUIElementRoot(go, menuCommand); + } + + + + [MenuItem("GameObject/UI/Input Field - TextMeshPro", false, 2037)] + static void AddTextMeshProInputField(MenuCommand menuCommand) + { + GameObject go = TMP_DefaultControls.CreateInputField(GetStandardResources()); + PlaceUIElementRoot(go, menuCommand); + } + + + [MenuItem("GameObject/UI/Dropdown - TextMeshPro", false, 2036)] + static public void AddDropdown(MenuCommand menuCommand) + { + GameObject go = TMP_DefaultControls.CreateDropdown(GetStandardResources()); + PlaceUIElementRoot(go, menuCommand); + } + + + private const string kUILayerName = "UI"; + + private const string kStandardSpritePath = "UI/Skin/UISprite.psd"; + private const string kBackgroundSpritePath = "UI/Skin/Background.psd"; + private const string kInputFieldBackgroundPath = "UI/Skin/InputFieldBackground.psd"; + private const string kKnobPath = "UI/Skin/Knob.psd"; + private const string kCheckmarkPath = "UI/Skin/Checkmark.psd"; + private const string kDropdownArrowPath = "UI/Skin/DropdownArrow.psd"; + private const string kMaskPath = "UI/Skin/UIMask.psd"; + + static private TMP_DefaultControls.Resources s_StandardResources; + + + static private TMP_DefaultControls.Resources GetStandardResources() + { + if (s_StandardResources.standard == null) + { + s_StandardResources.standard = AssetDatabase.GetBuiltinExtraResource(kStandardSpritePath); + s_StandardResources.background = AssetDatabase.GetBuiltinExtraResource(kBackgroundSpritePath); + s_StandardResources.inputField = AssetDatabase.GetBuiltinExtraResource(kInputFieldBackgroundPath); + s_StandardResources.knob = AssetDatabase.GetBuiltinExtraResource(kKnobPath); + s_StandardResources.checkmark = AssetDatabase.GetBuiltinExtraResource(kCheckmarkPath); + s_StandardResources.dropdown = AssetDatabase.GetBuiltinExtraResource(kDropdownArrowPath); + s_StandardResources.mask = AssetDatabase.GetBuiltinExtraResource(kMaskPath); + } + return s_StandardResources; + } + + + private static void SetPositionVisibleinSceneView(RectTransform canvasRTransform, RectTransform itemTransform) + { + // Find the best scene view + SceneView sceneView = SceneView.lastActiveSceneView; + if (sceneView == null && SceneView.sceneViews.Count > 0) + sceneView = SceneView.sceneViews[0] as SceneView; + + // Couldn't find a SceneView. Don't set position. + if (sceneView == null || sceneView.camera == null) + return; + + // Create world space Plane from canvas position. + Camera camera = sceneView.camera; + Vector3 position = Vector3.zero; + if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRTransform, new Vector2(camera.pixelWidth / 2, camera.pixelHeight / 2), camera, out Vector2 localPlanePosition)) + { + // Adjust for canvas pivot + localPlanePosition.x = localPlanePosition.x + canvasRTransform.sizeDelta.x * canvasRTransform.pivot.x; + localPlanePosition.y = localPlanePosition.y + canvasRTransform.sizeDelta.y * canvasRTransform.pivot.y; + + localPlanePosition.x = Mathf.Clamp(localPlanePosition.x, 0, canvasRTransform.sizeDelta.x); + localPlanePosition.y = Mathf.Clamp(localPlanePosition.y, 0, canvasRTransform.sizeDelta.y); + + // Adjust for anchoring + position.x = localPlanePosition.x - canvasRTransform.sizeDelta.x * itemTransform.anchorMin.x; + position.y = localPlanePosition.y - canvasRTransform.sizeDelta.y * itemTransform.anchorMin.y; + + Vector3 minLocalPosition; + minLocalPosition.x = canvasRTransform.sizeDelta.x * (0 - canvasRTransform.pivot.x) + itemTransform.sizeDelta.x * itemTransform.pivot.x; + minLocalPosition.y = canvasRTransform.sizeDelta.y * (0 - canvasRTransform.pivot.y) + itemTransform.sizeDelta.y * itemTransform.pivot.y; + + Vector3 maxLocalPosition; + maxLocalPosition.x = canvasRTransform.sizeDelta.x * (1 - canvasRTransform.pivot.x) - itemTransform.sizeDelta.x * itemTransform.pivot.x; + maxLocalPosition.y = canvasRTransform.sizeDelta.y * (1 - canvasRTransform.pivot.y) - itemTransform.sizeDelta.y * itemTransform.pivot.y; + + position.x = Mathf.Clamp(position.x, minLocalPosition.x, maxLocalPosition.x); + position.y = Mathf.Clamp(position.y, minLocalPosition.y, maxLocalPosition.y); + } + + itemTransform.anchoredPosition = position; + itemTransform.localRotation = Quaternion.identity; + itemTransform.localScale = Vector3.one; + } + + + private static void PlaceUIElementRoot(GameObject element, MenuCommand menuCommand) + { + GameObject parent = menuCommand.context as GameObject; + bool explicitParentChoice = true; + if (parent == null) + { + parent = GetOrCreateCanvasGameObject(); + explicitParentChoice = false; + + // If in Prefab Mode, Canvas has to be part of Prefab contents, + // otherwise use Prefab root instead. + PrefabStage prefabStage = PrefabStageUtility.GetCurrentPrefabStage(); + if (prefabStage != null && !prefabStage.IsPartOfPrefabContents(parent)) + parent = prefabStage.prefabContentsRoot; + } + if (parent.GetComponentInParent() == null) + { + // Create canvas under context GameObject, + // and make that be the parent which UI element is added under. + GameObject canvas = CreateNewUI(); + canvas.transform.SetParent(parent.transform, false); + parent = canvas; + } + + // Setting the element to be a child of an element already in the scene should + // be sufficient to also move the element to that scene. + // However, it seems the element needs to be already in its destination scene when the + // RegisterCreatedObjectUndo is performed; otherwise the scene it was created in is dirtied. + SceneManager.MoveGameObjectToScene(element, parent.scene); + + if (element.transform.parent == null) + { + Undo.SetTransformParent(element.transform, parent.transform, "Parent " + element.name); + } + + GameObjectUtility.EnsureUniqueNameForSibling(element); + + // We have to fix up the undo name since the name of the object was only known after reparenting it. + Undo.SetCurrentGroupName("Create " + element.name); + + GameObjectUtility.SetParentAndAlign(element, parent); + if (!explicitParentChoice) // not a context click, so center in sceneview + SetPositionVisibleinSceneView(parent.GetComponent(), element.GetComponent()); + + Undo.RegisterCreatedObjectUndo(element, "Create " + element.name); + + Selection.activeGameObject = element; + } + + + static public GameObject CreateNewUI() + { + // Root for the UI + var root = new GameObject("Canvas"); + root.layer = LayerMask.NameToLayer(kUILayerName); + Canvas canvas = root.AddComponent(); + canvas.renderMode = RenderMode.ScreenSpaceOverlay; + root.AddComponent(); + root.AddComponent(); + + // Works for all stages. + StageUtility.PlaceGameObjectInCurrentStage(root); + bool customScene = false; + PrefabStage prefabStage = PrefabStageUtility.GetCurrentPrefabStage(); + if (prefabStage != null) + { + root.transform.SetParent(prefabStage.prefabContentsRoot.transform, false); + customScene = true; + } + + Undo.RegisterCreatedObjectUndo(root, "Create " + root.name); + + // If there is no event system add one... + // No need to place event system in custom scene as these are temporary anyway. + // It can be argued for or against placing it in the user scenes, + // but let's not modify scene user is not currently looking at. + if (!customScene) + CreateEventSystem(false); + return root; + } + + + private static void CreateEventSystem(bool select) + { + CreateEventSystem(select, null); + } + + + private static void CreateEventSystem(bool select, GameObject parent) + { + var esys = Object.FindObjectOfType(); + if (esys == null) + { + var eventSystem = new GameObject("EventSystem"); + GameObjectUtility.SetParentAndAlign(eventSystem, parent); + esys = eventSystem.AddComponent(); + eventSystem.AddComponent(); + + Undo.RegisterCreatedObjectUndo(eventSystem, "Create " + eventSystem.name); + } + + if (select && esys != null) + { + Selection.activeGameObject = esys.gameObject; + } + } + + + // Helper function that returns a Canvas GameObject; preferably a parent of the selection, or other existing Canvas. + static public GameObject GetOrCreateCanvasGameObject() + { + GameObject selectedGo = Selection.activeGameObject; + + // Try to find a gameobject that is the selected GO or one if its parents. + Canvas canvas = (selectedGo != null) ? selectedGo.GetComponentInParent() : null; + if (IsValidCanvas(canvas)) + return canvas.gameObject; + + // No canvas in selection or its parents? Then use any valid canvas. + // We have to find all loaded Canvases, not just the ones in main scenes. + Canvas[] canvasArray = StageUtility.GetCurrentStageHandle().FindComponentsOfType(); + for (int i = 0; i < canvasArray.Length; i++) + if (IsValidCanvas(canvasArray[i])) + return canvasArray[i].gameObject; + + // No canvas in the scene at all? Then create a new one. + return CreateNewUI(); + } + + static bool IsValidCanvas(Canvas canvas) + { + if (canvas == null || !canvas.gameObject.activeInHierarchy) + return false; + + // It's important that the non-editable canvas from a prefab scene won't be rejected, + // but canvases not visible in the Hierarchy at all do. Don't check for HideAndDontSave. + if (EditorUtility.IsPersistent(canvas) || (canvas.hideFlags & HideFlags.HideInHierarchy) != 0) + return false; + + if (StageUtility.GetStageHandle(canvas.gameObject) != StageUtility.GetCurrentStageHandle()) + return false; + + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta new file mode 100644 index 00000000..be9643fd --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7065397ff8184621aa3ca4f854491259 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_EditorShaderUtilities.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_EditorShaderUtilities.cs new file mode 100644 index 00000000..3d639005 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_EditorShaderUtilities.cs @@ -0,0 +1,53 @@ +using UnityEngine; +using UnityEditor; +using System.Linq; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + public static class EditorShaderUtilities + { + + /// + /// Copy Shader properties from source to destination material. + /// + /// + /// + public static void CopyMaterialProperties(Material source, Material destination) + { + MaterialProperty[] source_prop = MaterialEditor.GetMaterialProperties(new Material[] { source }); + + for (int i = 0; i < source_prop.Length; i++) + { + int property_ID = Shader.PropertyToID(source_prop[i].name); + if (destination.HasProperty(property_ID)) + { + //Debug.Log(source_prop[i].name + " Type:" + ShaderUtil.GetPropertyType(source.shader, i)); + switch (ShaderUtil.GetPropertyType(source.shader, i)) + { + case ShaderUtil.ShaderPropertyType.Color: + destination.SetColor(property_ID, source.GetColor(property_ID)); + break; + case ShaderUtil.ShaderPropertyType.Float: + destination.SetFloat(property_ID, source.GetFloat(property_ID)); + break; + case ShaderUtil.ShaderPropertyType.Range: + destination.SetFloat(property_ID, source.GetFloat(property_ID)); + break; + case ShaderUtil.ShaderPropertyType.TexEnv: + destination.SetTexture(property_ID, source.GetTexture(property_ID)); + break; + case ShaderUtil.ShaderPropertyType.Vector: + destination.SetVector(property_ID, source.GetVector(property_ID)); + break; + } + } + } + + } + + } + +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta new file mode 100644 index 00000000..89d25943 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: aa76955fe5bb44f7915d91db8c7043c4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs new file mode 100644 index 00000000..95be939d --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs @@ -0,0 +1,1736 @@ +using System; +using UnityEngine; +using UnityEditor; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.IO; +using System.Text.RegularExpressions; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; +using Object = UnityEngine.Object; + +namespace TMPro.EditorUtilities +{ + public class TMPro_FontAssetCreatorWindow : EditorWindow + { + [MenuItem("Window/TextMeshPro/Font Asset Creator", false, 2025)] + public static void ShowFontAtlasCreatorWindow() + { + var window = GetWindow(); + window.titleContent = new GUIContent("Font Asset Creator"); + window.Focus(); + + // Make sure TMP Essential Resources have been imported. + window.CheckEssentialResources(); + } + + + public static void ShowFontAtlasCreatorWindow(Font sourceFontFile) + { + var window = GetWindow(); + + window.titleContent = new GUIContent("Font Asset Creator"); + window.Focus(); + + window.ClearGeneratedData(); + window.m_LegacyFontAsset = null; + window.m_SelectedFontAsset = null; + + // Override selected font asset + window.m_SourceFontFile = sourceFontFile; + + // Make sure TMP Essential Resources have been imported. + window.CheckEssentialResources(); + } + + + public static void ShowFontAtlasCreatorWindow(TMP_FontAsset fontAsset) + { + var window = GetWindow(); + + window.titleContent = new GUIContent("Font Asset Creator"); + window.Focus(); + + // Clear any previously generated data + window.ClearGeneratedData(); + window.m_LegacyFontAsset = null; + + // Load font asset creation settings if we have valid settings + if (string.IsNullOrEmpty(fontAsset.creationSettings.sourceFontFileGUID) == false) + { + window.LoadFontCreationSettings(fontAsset.creationSettings); + + // Override settings to inject character list from font asset + window.m_CharacterSetSelectionMode = 6; + window.m_CharacterSequence = TMP_EditorUtility.GetUnicodeCharacterSequence(TMP_FontAsset.GetCharactersArray(fontAsset)); + + + window.m_ReferencedFontAsset = fontAsset; + window.m_SavedFontAtlas = fontAsset.atlasTexture; + } + else + { + window.m_WarningMessage = "Font Asset [" + fontAsset.name + "] does not contain any previous \"Font Asset Creation Settings\". This usually means [" + fontAsset.name + "] was created before this new functionality was added."; + window.m_SourceFontFile = null; + window.m_LegacyFontAsset = fontAsset; + } + + // Even if we don't have any saved generation settings, we still want to pre-select the source font file. + window.m_SelectedFontAsset = fontAsset; + + // Make sure TMP Essential Resources have been imported. + window.CheckEssentialResources(); + } + + [System.Serializable] + class FontAssetCreationSettingsContainer + { + public List fontAssetCreationSettings; + } + + FontAssetCreationSettingsContainer m_FontAssetCreationSettingsContainer; + + //static readonly string[] m_FontCreationPresets = new string[] { "Recent 1", "Recent 2", "Recent 3", "Recent 4" }; + int m_FontAssetCreationSettingsCurrentIndex = 0; + + const string k_FontAssetCreationSettingsContainerKey = "TextMeshPro.FontAssetCreator.RecentFontAssetCreationSettings.Container"; + const string k_FontAssetCreationSettingsCurrentIndexKey = "TextMeshPro.FontAssetCreator.RecentFontAssetCreationSettings.CurrentIndex"; + const float k_TwoColumnControlsWidth = 335f; + + // Diagnostics + System.Diagnostics.Stopwatch m_StopWatch; + double m_GlyphPackingGenerationTime; + double m_GlyphRenderingGenerationTime; + + string[] m_FontSizingOptions = { "Auto Sizing", "Custom Size" }; + int m_PointSizeSamplingMode; + string[] m_FontResolutionLabels = { "8", "16","32", "64", "128", "256", "512", "1024", "2048", "4096", "8192" }; + int[] m_FontAtlasResolutions = { 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 }; + string[] m_FontCharacterSets = { "ASCII", "Extended ASCII", "ASCII Lowercase", "ASCII Uppercase", "Numbers + Symbols", "Custom Range", "Unicode Range (Hex)", "Custom Characters", "Characters from File" }; + enum FontPackingModes { Fast = 0, Optimum = 4 }; + FontPackingModes m_PackingMode = FontPackingModes.Fast; + + int m_CharacterSetSelectionMode; + + string m_CharacterSequence = ""; + string m_OutputFeedback = ""; + string m_WarningMessage; + int m_CharacterCount; + Vector2 m_ScrollPosition; + Vector2 m_OutputScrollPosition; + + bool m_IsRepaintNeeded; + + float m_AtlasGenerationProgress; + string m_AtlasGenerationProgressLabel = string.Empty; + float m_RenderingProgress; + bool m_IsRenderingDone; + bool m_IsProcessing; + bool m_IsGenerationDisabled; + bool m_IsGenerationCancelled; + + bool m_IsFontAtlasInvalid; + Object m_SourceFontFile; + TMP_FontAsset m_SelectedFontAsset; + TMP_FontAsset m_LegacyFontAsset; + TMP_FontAsset m_ReferencedFontAsset; + + TextAsset m_CharactersFromFile; + int m_PointSize; + int m_Padding = 5; + //FaceStyles m_FontStyle = FaceStyles.Normal; + //float m_FontStyleValue = 2; + + GlyphRenderMode m_GlyphRenderMode = GlyphRenderMode.SDFAA; + int m_AtlasWidth = 512; + int m_AtlasHeight = 512; + byte[] m_AtlasTextureBuffer; + Texture2D m_FontAtlasTexture; + Texture2D m_SavedFontAtlas; + + // + List m_FontGlyphTable = new List(); + List m_FontCharacterTable = new List(); + + Dictionary m_CharacterLookupMap = new Dictionary(); + Dictionary> m_GlyphLookupMap = new Dictionary>(); + + List m_GlyphsToPack = new List(); + List m_GlyphsPacked = new List(); + List m_FreeGlyphRects = new List(); + List m_UsedGlyphRects = new List(); + List m_GlyphsToRender = new List(); + List m_AvailableGlyphsToAdd = new List(); + List m_MissingCharacters = new List(); + List m_ExcludedCharacters = new List(); + + private FaceInfo m_FaceInfo; + + bool m_IncludeFontFeatures; + + + public void OnEnable() + { + // Used for Diagnostics + m_StopWatch = new System.Diagnostics.Stopwatch(); + + // Set Editor window size. + minSize = new Vector2(315, minSize.y); + + // Initialize & Get shader property IDs. + ShaderUtilities.GetShaderPropertyIDs(); + + // Load last selected preset if we are not already in the process of regenerating an existing font asset (via the Context menu) + if (EditorPrefs.HasKey(k_FontAssetCreationSettingsContainerKey)) + { + if (m_FontAssetCreationSettingsContainer == null) + m_FontAssetCreationSettingsContainer = JsonUtility.FromJson(EditorPrefs.GetString(k_FontAssetCreationSettingsContainerKey)); + + if (m_FontAssetCreationSettingsContainer.fontAssetCreationSettings != null && m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.Count > 0) + { + // Load Font Asset Creation Settings preset. + if (EditorPrefs.HasKey(k_FontAssetCreationSettingsCurrentIndexKey)) + m_FontAssetCreationSettingsCurrentIndex = EditorPrefs.GetInt(k_FontAssetCreationSettingsCurrentIndexKey); + + LoadFontCreationSettings(m_FontAssetCreationSettingsContainer.fontAssetCreationSettings[m_FontAssetCreationSettingsCurrentIndex]); + } + } + + ClearGeneratedData(); + } + + + public void OnDisable() + { + //Debug.Log("TextMeshPro Editor Window has been disabled."); + + // Destroy Engine only if it has been initialized already + FontEngine.DestroyFontEngine(); + + ClearGeneratedData(); + + // Remove Glyph Report if one was created. + if (File.Exists("Assets/TextMesh Pro/Glyph Report.txt")) + { + File.Delete("Assets/TextMesh Pro/Glyph Report.txt"); + File.Delete("Assets/TextMesh Pro/Glyph Report.txt.meta"); + + AssetDatabase.Refresh(); + } + + // Save Font Asset Creation Settings Index + SaveCreationSettingsToEditorPrefs(SaveFontCreationSettings()); + EditorPrefs.SetInt(k_FontAssetCreationSettingsCurrentIndexKey, m_FontAssetCreationSettingsCurrentIndex); + + // Unregister to event + TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); + + Resources.UnloadUnusedAssets(); + } + + + // Event received when TMP resources have been loaded. + void ON_RESOURCES_LOADED() + { + TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); + + m_IsGenerationDisabled = false; + } + + // Make sure TMP Essential Resources have been imported. + void CheckEssentialResources() + { + if (TMP_Settings.instance == null) + { + if (m_IsGenerationDisabled == false) + TMPro_EventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED); + + m_IsGenerationDisabled = true; + } + } + + + public void OnGUI() + { + GUILayout.BeginHorizontal(); + DrawControls(); + if (position.width > position.height && position.width > k_TwoColumnControlsWidth) + { + DrawPreview(); + } + GUILayout.EndHorizontal(); + } + + + public void Update() + { + if (m_IsRepaintNeeded) + { + //Debug.Log("Repainting..."); + m_IsRepaintNeeded = false; + Repaint(); + } + + // Update Progress bar is we are Rendering a Font. + if (m_IsProcessing) + { + m_AtlasGenerationProgress = FontEngine.generationProgress; + + m_IsRepaintNeeded = true; + } + + // Update Feedback Window & Create Font Texture once Rendering is done. + if (m_IsRenderingDone) + { + m_IsProcessing = false; + m_IsRenderingDone = false; + + if (m_IsGenerationCancelled == false) + { + m_AtlasGenerationProgressLabel = "Generation completed in: " + (m_GlyphPackingGenerationTime + m_GlyphRenderingGenerationTime).ToString("0.00 ms."); + + UpdateRenderFeedbackWindow(); + CreateFontAtlasTexture(); + + // If dynamic make readable ... + m_FontAtlasTexture.Apply(false, false); + } + Repaint(); + } + } + + + /// + /// Method which returns the character corresponding to a decimal value. + /// + /// + /// + static uint[] ParseNumberSequence(string sequence) + { + List unicodeList = new List(); + string[] sequences = sequence.Split(','); + + foreach (string seq in sequences) + { + string[] s1 = seq.Split('-'); + + if (s1.Length == 1) + try + { + unicodeList.Add(uint.Parse(s1[0])); + } + catch + { + Debug.Log("No characters selected or invalid format."); + } + else + { + for (uint j = uint.Parse(s1[0]); j < uint.Parse(s1[1]) + 1; j++) + { + unicodeList.Add(j); + } + } + } + + return unicodeList.ToArray(); + } + + + /// + /// Method which returns the character (decimal value) from a hex sequence. + /// + /// + /// + static uint[] ParseHexNumberSequence(string sequence) + { + List unicodeList = new List(); + string[] sequences = sequence.Split(','); + + foreach (string seq in sequences) + { + string[] s1 = seq.Split('-'); + + if (s1.Length == 1) + try + { + unicodeList.Add(uint.Parse(s1[0], NumberStyles.AllowHexSpecifier)); + } + catch + { + Debug.Log("No characters selected or invalid format."); + } + else + { + for (uint j = uint.Parse(s1[0], NumberStyles.AllowHexSpecifier); j < uint.Parse(s1[1], NumberStyles.AllowHexSpecifier) + 1; j++) + { + unicodeList.Add(j); + } + } + } + + return unicodeList.ToArray(); + } + + + void DrawControls() + { + GUILayout.Space(5f); + + if (position.width > position.height && position.width > k_TwoColumnControlsWidth) + { + m_ScrollPosition = EditorGUILayout.BeginScrollView(m_ScrollPosition, GUILayout.Width(315)); + } + else + { + m_ScrollPosition = EditorGUILayout.BeginScrollView(m_ScrollPosition); + } + + GUILayout.Space(5f); + + GUILayout.Label(m_SelectedFontAsset != null ? string.Format("Font Settings [{0}]", m_SelectedFontAsset.name) : "Font Settings", EditorStyles.boldLabel); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + EditorGUIUtility.labelWidth = 125f; + EditorGUIUtility.fieldWidth = 5f; + + // Disable Options if already generating a font atlas texture. + EditorGUI.BeginDisabledGroup(m_IsProcessing); + { + // FONT TTF SELECTION + EditorGUI.BeginChangeCheck(); + m_SourceFontFile = EditorGUILayout.ObjectField("Source Font File", m_SourceFontFile, typeof(Font), false) as Font; + if (EditorGUI.EndChangeCheck()) + { + m_SelectedFontAsset = null; + m_IsFontAtlasInvalid = true; + } + + // FONT SIZING + EditorGUI.BeginChangeCheck(); + if (m_PointSizeSamplingMode == 0) + { + m_PointSizeSamplingMode = EditorGUILayout.Popup("Sampling Point Size", m_PointSizeSamplingMode, m_FontSizingOptions); + } + else + { + GUILayout.BeginHorizontal(); + m_PointSizeSamplingMode = EditorGUILayout.Popup("Sampling Point Size", m_PointSizeSamplingMode, m_FontSizingOptions, GUILayout.Width(225)); + m_PointSize = EditorGUILayout.IntField(m_PointSize); + GUILayout.EndHorizontal(); + } + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + + // FONT PADDING + EditorGUI.BeginChangeCheck(); + m_Padding = EditorGUILayout.IntField("Padding", m_Padding); + m_Padding = (int)Mathf.Clamp(m_Padding, 0f, 64f); + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + + // FONT PACKING METHOD SELECTION + EditorGUI.BeginChangeCheck(); + m_PackingMode = (FontPackingModes)EditorGUILayout.EnumPopup("Packing Method", m_PackingMode); + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + + // FONT ATLAS RESOLUTION SELECTION + GUILayout.BeginHorizontal(); + GUI.changed = false; + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PrefixLabel("Atlas Resolution"); + m_AtlasWidth = EditorGUILayout.IntPopup(m_AtlasWidth, m_FontResolutionLabels, m_FontAtlasResolutions); + m_AtlasHeight = EditorGUILayout.IntPopup(m_AtlasHeight, m_FontResolutionLabels, m_FontAtlasResolutions); + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + + GUILayout.EndHorizontal(); + + + // FONT CHARACTER SET SELECTION + EditorGUI.BeginChangeCheck(); + bool hasSelectionChanged = false; + m_CharacterSetSelectionMode = EditorGUILayout.Popup("Character Set", m_CharacterSetSelectionMode, m_FontCharacterSets); + if (EditorGUI.EndChangeCheck()) + { + m_CharacterSequence = ""; + hasSelectionChanged = true; + m_IsFontAtlasInvalid = true; + } + + switch (m_CharacterSetSelectionMode) + { + case 0: // ASCII + //characterSequence = "32 - 126, 130, 132 - 135, 139, 145 - 151, 153, 155, 161, 166 - 167, 169 - 174, 176, 181 - 183, 186 - 187, 191, 8210 - 8226, 8230, 8240, 8242 - 8244, 8249 - 8250, 8252 - 8254, 8260, 8286"; + m_CharacterSequence = "32 - 126, 160, 8203, 8230, 9633"; + break; + + case 1: // EXTENDED ASCII + m_CharacterSequence = "32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633"; + // Could add 9632 for missing glyph + break; + + case 2: // Lowercase + m_CharacterSequence = "32 - 64, 91 - 126, 160"; + break; + + case 3: // Uppercase + m_CharacterSequence = "32 - 96, 123 - 126, 160"; + break; + + case 4: // Numbers & Symbols + m_CharacterSequence = "32 - 64, 91 - 96, 123 - 126, 160"; + break; + + case 5: // Custom Range + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label("Enter a sequence of decimal values to define the characters to be included in the font asset or retrieve one from another font asset.", TMP_UIStyleManager.label); + GUILayout.Space(10f); + + EditorGUI.BeginChangeCheck(); + m_ReferencedFontAsset = EditorGUILayout.ObjectField("Select Font Asset", m_ReferencedFontAsset, typeof(TMP_FontAsset), false) as TMP_FontAsset; + if (EditorGUI.EndChangeCheck() || hasSelectionChanged) + { + if (m_ReferencedFontAsset != null) + m_CharacterSequence = TMP_EditorUtility.GetDecimalCharacterSequence(TMP_FontAsset.GetCharactersArray(m_ReferencedFontAsset)); + + m_IsFontAtlasInvalid = true; + } + + // Filter out unwanted characters. + char chr = Event.current.character; + if ((chr < '0' || chr > '9') && (chr < ',' || chr > '-')) + { + Event.current.character = '\0'; + } + GUILayout.Label("Character Sequence (Decimal)", EditorStyles.boldLabel); + EditorGUI.BeginChangeCheck(); + m_CharacterSequence = EditorGUILayout.TextArea(m_CharacterSequence, TMP_UIStyleManager.textAreaBoxWindow, GUILayout.Height(120), GUILayout.ExpandWidth(true)); + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + + EditorGUILayout.EndVertical(); + break; + + case 6: // Unicode HEX Range + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label("Enter a sequence of Unicode (hex) values to define the characters to be included in the font asset or retrieve one from another font asset.", TMP_UIStyleManager.label); + GUILayout.Space(10f); + + EditorGUI.BeginChangeCheck(); + m_ReferencedFontAsset = EditorGUILayout.ObjectField("Select Font Asset", m_ReferencedFontAsset, typeof(TMP_FontAsset), false) as TMP_FontAsset; + if (EditorGUI.EndChangeCheck() || hasSelectionChanged) + { + if (m_ReferencedFontAsset != null) + m_CharacterSequence = TMP_EditorUtility.GetUnicodeCharacterSequence(TMP_FontAsset.GetCharactersArray(m_ReferencedFontAsset)); + + m_IsFontAtlasInvalid = true; + } + + // Filter out unwanted characters. + chr = Event.current.character; + if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F') && (chr < ',' || chr > '-')) + { + Event.current.character = '\0'; + } + GUILayout.Label("Character Sequence (Hex)", EditorStyles.boldLabel); + EditorGUI.BeginChangeCheck(); + m_CharacterSequence = EditorGUILayout.TextArea(m_CharacterSequence, TMP_UIStyleManager.textAreaBoxWindow, GUILayout.Height(120), GUILayout.ExpandWidth(true)); + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + + EditorGUILayout.EndVertical(); + break; + + case 7: // Characters from Font Asset + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + GUILayout.Label("Type the characters to be included in the font asset or retrieve them from another font asset.", TMP_UIStyleManager.label); + GUILayout.Space(10f); + + EditorGUI.BeginChangeCheck(); + m_ReferencedFontAsset = EditorGUILayout.ObjectField("Select Font Asset", m_ReferencedFontAsset, typeof(TMP_FontAsset), false) as TMP_FontAsset; + if (EditorGUI.EndChangeCheck() || hasSelectionChanged) + { + if (m_ReferencedFontAsset != null) + m_CharacterSequence = TMP_FontAsset.GetCharacters(m_ReferencedFontAsset); + + m_IsFontAtlasInvalid = true; + } + + EditorGUI.indentLevel = 0; + + GUILayout.Label("Custom Character List", EditorStyles.boldLabel); + EditorGUI.BeginChangeCheck(); + m_CharacterSequence = EditorGUILayout.TextArea(m_CharacterSequence, TMP_UIStyleManager.textAreaBoxWindow, GUILayout.Height(120), GUILayout.ExpandWidth(true)); + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + EditorGUILayout.EndVertical(); + break; + + case 8: // Character List from File + EditorGUI.BeginChangeCheck(); + m_CharactersFromFile = EditorGUILayout.ObjectField("Character File", m_CharactersFromFile, typeof(TextAsset), false) as TextAsset; + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + + if (m_CharactersFromFile != null) + { + Regex rx = new Regex(@"(? + { + if (match.Value.StartsWith("\\U")) + return char.ConvertFromUtf32(int.Parse(match.Value.Replace("\\U", ""), NumberStyles.HexNumber)); + + return char.ConvertFromUtf32(int.Parse(match.Value.Replace("\\u", ""), NumberStyles.HexNumber)); + }); + } + break; + } + + // FONT STYLE SELECTION + //GUILayout.BeginHorizontal(); + //EditorGUI.BeginChangeCheck(); + ////m_FontStyle = (FaceStyles)EditorGUILayout.EnumPopup("Font Style", m_FontStyle, GUILayout.Width(225)); + ////m_FontStyleValue = EditorGUILayout.IntField((int)m_FontStyleValue); + //if (EditorGUI.EndChangeCheck()) + //{ + // m_IsFontAtlasInvalid = true; + //} + //GUILayout.EndHorizontal(); + + // Render Mode Selection + CheckForLegacyGlyphRenderMode(); + + EditorGUI.BeginChangeCheck(); + m_GlyphRenderMode = (GlyphRenderMode)EditorGUILayout.EnumPopup("Render Mode", m_GlyphRenderMode); + if (EditorGUI.EndChangeCheck()) + { + m_IsFontAtlasInvalid = true; + } + + m_IncludeFontFeatures = EditorGUILayout.Toggle("Get Kerning Pairs", m_IncludeFontFeatures); + + EditorGUILayout.Space(); + } + + EditorGUI.EndDisabledGroup(); + + if (!string.IsNullOrEmpty(m_WarningMessage)) + { + EditorGUILayout.HelpBox(m_WarningMessage, MessageType.Warning); + } + + GUI.enabled = m_SourceFontFile != null && !m_IsProcessing && !m_IsGenerationDisabled; // Enable Preview if we are not already rendering a font. + if (GUILayout.Button("Generate Font Atlas") && GUI.enabled) + { + if (!m_IsProcessing && m_SourceFontFile != null) + { + DestroyImmediate(m_FontAtlasTexture); + m_FontAtlasTexture = null; + m_SavedFontAtlas = null; + + // Initialize font engine + FontEngineError errorCode = FontEngine.InitializeFontEngine(); + if (errorCode != FontEngineError.Success) + { + Debug.Log("Font Asset Creator - Error [" + errorCode + "] has occurred while Initializing the FreeType Library."); + } + + // Get file path of the source font file. + string fontPath = AssetDatabase.GetAssetPath(m_SourceFontFile); + + if (errorCode == FontEngineError.Success) + { + errorCode = FontEngine.LoadFontFace(fontPath); + + if (errorCode != FontEngineError.Success) + { + Debug.Log("Font Asset Creator - Error Code [" + errorCode + "] has occurred trying to load the [" + m_SourceFontFile.name + "] font file. This typically results from the use of an incompatible or corrupted font file."); + } + } + + + // Define an array containing the characters we will render. + if (errorCode == FontEngineError.Success) + { + uint[] characterSet = null; + + // Get list of characters that need to be packed and rendered to the atlas texture. + if (m_CharacterSetSelectionMode == 7 || m_CharacterSetSelectionMode == 8) + { + List char_List = new List(); + + for (int i = 0; i < m_CharacterSequence.Length; i++) + { + uint unicode = m_CharacterSequence[i]; + + // Handle surrogate pairs + if (i < m_CharacterSequence.Length - 1 && char.IsHighSurrogate((char)unicode) && char.IsLowSurrogate(m_CharacterSequence[i + 1])) + { + unicode = (uint)char.ConvertToUtf32(m_CharacterSequence[i], m_CharacterSequence[i + 1]); + i += 1; + } + + // Check to make sure we don't include duplicates + if (char_List.FindIndex(item => item == unicode) == -1) + char_List.Add(unicode); + } + + characterSet = char_List.ToArray(); + } + else if (m_CharacterSetSelectionMode == 6) + { + characterSet = ParseHexNumberSequence(m_CharacterSequence); + } + else + { + characterSet = ParseNumberSequence(m_CharacterSequence); + } + + m_CharacterCount = characterSet.Length; + + m_AtlasGenerationProgress = 0; + m_IsProcessing = true; + m_IsGenerationCancelled = false; + + GlyphLoadFlags glyphLoadFlags = ((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_HINTED) == GlyphRasterModes.RASTER_MODE_HINTED ? GlyphLoadFlags.LOAD_RENDER : GlyphLoadFlags.LOAD_RENDER | GlyphLoadFlags.LOAD_NO_HINTING; + + // + AutoResetEvent autoEvent = new AutoResetEvent(false); + + // Worker thread to pack glyphs in the given texture space. + ThreadPool.QueueUserWorkItem(PackGlyphs => + { + // Start Stop Watch + m_StopWatch = System.Diagnostics.Stopwatch.StartNew(); + + // Clear the various lists used in the generation process. + m_AvailableGlyphsToAdd.Clear(); + m_MissingCharacters.Clear(); + m_ExcludedCharacters.Clear(); + m_CharacterLookupMap.Clear(); + m_GlyphLookupMap.Clear(); + m_GlyphsToPack.Clear(); + m_GlyphsPacked.Clear(); + + // Check if requested characters are available in the source font file. + for (int i = 0; i < characterSet.Length; i++) + { + uint unicode = characterSet[i]; + + if (FontEngine.TryGetGlyphIndex(unicode, out uint glyphIndex)) + { + // Skip over potential duplicate characters. + if (m_CharacterLookupMap.ContainsKey(unicode)) + continue; + + // Add character to character lookup map. + m_CharacterLookupMap.Add(unicode, glyphIndex); + + // Skip over potential duplicate glyph references. + if (m_GlyphLookupMap.ContainsKey(glyphIndex)) + { + // Add additional glyph reference for this character. + m_GlyphLookupMap[glyphIndex].Add(unicode); + continue; + } + + // Add glyph reference to glyph lookup map. + m_GlyphLookupMap.Add(glyphIndex, new List() { unicode }); + + // Add glyph index to list of glyphs to add to texture. + m_AvailableGlyphsToAdd.Add(glyphIndex); + } + else + { + // Add Unicode to list of missing characters. + m_MissingCharacters.Add(unicode); + } + } + + // Pack available glyphs in the provided texture space. + if (m_AvailableGlyphsToAdd.Count > 0) + { + int packingModifier = ((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; + + if (m_PointSizeSamplingMode == 0) // Auto-Sizing Point Size Mode + { + // Estimate min / max range for auto sizing of point size. + int minPointSize = 0; + int maxPointSize = (int)Mathf.Sqrt((m_AtlasWidth * m_AtlasHeight) / m_AvailableGlyphsToAdd.Count) * 3; + + m_PointSize = (maxPointSize + minPointSize) / 2; + + bool optimumPointSizeFound = false; + for (int iteration = 0; iteration < 15 && optimumPointSizeFound == false; iteration++) + { + m_AtlasGenerationProgressLabel = "Packing glyphs - Pass (" + iteration + ")"; + + FontEngine.SetFaceSize(m_PointSize); + + m_GlyphsToPack.Clear(); + m_GlyphsPacked.Clear(); + + m_FreeGlyphRects.Clear(); + m_FreeGlyphRects.Add(new GlyphRect(0, 0, m_AtlasWidth - packingModifier, m_AtlasHeight - packingModifier)); + m_UsedGlyphRects.Clear(); + + for (int i = 0; i < m_AvailableGlyphsToAdd.Count; i++) + { + uint glyphIndex = m_AvailableGlyphsToAdd[i]; + + if (FontEngine.TryGetGlyphWithIndexValue(glyphIndex, glyphLoadFlags, out Glyph glyph)) + { + if (glyph.glyphRect.width > 0 && glyph.glyphRect.height > 0) + { + m_GlyphsToPack.Add(glyph); + } + else + { + m_GlyphsPacked.Add(glyph); + } + } + } + + FontEngine.TryPackGlyphsInAtlas(m_GlyphsToPack, m_GlyphsPacked, m_Padding, (GlyphPackingMode)m_PackingMode, m_GlyphRenderMode, m_AtlasWidth, m_AtlasHeight, m_FreeGlyphRects, m_UsedGlyphRects); + + if (m_IsGenerationCancelled) + { + DestroyImmediate(m_FontAtlasTexture); + m_FontAtlasTexture = null; + return; + } + + //Debug.Log("Glyphs remaining to add [" + m_GlyphsToAdd.Count + "]. Glyphs added [" + m_GlyphsAdded.Count + "]."); + + if (m_GlyphsToPack.Count > 0) + { + if (m_PointSize > minPointSize) + { + maxPointSize = m_PointSize; + m_PointSize = (m_PointSize + minPointSize) / 2; + + //Debug.Log("Decreasing point size from [" + maxPointSize + "] to [" + m_PointSize + "]."); + } + } + else + { + if (maxPointSize - minPointSize > 1 && m_PointSize < maxPointSize) + { + minPointSize = m_PointSize; + m_PointSize = (m_PointSize + maxPointSize) / 2; + + //Debug.Log("Increasing point size from [" + minPointSize + "] to [" + m_PointSize + "]."); + } + else + { + //Debug.Log("[" + iteration + "] iterations to find the optimum point size of : [" + m_PointSize + "]."); + optimumPointSizeFound = true; + } + } + } + } + else // Custom Point Size Mode + { + m_AtlasGenerationProgressLabel = "Packing glyphs..."; + + // Set point size + FontEngine.SetFaceSize(m_PointSize); + + m_GlyphsToPack.Clear(); + m_GlyphsPacked.Clear(); + + m_FreeGlyphRects.Clear(); + m_FreeGlyphRects.Add(new GlyphRect(0, 0, m_AtlasWidth - packingModifier, m_AtlasHeight - packingModifier)); + m_UsedGlyphRects.Clear(); + + for (int i = 0; i < m_AvailableGlyphsToAdd.Count; i++) + { + uint glyphIndex = m_AvailableGlyphsToAdd[i]; + + if (FontEngine.TryGetGlyphWithIndexValue(glyphIndex, glyphLoadFlags, out Glyph glyph)) + { + if (glyph.glyphRect.width > 0 && glyph.glyphRect.height > 0) + { + m_GlyphsToPack.Add(glyph); + } + else + { + m_GlyphsPacked.Add(glyph); + } + } + } + + FontEngine.TryPackGlyphsInAtlas(m_GlyphsToPack, m_GlyphsPacked, m_Padding, (GlyphPackingMode)m_PackingMode, m_GlyphRenderMode, m_AtlasWidth, m_AtlasHeight, m_FreeGlyphRects, m_UsedGlyphRects); + + if (m_IsGenerationCancelled) + { + DestroyImmediate(m_FontAtlasTexture); + m_FontAtlasTexture = null; + return; + } + //Debug.Log("Glyphs remaining to add [" + m_GlyphsToAdd.Count + "]. Glyphs added [" + m_GlyphsAdded.Count + "]."); + } + + } + else + { + int packingModifier = ((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; + + FontEngine.SetFaceSize(m_PointSize); + + m_GlyphsToPack.Clear(); + m_GlyphsPacked.Clear(); + + m_FreeGlyphRects.Clear(); + m_FreeGlyphRects.Add(new GlyphRect(0, 0, m_AtlasWidth - packingModifier, m_AtlasHeight - packingModifier)); + m_UsedGlyphRects.Clear(); + } + + //Stop StopWatch + m_StopWatch.Stop(); + m_GlyphPackingGenerationTime = m_StopWatch.Elapsed.TotalMilliseconds; + Debug.Log("Glyph packing completed in: " + m_GlyphPackingGenerationTime.ToString("0.000 ms.")); + m_StopWatch.Reset(); + + m_FontCharacterTable.Clear(); + m_FontGlyphTable.Clear(); + m_GlyphsToRender.Clear(); + + // Add glyphs and characters successfully added to texture to their respective font tables. + foreach (Glyph glyph in m_GlyphsPacked) + { + uint glyphIndex = glyph.index; + + m_FontGlyphTable.Add(glyph); + + // Add glyphs to list of glyphs that need to be rendered. + if (glyph.glyphRect.width > 0 && glyph.glyphRect.height > 0) + m_GlyphsToRender.Add(glyph); + + foreach (uint unicode in m_GlyphLookupMap[glyphIndex]) + { + // Create new Character + m_FontCharacterTable.Add(new TMP_Character(unicode, glyph)); + } + } + + // + foreach (Glyph glyph in m_GlyphsToPack) + { + foreach (uint unicode in m_GlyphLookupMap[glyph.index]) + { + m_ExcludedCharacters.Add(unicode); + } + } + + // Get the face info for the current sampling point size. + m_FaceInfo = FontEngine.GetFaceInfo(); + + autoEvent.Set(); + }); + + // Worker thread to render glyphs in texture buffer. + ThreadPool.QueueUserWorkItem(RenderGlyphs => + { + autoEvent.WaitOne(); + + // Start Stop Watch + m_StopWatch = System.Diagnostics.Stopwatch.StartNew(); + + m_IsRenderingDone = false; + + // Allocate texture data + m_AtlasTextureBuffer = new byte[m_AtlasWidth * m_AtlasHeight]; + + m_AtlasGenerationProgressLabel = "Rendering glyphs..."; + + // Render and add glyphs to the given atlas texture. + if (m_GlyphsToRender.Count > 0) + { + FontEngine.RenderGlyphsToTexture(m_GlyphsToRender, m_Padding, m_GlyphRenderMode, m_AtlasTextureBuffer, m_AtlasWidth, m_AtlasHeight); + } + + m_IsRenderingDone = true; + + // Stop StopWatch + m_StopWatch.Stop(); + m_GlyphRenderingGenerationTime = m_StopWatch.Elapsed.TotalMilliseconds; + Debug.Log("Font Atlas generation completed in: " + m_GlyphRenderingGenerationTime.ToString("0.000 ms.")); + m_StopWatch.Reset(); + }); + } + + SaveCreationSettingsToEditorPrefs(SaveFontCreationSettings()); + } + } + + // FONT RENDERING PROGRESS BAR + GUILayout.Space(1); + Rect progressRect = EditorGUILayout.GetControlRect(false, 20); + + GUI.enabled = true; + progressRect.width -= 22; + EditorGUI.ProgressBar(progressRect, Mathf.Max(0.01f, m_AtlasGenerationProgress), m_AtlasGenerationProgressLabel); + progressRect.x = progressRect.x + progressRect.width + 2; + progressRect.y -= 1; + progressRect.width = 20; + progressRect.height = 20; + + GUI.enabled = m_IsProcessing; + if (GUI.Button(progressRect, "X")) + { + FontEngine.SendCancellationRequest(); + m_AtlasGenerationProgress = 0; + m_IsProcessing = false; + m_IsGenerationCancelled = true; + } + GUILayout.Space(5); + + // FONT STATUS & INFORMATION + GUI.enabled = true; + + GUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.Height(200)); + m_OutputScrollPosition = EditorGUILayout.BeginScrollView(m_OutputScrollPosition); + EditorGUILayout.LabelField(m_OutputFeedback, TMP_UIStyleManager.label); + EditorGUILayout.EndScrollView(); + GUILayout.EndVertical(); + + // SAVE TEXTURE & CREATE and SAVE FONT XML FILE + GUI.enabled = m_FontAtlasTexture != null && !m_IsProcessing; // Enable Save Button if font_Atlas is not Null. + + EditorGUILayout.BeginHorizontal(); + + if (GUILayout.Button("Save") && GUI.enabled) + { + if (m_SelectedFontAsset == null) + { + if (m_LegacyFontAsset != null) + SaveNewFontAssetWithSameName(m_LegacyFontAsset); + else + SaveNewFontAsset(m_SourceFontFile); + } + else + { + // Save over exiting Font Asset + string filePath = Path.GetFullPath(AssetDatabase.GetAssetPath(m_SelectedFontAsset)).Replace('\\', '/'); + + if (((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) + Save_Bitmap_FontAsset(filePath); + else + Save_SDF_FontAsset(filePath); + } + } + if (GUILayout.Button("Save as...") && GUI.enabled) + { + if (m_SelectedFontAsset == null) + { + SaveNewFontAsset(m_SourceFontFile); + } + else + { + SaveNewFontAssetWithSameName(m_SelectedFontAsset); + } + } + + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.Space(); + + EditorGUILayout.EndVertical(); + + GUI.enabled = true; // Re-enable GUI + + if (position.height > position.width || position.width < k_TwoColumnControlsWidth) + { + DrawPreview(); + GUILayout.Space(5); + } + + EditorGUILayout.EndScrollView(); + + if (m_IsFontAtlasInvalid) + ClearGeneratedData(); + } + + + /// + /// Clear the previously generated data. + /// + void ClearGeneratedData() + { + m_IsFontAtlasInvalid = false; + + if (m_FontAtlasTexture != null && !EditorUtility.IsPersistent(m_FontAtlasTexture)) + { + DestroyImmediate(m_FontAtlasTexture); + m_FontAtlasTexture = null; + } + + m_AtlasGenerationProgressLabel = string.Empty; + m_AtlasGenerationProgress = 0; + m_SavedFontAtlas = null; + + m_OutputFeedback = string.Empty; + m_WarningMessage = string.Empty; + } + + + /// + /// Function to update the feedback window showing the results of the latest generation. + /// + void UpdateRenderFeedbackWindow() + { + m_PointSize = m_FaceInfo.pointSize; + + string missingGlyphReport = string.Empty; + + //string colorTag = m_FontCharacterTable.Count == m_CharacterCount ? "" : ""; + string colorTag2 = ""; + + missingGlyphReport = "Font: " + colorTag2 + m_FaceInfo.familyName + " Style: " + colorTag2 + m_FaceInfo.styleName + ""; + + missingGlyphReport += "\nPoint Size: " + colorTag2 + m_FaceInfo.pointSize + " SP/PD Ratio: " + colorTag2 + ((float)m_Padding / m_FaceInfo.pointSize).ToString("0.0%" + ""); + + missingGlyphReport += "\n\nCharacters included: " + m_FontCharacterTable.Count + "/" + m_CharacterCount + ""; + missingGlyphReport += "\nMissing characters: " + m_MissingCharacters.Count + ""; + missingGlyphReport += "\nExcluded characters: " + m_ExcludedCharacters.Count + ""; + + // Report characters missing from font file + missingGlyphReport += "\n\nCharacters missing from font file:"; + missingGlyphReport += "\n----------------------------------------"; + + m_OutputFeedback = missingGlyphReport; + + for (int i = 0; i < m_MissingCharacters.Count; i++) + { + missingGlyphReport += "\nID: " + m_MissingCharacters[i] + "\tHex: " + m_MissingCharacters[i].ToString("X") + "\tChar [" + (char)m_MissingCharacters[i] + "]"; + + if (missingGlyphReport.Length < 16300) + m_OutputFeedback = missingGlyphReport; + } + + // Report characters that did not fit in the atlas texture + missingGlyphReport += "\n\nCharacters excluded from packing:"; + missingGlyphReport += "\n----------------------------------------"; + + for (int i = 0; i < m_ExcludedCharacters.Count; i++) + { + missingGlyphReport += "\nID: " + m_ExcludedCharacters[i] + "\tHex: " + m_ExcludedCharacters[i].ToString("X") + "\tChar [" + (char)m_ExcludedCharacters[i] + "]"; + + if (missingGlyphReport.Length < 16300) + m_OutputFeedback = missingGlyphReport; + } + + if (missingGlyphReport.Length > 16300) + m_OutputFeedback += "\n\nReport truncated.\nSee \"TextMesh Pro\\Glyph Report.txt\""; + + // Save Missing Glyph Report file + if (Directory.Exists("Assets/TextMesh Pro")) + { + missingGlyphReport = System.Text.RegularExpressions.Regex.Replace(missingGlyphReport, @"<[^>]*>", string.Empty); + File.WriteAllText("Assets/TextMesh Pro/Glyph Report.txt", missingGlyphReport); + AssetDatabase.Refresh(); + } + } + + + void CreateFontAtlasTexture() + { + if (m_FontAtlasTexture != null) + DestroyImmediate(m_FontAtlasTexture); + + m_FontAtlasTexture = new Texture2D(m_AtlasWidth, m_AtlasHeight, TextureFormat.Alpha8, false, true); + + Color32[] colors = new Color32[m_AtlasWidth * m_AtlasHeight]; + + for (int i = 0; i < colors.Length; i++) + { + byte c = m_AtlasTextureBuffer[i]; + colors[i] = new Color32(c, c, c, c); + } + + // Clear allocation of + m_AtlasTextureBuffer = null; + + if ((m_GlyphRenderMode & GlyphRenderMode.RASTER) == GlyphRenderMode.RASTER || (m_GlyphRenderMode & GlyphRenderMode.RASTER_HINTED) == GlyphRenderMode.RASTER_HINTED) + m_FontAtlasTexture.filterMode = FilterMode.Point; + + m_FontAtlasTexture.SetPixels32(colors, 0); + m_FontAtlasTexture.Apply(false, false); + + // Saving File for Debug + //var pngData = m_FontAtlasTexture.EncodeToPNG(); + //File.WriteAllBytes("Assets/Textures/Debug Font Texture.png", pngData); + } + + + /// + /// Open Save Dialog to provide the option save the font asset using the name of the source font file. This also appends SDF to the name if using any of the SDF Font Asset creation modes. + /// + /// + void SaveNewFontAsset(Object sourceObject) + { + string filePath; + + // Save new Font Asset and open save file requester at Source Font File location. + string saveDirectory = new FileInfo(AssetDatabase.GetAssetPath(sourceObject)).DirectoryName; + + if (((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) + { + filePath = EditorUtility.SaveFilePanel("Save TextMesh Pro! Font Asset File", saveDirectory, sourceObject.name, "asset"); + + if (filePath.Length == 0) + return; + + Save_Bitmap_FontAsset(filePath); + } + else + { + filePath = EditorUtility.SaveFilePanel("Save TextMesh Pro! Font Asset File", saveDirectory, sourceObject.name + " SDF", "asset"); + + if (filePath.Length == 0) + return; + + Save_SDF_FontAsset(filePath); + } + } + + + /// + /// Open Save Dialog to provide the option to save the font asset under the same name. + /// + /// + void SaveNewFontAssetWithSameName(Object sourceObject) + { + string filePath; + + // Save new Font Asset and open save file requester at Source Font File location. + string saveDirectory = new FileInfo(AssetDatabase.GetAssetPath(sourceObject)).DirectoryName; + + filePath = EditorUtility.SaveFilePanel("Save TextMesh Pro! Font Asset File", saveDirectory, sourceObject.name, "asset"); + + if (filePath.Length == 0) + return; + + if (((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) + { + Save_Bitmap_FontAsset(filePath); + } + else + { + Save_SDF_FontAsset(filePath); + } + } + + + void Save_Bitmap_FontAsset(string filePath) + { + filePath = filePath.Substring(0, filePath.Length - 6); // Trim file extension from filePath. + + string dataPath = Application.dataPath; + + if (filePath.IndexOf(dataPath, System.StringComparison.InvariantCultureIgnoreCase) == -1) + { + Debug.LogError("You're saving the font asset in a directory outside of this project folder. This is not supported. Please select a directory under \"" + dataPath + "\""); + return; + } + + string relativeAssetPath = filePath.Substring(dataPath.Length - 6); + string tex_DirName = Path.GetDirectoryName(relativeAssetPath); + string tex_FileName = Path.GetFileNameWithoutExtension(relativeAssetPath); + string tex_Path_NoExt = tex_DirName + "/" + tex_FileName; + + // Check if TextMeshPro font asset already exists. If not, create a new one. Otherwise update the existing one. + TMP_FontAsset fontAsset = AssetDatabase.LoadAssetAtPath(tex_Path_NoExt + ".asset", typeof(TMP_FontAsset)) as TMP_FontAsset; + if (fontAsset == null) + { + //Debug.Log("Creating TextMeshPro font asset!"); + fontAsset = ScriptableObject.CreateInstance(); // Create new TextMeshPro Font Asset. + AssetDatabase.CreateAsset(fontAsset, tex_Path_NoExt + ".asset"); + + // Set version number of font asset + fontAsset.version = "1.1.0"; + + //Set Font Asset Type + fontAsset.atlasRenderMode = m_GlyphRenderMode; + + // Reference to the source font file GUID. + fontAsset.m_SourceFontFileGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_SourceFontFile)); + + // Add FaceInfo to Font Asset + fontAsset.faceInfo = m_FaceInfo; + + // Add GlyphInfo[] to Font Asset + fontAsset.glyphTable = m_FontGlyphTable; + + // Add CharacterTable[] to font asset. + fontAsset.characterTable = m_FontCharacterTable; + + // Sort glyph and character tables. + fontAsset.SortGlyphAndCharacterTables(); + + // Get and Add Kerning Pairs to Font Asset + if (m_IncludeFontFeatures) + fontAsset.fontFeatureTable = GetKerningTable(); + + + // Add Font Atlas as Sub-Asset + fontAsset.atlasTextures = new Texture2D[] { m_FontAtlasTexture }; + m_FontAtlasTexture.name = tex_FileName + " Atlas"; + fontAsset.atlasWidth = m_AtlasWidth; + fontAsset.atlasHeight = m_AtlasHeight; + fontAsset.atlasPadding = m_Padding; + + AssetDatabase.AddObjectToAsset(m_FontAtlasTexture, fontAsset); + + // Create new Material and Add it as Sub-Asset + Shader default_Shader = Shader.Find("TextMeshPro/Bitmap"); // m_shaderSelection; + Material tmp_material = new Material(default_Shader); + tmp_material.name = tex_FileName + " Material"; + tmp_material.SetTexture(ShaderUtilities.ID_MainTex, m_FontAtlasTexture); + fontAsset.material = tmp_material; + + AssetDatabase.AddObjectToAsset(tmp_material, fontAsset); + + } + else + { + // Find all Materials referencing this font atlas. + Material[] material_references = TMP_EditorUtility.FindMaterialReferences(fontAsset); + + // Set version number of font asset + fontAsset.version = "1.1.0"; + + // Special handling to remove legacy font asset data + if (fontAsset.m_glyphInfoList != null && fontAsset.m_glyphInfoList.Count > 0) + fontAsset.m_glyphInfoList = null; + + // Destroy Assets that will be replaced. + if (fontAsset.atlasTextures != null && fontAsset.atlasTextures.Length > 0) + DestroyImmediate(fontAsset.atlasTextures[0], true); + + //Set Font Asset Type + fontAsset.atlasRenderMode = m_GlyphRenderMode; + + // Add FaceInfo to Font Asset + fontAsset.faceInfo = m_FaceInfo; + + // Add GlyphInfo[] to Font Asset + fontAsset.glyphTable = m_FontGlyphTable; + + // Add CharacterTable[] to font asset. + fontAsset.characterTable = m_FontCharacterTable; + + // Sort glyph and character tables. + fontAsset.SortGlyphAndCharacterTables(); + + // Get and Add Kerning Pairs to Font Asset + if (m_IncludeFontFeatures) + fontAsset.fontFeatureTable = GetKerningTable(); + + // Add Font Atlas as Sub-Asset + fontAsset.atlasTextures = new Texture2D[] { m_FontAtlasTexture }; + m_FontAtlasTexture.name = tex_FileName + " Atlas"; + fontAsset.atlasWidth = m_AtlasWidth; + fontAsset.atlasHeight = m_AtlasHeight; + fontAsset.atlasPadding = m_Padding; + + // Special handling due to a bug in earlier versions of Unity. + m_FontAtlasTexture.hideFlags = HideFlags.None; + fontAsset.material.hideFlags = HideFlags.None; + + AssetDatabase.AddObjectToAsset(m_FontAtlasTexture, fontAsset); + + // Assign new font atlas texture to the existing material. + fontAsset.material.SetTexture(ShaderUtilities.ID_MainTex, fontAsset.atlasTextures[0]); + + // Update the Texture reference on the Material + for (int i = 0; i < material_references.Length; i++) + { + material_references[i].SetTexture(ShaderUtilities.ID_MainTex, m_FontAtlasTexture); + } + } + + // Add list of GlyphRects to font asset. + fontAsset.freeGlyphRects = m_FreeGlyphRects; + fontAsset.usedGlyphRects = m_UsedGlyphRects; + + // Save Font Asset creation settings + m_SelectedFontAsset = fontAsset; + m_LegacyFontAsset = null; + fontAsset.creationSettings = SaveFontCreationSettings(); + + AssetDatabase.SaveAssets(); + + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(fontAsset)); // Re-import font asset to get the new updated version. + + //EditorUtility.SetDirty(font_asset); + fontAsset.ReadFontAssetDefinition(); + + AssetDatabase.Refresh(); + + m_FontAtlasTexture = null; + + // NEED TO GENERATE AN EVENT TO FORCE A REDRAW OF ANY TEXTMESHPRO INSTANCES THAT MIGHT BE USING THIS FONT ASSET + TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, fontAsset); + } + + + void Save_SDF_FontAsset(string filePath) + { + filePath = filePath.Substring(0, filePath.Length - 6); // Trim file extension from filePath. + + string dataPath = Application.dataPath; + + if (filePath.IndexOf(dataPath, System.StringComparison.InvariantCultureIgnoreCase) == -1) + { + Debug.LogError("You're saving the font asset in a directory outside of this project folder. This is not supported. Please select a directory under \"" + dataPath + "\""); + return; + } + + string relativeAssetPath = filePath.Substring(dataPath.Length - 6); + string tex_DirName = Path.GetDirectoryName(relativeAssetPath); + string tex_FileName = Path.GetFileNameWithoutExtension(relativeAssetPath); + string tex_Path_NoExt = tex_DirName + "/" + tex_FileName; + + + // Check if TextMeshPro font asset already exists. If not, create a new one. Otherwise update the existing one. + TMP_FontAsset fontAsset = AssetDatabase.LoadAssetAtPath(tex_Path_NoExt + ".asset"); + if (fontAsset == null) + { + //Debug.Log("Creating TextMeshPro font asset!"); + fontAsset = ScriptableObject.CreateInstance(); // Create new TextMeshPro Font Asset. + AssetDatabase.CreateAsset(fontAsset, tex_Path_NoExt + ".asset"); + + // Set version number of font asset + fontAsset.version = "1.1.0"; + + // Reference to source font file GUID. + fontAsset.m_SourceFontFileGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_SourceFontFile)); + + //Set Font Asset Type + fontAsset.atlasRenderMode = m_GlyphRenderMode; + + // Add FaceInfo to Font Asset + fontAsset.faceInfo = m_FaceInfo; + + // Add GlyphInfo[] to Font Asset + fontAsset.glyphTable = m_FontGlyphTable; + + // Add CharacterTable[] to font asset. + fontAsset.characterTable = m_FontCharacterTable; + + // Sort glyph and character tables. + fontAsset.SortGlyphAndCharacterTables(); + + // Get and Add Kerning Pairs to Font Asset + if (m_IncludeFontFeatures) + fontAsset.fontFeatureTable = GetKerningTable(); + + // Add Font Atlas as Sub-Asset + fontAsset.atlasTextures = new Texture2D[] { m_FontAtlasTexture }; + m_FontAtlasTexture.name = tex_FileName + " Atlas"; + fontAsset.atlasWidth = m_AtlasWidth; + fontAsset.atlasHeight = m_AtlasHeight; + fontAsset.atlasPadding = m_Padding; + + AssetDatabase.AddObjectToAsset(m_FontAtlasTexture, fontAsset); + + // Create new Material and Add it as Sub-Asset + Shader default_Shader = Shader.Find("TextMeshPro/Distance Field"); + Material tmp_material = new Material(default_Shader); + + tmp_material.name = tex_FileName + " Material"; + tmp_material.SetTexture(ShaderUtilities.ID_MainTex, m_FontAtlasTexture); + tmp_material.SetFloat(ShaderUtilities.ID_TextureWidth, m_FontAtlasTexture.width); + tmp_material.SetFloat(ShaderUtilities.ID_TextureHeight, m_FontAtlasTexture.height); + + int spread = m_Padding + 1; + tmp_material.SetFloat(ShaderUtilities.ID_GradientScale, spread); // Spread = Padding for Brute Force SDF. + + tmp_material.SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.normalStyle); + tmp_material.SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyle); + + fontAsset.material = tmp_material; + + AssetDatabase.AddObjectToAsset(tmp_material, fontAsset); + + } + else + { + // Find all Materials referencing this font atlas. + Material[] material_references = TMP_EditorUtility.FindMaterialReferences(fontAsset); + + // Destroy Assets that will be replaced. + if (fontAsset.atlasTextures != null && fontAsset.atlasTextures.Length > 0) + DestroyImmediate(fontAsset.atlasTextures[0], true); + + // Set version number of font asset + fontAsset.version = "1.1.0"; + + // Special handling to remove legacy font asset data + if (fontAsset.m_glyphInfoList != null && fontAsset.m_glyphInfoList.Count > 0) + fontAsset.m_glyphInfoList = null; + + //Set Font Asset Type + fontAsset.atlasRenderMode = m_GlyphRenderMode; + + // Add FaceInfo to Font Asset + fontAsset.faceInfo = m_FaceInfo; + + // Add GlyphInfo[] to Font Asset + fontAsset.glyphTable = m_FontGlyphTable; + + // Add CharacterTable[] to font asset. + fontAsset.characterTable = m_FontCharacterTable; + + // Sort glyph and character tables. + fontAsset.SortGlyphAndCharacterTables(); + + // Get and Add Kerning Pairs to Font Asset + // TODO: Check and preserve existing adjustment pairs. + if (m_IncludeFontFeatures) + fontAsset.fontFeatureTable = GetKerningTable(); + + // Add Font Atlas as Sub-Asset + fontAsset.atlasTextures = new Texture2D[] { m_FontAtlasTexture }; + m_FontAtlasTexture.name = tex_FileName + " Atlas"; + fontAsset.atlasWidth = m_AtlasWidth; + fontAsset.atlasHeight = m_AtlasHeight; + fontAsset.atlasPadding = m_Padding; + + // Special handling due to a bug in earlier versions of Unity. + m_FontAtlasTexture.hideFlags = HideFlags.None; + fontAsset.material.hideFlags = HideFlags.None; + + AssetDatabase.AddObjectToAsset(m_FontAtlasTexture, fontAsset); + + // Assign new font atlas texture to the existing material. + fontAsset.material.SetTexture(ShaderUtilities.ID_MainTex, fontAsset.atlasTextures[0]); + + // Update the Texture reference on the Material + for (int i = 0; i < material_references.Length; i++) + { + material_references[i].SetTexture(ShaderUtilities.ID_MainTex, m_FontAtlasTexture); + material_references[i].SetFloat(ShaderUtilities.ID_TextureWidth, m_FontAtlasTexture.width); + material_references[i].SetFloat(ShaderUtilities.ID_TextureHeight, m_FontAtlasTexture.height); + + int spread = m_Padding + 1; + material_references[i].SetFloat(ShaderUtilities.ID_GradientScale, spread); // Spread = Padding for Brute Force SDF. + + material_references[i].SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.normalStyle); + material_references[i].SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyle); + } + } + + // Saving File for Debug + //var pngData = destination_Atlas.EncodeToPNG(); + //File.WriteAllBytes("Assets/Textures/Debug Distance Field.png", pngData); + + // Add list of GlyphRects to font asset. + fontAsset.freeGlyphRects = m_FreeGlyphRects; + fontAsset.usedGlyphRects = m_UsedGlyphRects; + + // Save Font Asset creation settings + m_SelectedFontAsset = fontAsset; + m_LegacyFontAsset = null; + fontAsset.creationSettings = SaveFontCreationSettings(); + + AssetDatabase.SaveAssets(); + + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(fontAsset)); // Re-import font asset to get the new updated version. + + fontAsset.ReadFontAssetDefinition(); + + AssetDatabase.Refresh(); + + m_FontAtlasTexture = null; + + // NEED TO GENERATE AN EVENT TO FORCE A REDRAW OF ANY TEXTMESHPRO INSTANCES THAT MIGHT BE USING THIS FONT ASSET + TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, fontAsset); + } + + + /// + /// Internal method to save the Font Asset Creation Settings + /// + /// + FontAssetCreationSettings SaveFontCreationSettings() + { + FontAssetCreationSettings settings = new FontAssetCreationSettings(); + + //settings.sourceFontFileName = m_SourceFontFile.name; + settings.sourceFontFileGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_SourceFontFile)); + settings.pointSizeSamplingMode = m_PointSizeSamplingMode; + settings.pointSize = m_PointSize; + settings.padding = m_Padding; + settings.packingMode = (int)m_PackingMode; + settings.atlasWidth = m_AtlasWidth; + settings.atlasHeight = m_AtlasHeight; + settings.characterSetSelectionMode = m_CharacterSetSelectionMode; + settings.characterSequence = m_CharacterSequence; + settings.referencedFontAssetGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_ReferencedFontAsset)); + settings.referencedTextAssetGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_CharactersFromFile)); + //settings.fontStyle = (int)m_FontStyle; + //settings.fontStyleModifier = m_FontStyleValue; + settings.renderMode = (int)m_GlyphRenderMode; + settings.includeFontFeatures = m_IncludeFontFeatures; + + return settings; + } + + + /// + /// Internal method to load the Font Asset Creation Settings + /// + /// + void LoadFontCreationSettings(FontAssetCreationSettings settings) + { + m_SourceFontFile = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(settings.sourceFontFileGUID)); + m_PointSizeSamplingMode = settings.pointSizeSamplingMode; + m_PointSize = settings.pointSize; + m_Padding = settings.padding; + m_PackingMode = (FontPackingModes)settings.packingMode; + m_AtlasWidth = settings.atlasWidth; + m_AtlasHeight = settings.atlasHeight; + m_CharacterSetSelectionMode = settings.characterSetSelectionMode; + m_CharacterSequence = settings.characterSequence; + m_ReferencedFontAsset = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(settings.referencedFontAssetGUID)); + m_CharactersFromFile = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(settings.referencedTextAssetGUID)); + //m_FontStyle = (FaceStyles)settings.fontStyle; + //m_FontStyleValue = settings.fontStyleModifier; + m_GlyphRenderMode = (GlyphRenderMode)settings.renderMode; + m_IncludeFontFeatures = settings.includeFontFeatures; + } + + + /// + /// Save the latest font asset creation settings to EditorPrefs. + /// + /// + void SaveCreationSettingsToEditorPrefs(FontAssetCreationSettings settings) + { + // Create new list if one does not already exist + if (m_FontAssetCreationSettingsContainer == null) + { + m_FontAssetCreationSettingsContainer = new FontAssetCreationSettingsContainer(); + m_FontAssetCreationSettingsContainer.fontAssetCreationSettings = new List(); + } + + // Add new creation settings to the list + m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.Add(settings); + + // Since list should only contain the most 4 recent settings, we remove the first element if list exceeds 4 elements. + if (m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.Count > 4) + m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.RemoveAt(0); + + m_FontAssetCreationSettingsCurrentIndex = m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.Count - 1; + + // Serialize list to JSON + string serializedSettings = JsonUtility.ToJson(m_FontAssetCreationSettingsContainer, true); + + EditorPrefs.SetString(k_FontAssetCreationSettingsContainerKey, serializedSettings); + } + + void DrawPreview() + { + Rect pixelRect; + if (position.width > position.height && position.width > k_TwoColumnControlsWidth) + { + float minSide = Mathf.Min(position.height - 15f, position.width - k_TwoColumnControlsWidth); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.MaxWidth(minSide)); + + pixelRect = GUILayoutUtility.GetRect(minSide, minSide, GUILayout.ExpandHeight(false), GUILayout.ExpandWidth(false)); + } + else + { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + pixelRect = GUILayoutUtility.GetAspectRect(1f); + } + + if (m_FontAtlasTexture != null) + { + EditorGUI.DrawTextureAlpha(pixelRect, m_FontAtlasTexture, ScaleMode.StretchToFill); + } + else if (m_SavedFontAtlas != null) + { + EditorGUI.DrawTextureAlpha(pixelRect, m_SavedFontAtlas, ScaleMode.StretchToFill); + } + + EditorGUILayout.EndVertical(); + } + + + void CheckForLegacyGlyphRenderMode() + { + // Special handling for legacy glyph render mode + if ((int)m_GlyphRenderMode < 0x100) + { + switch ((int)m_GlyphRenderMode) + { + case 0: + m_GlyphRenderMode = GlyphRenderMode.SMOOTH_HINTED; + break; + case 1: + m_GlyphRenderMode = GlyphRenderMode.SMOOTH; + break; + case 2: + m_GlyphRenderMode = GlyphRenderMode.RASTER_HINTED; + break; + case 3: + m_GlyphRenderMode = GlyphRenderMode.RASTER; + break; + case 6: + case 7: + m_GlyphRenderMode = GlyphRenderMode.SDFAA; + break; + } + } + } + + + // Get Kerning Pairs + public TMP_FontFeatureTable GetKerningTable() + { + GlyphPairAdjustmentRecord[] adjustmentRecords = FontEngine.GetGlyphPairAdjustmentTable(m_AvailableGlyphsToAdd.ToArray()); + + if (adjustmentRecords == null) + return null; + + TMP_FontFeatureTable fontFeatureTable = new TMP_FontFeatureTable(); + + for (int i = 0; i < adjustmentRecords.Length; i++) + { + fontFeatureTable.glyphPairAdjustmentRecords.Add(new TMP_GlyphPairAdjustmentRecord(adjustmentRecords[i])); + } + + fontFeatureTable.SortGlyphPairAdjustmentRecords(); + + return fontFeatureTable; + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta new file mode 100644 index 00000000..4648857f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 383966e89d344865a36addd5d378ffd3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontPlugin.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontPlugin.cs new file mode 100644 index 00000000..3b098ff2 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontPlugin.cs @@ -0,0 +1,115 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; +using System.Runtime.InteropServices; + + +namespace TMPro.EditorUtilities +{ + /* + public class TMPro_FontPlugin + { + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void DebugLog(string log); + private static readonly DebugLog debugLog = DebugWrapper; + private static readonly IntPtr functionPointer = Marshal.GetFunctionPointerForDelegate(debugLog); + + private static void DebugWrapper(string log) + { + Debug.Log(log); + } + + public static void LinkDebugLog() + { + LinkDebug(functionPointer); + } + + [DllImport("TMPro_Plugin")] + private static extern void LinkDebug([MarshalAs(UnmanagedType.FunctionPtr)]IntPtr debugCall); + + [DllImport("TMPro_Plugin")] + public static extern + int Initialize_FontEngine(); + + [DllImport("TMPro_Plugin")] + public static extern + int Destroy_FontEngine(); + + [DllImport("TMPro_Plugin")] + public static extern + int Load_TrueType_Font(string fontPath); + + [DllImport("TMPro_Plugin")] + public static extern + int FT_Size_Font(int fontSize); + + [DllImport("TMPro_Plugin")] + public static extern + int Render_Character(byte[] buffer_fill, byte[] buffer_edge, int buffer_width, int buffer_height, int offset, int asc, FaceStyles style, float thickness, RenderModes rasterMode, ref FT_GlyphInfo glyphInfo); + + [DllImport("TMPro_Plugin")] + public static extern + int Render_Characters(byte[] buffer, int buffer_width, int buffer_height, int character_padding, int[] asc_set, int char_count, FaceStyles style, float style_mod, bool autoSize, RenderModes renderMode, int method, ref FT_FaceInfo fontData, FT_GlyphInfo[] Output); + + [DllImport("TMPro_Plugin")] + public static extern + int FT_GetKerningPairs(string fontPath, int[] characterSet, int setCount, FT_KerningPair[] kerningPairs); + + [DllImport("TMPro_Plugin")] + public static extern + float Check_RenderProgress(); + + [DllImport("TMPro_Plugin")] + internal static extern + void SendCancellationRequest(CancellationRequestType request); + } + + public enum FaceStyles { Normal, Bold, Italic, Bold_Italic, Outline, Bold_Sim }; + public enum RenderModes { HintedSmooth = 0, Smooth = 1, RasterHinted = 2, Raster = 3, DistanceField16 = 6, DistanceField32 = 7 }; // SignedDistanceField64 = 8 + + internal enum CancellationRequestType : byte { None = 0x0, CancelInProgess = 0x1, WindowClosed = 0x2 }; + + [StructLayout(LayoutKind.Sequential)] + public struct FT_KerningPair + { + public int ascII_Left; + public int ascII_Right; + public float xAdvanceOffset; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct FT_GlyphInfo + { + public int id; + public float x; + public float y; + public float width; + public float height; + public float xOffset; + public float yOffset; + public float xAdvance; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct FT_FaceInfo + { + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] + public string name; + public int pointSize; + public int padding; + public float lineHeight; + public float baseline; + public float ascender; + public float descender; + public float centerLine; + public float underline; + public float underlineThickness; + public int characterCount; + public int atlasWidth; + public int atlasHeight; + } + */ +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontPlugin.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontPlugin.cs.meta new file mode 100644 index 00000000..66f3a87e --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_FontPlugin.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9edc9283e7d6409fab242fe8fb6a822c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_SortingLayerHelper.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_SortingLayerHelper.cs new file mode 100644 index 00000000..4f44c53b --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_SortingLayerHelper.cs @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2014, Nick Gravelyn. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ + +using UnityEngine; +using UnityEditor; +using System; +using System.Reflection; + +namespace TMPro +{ + // Helpers used by the different sorting layer classes. + public static class SortingLayerHelper + { + private static Type _utilityType; + private static PropertyInfo _sortingLayerNamesProperty; + private static MethodInfo _getSortingLayerUserIdMethod; + + static SortingLayerHelper() + { + _utilityType = Type.GetType("UnityEditorInternal.InternalEditorUtility, UnityEditor"); + _sortingLayerNamesProperty = _utilityType.GetProperty("sortingLayerNames", BindingFlags.Static | BindingFlags.NonPublic); + _getSortingLayerUserIdMethod = _utilityType.GetMethod("GetSortingLayerUniqueID", BindingFlags.Static | BindingFlags.NonPublic); + } + + // Gets an array of sorting layer names. + // Since this uses reflection, callers should check for 'null' which will be returned if the reflection fails. + public static string[] sortingLayerNames + { + get + { + if (_sortingLayerNamesProperty == null) + { + return null; + } + + return _sortingLayerNamesProperty.GetValue(null, null) as string[]; + } + } + + // Given the ID of a sorting layer, returns the sorting layer's name + public static string GetSortingLayerNameFromID(int id) + { + string[] names = sortingLayerNames; + if (names == null) + { + return null; + } + + for (int i = 0; i < names.Length; i++) + { + if (GetSortingLayerIDForIndex(i) == id) + { + return names[i]; + } + } + + return null; + } + + // Given the name of a sorting layer, returns the ID. + public static int GetSortingLayerIDForName(string name) + { + string[] names = sortingLayerNames; + if (names == null) + { + return 0; + } + + return GetSortingLayerIDForIndex(Array.IndexOf(names, name)); + } + + // Helper to convert from a sorting layer INDEX to a sorting layer ID. These are not the same thing. + // IDs are based on the order in which layers were created and do not change when reordering the layers. + // Thankfully there is a private helper we can call to get the ID for a layer given its index. + public static int GetSortingLayerIDForIndex(int index) + { + if (_getSortingLayerUserIdMethod == null) + { + return 0; + } + + return (int)_getSortingLayerUserIdMethod.Invoke(null, new object[] { index }); + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta new file mode 100644 index 00000000..9d902b90 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 88ed537c17c34f339121fe9a7d6d7a0e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TextContainerEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TextContainerEditor.cs new file mode 100644 index 00000000..09fc6173 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TextContainerEditor.cs @@ -0,0 +1,235 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + [CustomEditor(typeof(TextContainer)), CanEditMultipleObjects] + public class TMPro_TextContainerEditor : Editor + { + + // Serialized Properties + private SerializedProperty anchorPosition_prop; + private SerializedProperty pivot_prop; + private SerializedProperty rectangle_prop; + private SerializedProperty margins_prop; + + + private TextContainer m_textContainer; + //private Transform m_transform; + //private Vector3[] m_Rect_handlePoints = new Vector3[4]; + //private Vector3[] m_Margin_handlePoints = new Vector3[4]; + + //private Vector2 m_anchorPosition; + + //private Vector3 m_mousePreviousPOS; + //private Vector2 m_previousStartPOS; + //private int m_mouseDragFlag = 0; + + //private static Transform m_visualHelper; + + + void OnEnable() + { + + // Serialized Properties + anchorPosition_prop = serializedObject.FindProperty("m_anchorPosition"); + pivot_prop = serializedObject.FindProperty("m_pivot"); + rectangle_prop = serializedObject.FindProperty("m_rect"); + margins_prop = serializedObject.FindProperty("m_margins"); + + m_textContainer = (TextContainer)target; + //m_transform = m_textContainer.transform; + + + /* + if (m_visualHelper == null) + { + m_visualHelper = GameObject.CreatePrimitive(PrimitiveType.Sphere).transform; + m_visualHelper.localScale = new Vector3(0.25f, 0.25f, 0.25f); + } + */ + } + + void OnDisable() + { + /* + if (m_visualHelper != null) + DestroyImmediate (m_visualHelper.gameObject); + */ + } + + + + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(anchorPosition_prop); + if (anchorPosition_prop.enumValueIndex == 9) + { + EditorGUI.indentLevel += 1; + EditorGUILayout.PropertyField(pivot_prop, new GUIContent("Pivot Position")); + EditorGUI.indentLevel -= 1; + } + + + DrawDimensionProperty(rectangle_prop, "Dimensions"); + DrawMaginProperty(margins_prop, "Margins"); + if (EditorGUI.EndChangeCheck()) + { + // Re-compute pivot position when changes are made. + if (anchorPosition_prop.enumValueIndex != 9) + pivot_prop.vector2Value = GetAnchorPosition(anchorPosition_prop.enumValueIndex); + + m_textContainer.hasChanged = true; + } + + serializedObject.ApplyModifiedProperties(); + + EditorGUILayout.Space(); + } + + + private void DrawDimensionProperty(SerializedProperty property, string label) + { + float old_LabelWidth = EditorGUIUtility.labelWidth; + float old_FieldWidth = EditorGUIUtility.fieldWidth; + + Rect rect = EditorGUILayout.GetControlRect(false, 18); + Rect pos0 = new Rect(rect.x, rect.y + 2, rect.width, 18); + + float width = rect.width + 3; + pos0.width = old_LabelWidth; + GUI.Label(pos0, label); + + Rect rectangle = property.rectValue; + + float width_B = width - old_LabelWidth; + float fieldWidth = width_B / 4; + pos0.width = fieldWidth - 5; + + pos0.x = old_LabelWidth + 15; + GUI.Label(pos0, "Width"); + + pos0.x += fieldWidth; + rectangle.width = EditorGUI.FloatField(pos0, GUIContent.none, rectangle.width); + + pos0.x += fieldWidth; + GUI.Label(pos0, "Height"); + + pos0.x += fieldWidth; + rectangle.height = EditorGUI.FloatField(pos0, GUIContent.none, rectangle.height); + + property.rectValue = rectangle; + EditorGUIUtility.labelWidth = old_LabelWidth; + EditorGUIUtility.fieldWidth = old_FieldWidth; + } + + + private void DrawMaginProperty(SerializedProperty property, string label) + { + float old_LabelWidth = EditorGUIUtility.labelWidth; + float old_FieldWidth = EditorGUIUtility.fieldWidth; + + Rect rect = EditorGUILayout.GetControlRect(false, 2 * 18); + Rect pos0 = new Rect(rect.x, rect.y + 2, rect.width, 18); + + float width = rect.width + 3; + pos0.width = old_LabelWidth; + GUI.Label(pos0, label); + + //Vector4 vec = property.vector4Value; + Vector4 vec = Vector4.zero; + vec.x = property.FindPropertyRelative("x").floatValue; + vec.y = property.FindPropertyRelative("y").floatValue; + vec.z = property.FindPropertyRelative("z").floatValue; + vec.w = property.FindPropertyRelative("w").floatValue; + + + float widthB = width - old_LabelWidth; + float fieldWidth = widthB / 4; + pos0.width = fieldWidth - 5; + + // Labels + pos0.x = old_LabelWidth + 15; + GUI.Label(pos0, "Left"); + + pos0.x += fieldWidth; + GUI.Label(pos0, "Top"); + + pos0.x += fieldWidth; + GUI.Label(pos0, "Right"); + + pos0.x += fieldWidth; + GUI.Label(pos0, "Bottom"); + + pos0.y += 18; + + pos0.x = old_LabelWidth + 15; + vec.x = EditorGUI.FloatField(pos0, GUIContent.none, vec.x); + + pos0.x += fieldWidth; + vec.y = EditorGUI.FloatField(pos0, GUIContent.none, vec.y); + + pos0.x += fieldWidth; + vec.z = EditorGUI.FloatField(pos0, GUIContent.none, vec.z); + + pos0.x += fieldWidth; + vec.w = EditorGUI.FloatField(pos0, GUIContent.none, vec.w); + + //property.vector4Value = vec; + property.FindPropertyRelative("x").floatValue = vec.x; + property.FindPropertyRelative("y").floatValue = vec.y; + property.FindPropertyRelative("z").floatValue = vec.z; + property.FindPropertyRelative("w").floatValue = vec.w; + + EditorGUIUtility.labelWidth = old_LabelWidth; + EditorGUIUtility.fieldWidth = old_FieldWidth; + } + + + Vector2 GetAnchorPosition(int index) + { + Vector2 anchorPosition = Vector2.zero; + + switch (index) + { + case 0: // TOP LEFT + anchorPosition = new Vector2(0, 1); + break; + case 1: // TOP + anchorPosition = new Vector2(0.5f, 1); + break; + case 2: // TOP RIGHT + anchorPosition = new Vector2(1, 1); + break; + case 3: // LEFT + anchorPosition = new Vector2(0, 0.5f); + break; + case 4: // MIDDLE + anchorPosition = new Vector2(0.5f, 0.5f); + break; + case 5: // RIGHT + anchorPosition = new Vector2(1, 0.5f); + break; + case 6: // BOTTOM LEFT + anchorPosition = new Vector2(0, 0); + break; + case 7: // BOTTOM + anchorPosition = new Vector2(0.5f, 0); + break; + case 8: // BOTTOM RIGHT + anchorPosition = new Vector2(1, 0); + break; + } + + return anchorPosition; + } + + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TextContainerEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TextContainerEditor.cs.meta new file mode 100644 index 00000000..bad78812 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TextContainerEditor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 02893ffb522b490a9fa28eedd2584309 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TexturePostProcessor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TexturePostProcessor.cs new file mode 100644 index 00000000..b1634094 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TexturePostProcessor.cs @@ -0,0 +1,75 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + public class TMPro_TexturePostProcessor : AssetPostprocessor + { + + void OnPostprocessTexture(Texture2D texture) + { + //var importer = assetImporter as TextureImporter; + + Texture2D tex = AssetDatabase.LoadAssetAtPath(assetPath, typeof(Texture2D)) as Texture2D; + + // Send Event Sub Objects + if (tex != null) + TMPro_EventManager.ON_SPRITE_ASSET_PROPERTY_CHANGED(true, tex); + } + + } + + + //public class TMPro_PackageImportPostProcessor : AssetPostprocessor + //{ + // static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) + // { + // for (int i = 0; i < importedAssets.Length; i++) + // { + // if (importedAssets[i].Contains("TextMesh Pro/Resources/TMP Settings.asset")) + // { + // Debug.Log("New TMP Settings file was just imported."); + + // // TMP Settings file was just re-imported. + // // Check if project already contains + // } + + + // if (importedAssets[i].Contains("com.unity.TextMeshPro/Examples")) + // { + // //Debug.Log("New TMP Examples folder was just imported."); + // } + + // //Debug.Log("[" + importedAssets[i] + "] was just imported."); + // } + + + + // //for (int i = 0; i < deletedAssets.Length; i++) + // //{ + // // if (deletedAssets[i] == "Assets/TextMesh Pro") + // // { + // // //Debug.Log("Asset [" + deletedAssets[i] + "] has been deleted."); + // // string currentBuildSettings = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); + + // // //Check for and inject TMP_PRESENT + // // if (currentBuildSettings.Contains("TMP_PRESENT;")) + // // { + // // currentBuildSettings = currentBuildSettings.Replace("TMP_PRESENT;", ""); + + // // PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, currentBuildSettings); + // // } + // // else if (currentBuildSettings.Contains("TMP_PRESENT")) + // // { + // // currentBuildSettings = currentBuildSettings.Replace("TMP_PRESENT", ""); + + // // PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, currentBuildSettings); + // // } + // // } + // //} + // } + //} +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta new file mode 100644 index 00000000..fb00b80f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f4935fb862d54980b1bcbca942962642 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef new file mode 100644 index 00000000..d5df154d --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef @@ -0,0 +1,13 @@ +{ + "name": "Unity.TextMeshPro.Editor", + "references": [ + "Unity.TextMeshPro", + "Unity.ugui", + "Unity.ugui.Editor" + ], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta new file mode 100644 index 00000000..6ed76ad6 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6546d7765b4165b40850b3667f981c26 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime.meta new file mode 100644 index 00000000..4b244150 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5fc988a1d5b04aee9a5222502b201a45 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/AssemblyInfo.cs.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/AssemblyInfo.cs.cs new file mode 100644 index 00000000..52784935 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/AssemblyInfo.cs.cs @@ -0,0 +1,11 @@ +using System.Runtime.CompilerServices; + +// Allow internal visibility for testing purposes. +[assembly: InternalsVisibleTo("Unity.TextCore")] + +[assembly: InternalsVisibleTo("Unity.FontEngine.Tests")] + +#if UNITY_EDITOR +[assembly: InternalsVisibleTo("Unity.TextCore.Editor")] +[assembly: InternalsVisibleTo("Unity.TextMeshPro.Editor")] +#endif diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/AssemblyInfo.cs.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/AssemblyInfo.cs.cs.meta new file mode 100644 index 00000000..cd527067 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/AssemblyInfo.cs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1c147d10db452eb4b854a35f84472017 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs new file mode 100644 index 00000000..0a6485ab --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs @@ -0,0 +1,146 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + public class FastAction + { + + LinkedList delegates = new LinkedList(); + + Dictionary> lookup = new Dictionary>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + if (lookup.TryGetValue(rhs, out LinkedListNode node)) + { + lookup.Remove(rhs); + delegates.Remove(node); + } + } + + public void Call() + { + var node = delegates.First; + while (node != null) + { + node.Value(); + node = node.Next; + } + } + } + + + public class FastAction + { + + LinkedList> delegates = new LinkedList>(); + + Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + if (lookup.TryGetValue(rhs, out LinkedListNode> node)) + { + lookup.Remove(rhs); + delegates.Remove(node); + } + } + + public void Call(A a) + { + var node = delegates.First; + while (node != null) + { + node.Value(a); + node = node.Next; + } + } + } + + + public class FastAction + { + + LinkedList> delegates = new LinkedList>(); + + Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + if (lookup.TryGetValue(rhs, out LinkedListNode> node)) + { + lookup.Remove(rhs); + delegates.Remove(node); + } + } + + public void Call(A a, B b) + { + var node = delegates.First; + while (node != null) + { + node.Value(a, b); + node = node.Next; + } + } + } + + + public class FastAction + { + + LinkedList> delegates = new LinkedList>(); + + Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + if (lookup.TryGetValue(rhs, out LinkedListNode> node)) + { + lookup.Remove(rhs); + delegates.Remove(node); + } + } + + public void Call(A a, B b, C c) + { + var node = delegates.First; + while (node != null) + { + node.Value(a, b, c); + node = node.Next; + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs.meta new file mode 100644 index 00000000..fcd991e5 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 871f8edd56e84b8fb295b10cc3c78f36 +timeCreated: 1435956061 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/MaterialReferenceManager.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/MaterialReferenceManager.cs new file mode 100644 index 00000000..33709634 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/MaterialReferenceManager.cs @@ -0,0 +1,644 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + + public class MaterialReferenceManager + { + private static MaterialReferenceManager s_Instance; + + // Dictionaries used to track Asset references. + private Dictionary m_FontMaterialReferenceLookup = new Dictionary(); + private Dictionary m_FontAssetReferenceLookup = new Dictionary(); + private Dictionary m_SpriteAssetReferenceLookup = new Dictionary(); + private Dictionary m_ColorGradientReferenceLookup = new Dictionary(); + + + /// + /// Get a singleton instance of the registry + /// + public static MaterialReferenceManager instance + { + get + { + if (MaterialReferenceManager.s_Instance == null) + MaterialReferenceManager.s_Instance = new MaterialReferenceManager(); + return MaterialReferenceManager.s_Instance; + } + } + + + + /// + /// Add new font asset reference to dictionary. + /// + /// + public static void AddFontAsset(TMP_FontAsset fontAsset) + { + MaterialReferenceManager.instance.AddFontAssetInternal(fontAsset); + } + + /// + /// Add new Font Asset reference to dictionary. + /// + /// + private void AddFontAssetInternal(TMP_FontAsset fontAsset) + { + if (m_FontAssetReferenceLookup.ContainsKey(fontAsset.hashCode)) return; + + // Add reference to the font asset. + m_FontAssetReferenceLookup.Add(fontAsset.hashCode, fontAsset); + + // Add reference to the font material. + m_FontMaterialReferenceLookup.Add(fontAsset.materialHashCode, fontAsset.material); + } + + + + /// + /// Add new Sprite Asset to dictionary. + /// + /// + /// + public static void AddSpriteAsset(TMP_SpriteAsset spriteAsset) + { + MaterialReferenceManager.instance.AddSpriteAssetInternal(spriteAsset); + } + + /// + /// Internal method to add a new sprite asset to the dictionary. + /// + /// + /// + private void AddSpriteAssetInternal(TMP_SpriteAsset spriteAsset) + { + if (m_SpriteAssetReferenceLookup.ContainsKey(spriteAsset.hashCode)) return; + + // Add reference to sprite asset. + m_SpriteAssetReferenceLookup.Add(spriteAsset.hashCode, spriteAsset); + + // Adding reference to the sprite asset material as well + m_FontMaterialReferenceLookup.Add(spriteAsset.hashCode, spriteAsset.material); + } + + /// + /// Add new Sprite Asset to dictionary. + /// + /// + /// + public static void AddSpriteAsset(int hashCode, TMP_SpriteAsset spriteAsset) + { + MaterialReferenceManager.instance.AddSpriteAssetInternal(hashCode, spriteAsset); + } + + /// + /// Internal method to add a new sprite asset to the dictionary. + /// + /// + /// + private void AddSpriteAssetInternal(int hashCode, TMP_SpriteAsset spriteAsset) + { + if (m_SpriteAssetReferenceLookup.ContainsKey(hashCode)) return; + + // Add reference to Sprite Asset. + m_SpriteAssetReferenceLookup.Add(hashCode, spriteAsset); + + // Add reference to Sprite Asset using the asset hashcode. + m_FontMaterialReferenceLookup.Add(hashCode, spriteAsset.material); + + // Compatibility check + if (spriteAsset.hashCode == 0) spriteAsset.hashCode = hashCode; + } + + + /// + /// Add new Material reference to dictionary. + /// + /// + /// + public static void AddFontMaterial(int hashCode, Material material) + { + MaterialReferenceManager.instance.AddFontMaterialInternal(hashCode, material); + } + + /// + /// Add new material reference to dictionary. + /// + /// + /// + private void AddFontMaterialInternal(int hashCode, Material material) + { + // Since this function is called after checking if the material is + // contained in the dictionary, there is no need to check again. + m_FontMaterialReferenceLookup.Add(hashCode, material); + } + + + /// + /// Add new Color Gradient Preset to dictionary. + /// + /// + /// + public static void AddColorGradientPreset(int hashCode, TMP_ColorGradient spriteAsset) + { + MaterialReferenceManager.instance.AddColorGradientPreset_Internal(hashCode, spriteAsset); + } + + /// + /// Internal method to add a new Color Gradient Preset to the dictionary. + /// + /// + /// + private void AddColorGradientPreset_Internal(int hashCode, TMP_ColorGradient spriteAsset) + { + if (m_ColorGradientReferenceLookup.ContainsKey(hashCode)) return; + + // Add reference to Color Gradient Preset Asset. + m_ColorGradientReferenceLookup.Add(hashCode, spriteAsset); + } + + + + /// + /// Add new material reference and return the index of this new reference in the materialReferences array. + /// + /// + /// + /// + //public int AddMaterial(Material material, int materialHashCode, TMP_FontAsset fontAsset) + //{ + // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) + // { + // int index = m_MaterialReferenceLookup.Count; + + // materialReferences[index].fontAsset = fontAsset; + // materialReferences[index].material = material; + // materialReferences[index].isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; + // materialReferences[index].index = index; + // materialReferences[index].referenceCount = 0; + + // m_MaterialReferenceLookup[materialHashCode] = index; + + // // Compute Padding value and store it + // // TODO + + // int fontAssetHashCode = fontAsset.hashCode; + + // if (!m_FontAssetReferenceLookup.ContainsKey(fontAssetHashCode)) + // m_FontAssetReferenceLookup.Add(fontAssetHashCode, fontAsset); + + // m_countInternal += 1; + + // return index; + // } + // else + // { + // return m_MaterialReferenceLookup[materialHashCode]; + // } + //} + + + /// + /// Add new material reference and return the index of this new reference in the materialReferences array. + /// + /// + /// + /// + /// + //public int AddMaterial(Material material, int materialHashCode, TMP_SpriteAsset spriteAsset) + //{ + // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) + // { + // int index = m_MaterialReferenceLookup.Count; + + // materialReferences[index].fontAsset = materialReferences[0].fontAsset; + // materialReferences[index].spriteAsset = spriteAsset; + // materialReferences[index].material = material; + // materialReferences[index].isDefaultMaterial = true; + // materialReferences[index].index = index; + // materialReferences[index].referenceCount = 0; + + // m_MaterialReferenceLookup[materialHashCode] = index; + + // int spriteAssetHashCode = spriteAsset.hashCode; + + // if (!m_SpriteAssetReferenceLookup.ContainsKey(spriteAssetHashCode)) + // m_SpriteAssetReferenceLookup.Add(spriteAssetHashCode, spriteAsset); + + // m_countInternal += 1; + + // return index; + // } + // else + // { + // return m_MaterialReferenceLookup[materialHashCode]; + // } + //} + + + /// + /// Function to check if the font asset is already referenced. + /// + /// + /// + public bool Contains(TMP_FontAsset font) + { + if (m_FontAssetReferenceLookup.ContainsKey(font.hashCode)) + return true; + + return false; + } + + + /// + /// Function to check if the sprite asset is already referenced. + /// + /// + /// + public bool Contains(TMP_SpriteAsset sprite) + { + if (m_FontAssetReferenceLookup.ContainsKey(sprite.hashCode)) + return true; + + return false; + } + + + + /// + /// Function returning the Font Asset corresponding to the provided hash code. + /// + /// + /// + /// + public static bool TryGetFontAsset(int hashCode, out TMP_FontAsset fontAsset) + { + return MaterialReferenceManager.instance.TryGetFontAssetInternal(hashCode, out fontAsset); + } + + /// + /// Internal Function returning the Font Asset corresponding to the provided hash code. + /// + /// + /// + /// + private bool TryGetFontAssetInternal(int hashCode, out TMP_FontAsset fontAsset) + { + fontAsset = null; + + if (m_FontAssetReferenceLookup.TryGetValue(hashCode, out fontAsset)) + { + return true; + } + + return false; + } + + + + /// + /// Function returning the Sprite Asset corresponding to the provided hash code. + /// + /// + /// + /// + public static bool TryGetSpriteAsset(int hashCode, out TMP_SpriteAsset spriteAsset) + { + return MaterialReferenceManager.instance.TryGetSpriteAssetInternal(hashCode, out spriteAsset); + } + + /// + /// Internal function returning the Sprite Asset corresponding to the provided hash code. + /// + /// + /// + /// + private bool TryGetSpriteAssetInternal(int hashCode, out TMP_SpriteAsset spriteAsset) + { + spriteAsset = null; + + if (m_SpriteAssetReferenceLookup.TryGetValue(hashCode, out spriteAsset)) + { + return true; + } + + return false; + } + + + /// + /// Function returning the Color Gradient Preset corresponding to the provided hash code. + /// + /// + /// + /// + public static bool TryGetColorGradientPreset(int hashCode, out TMP_ColorGradient gradientPreset) + { + return MaterialReferenceManager.instance.TryGetColorGradientPresetInternal(hashCode, out gradientPreset); + } + + /// + /// Internal function returning the Color Gradient Preset corresponding to the provided hash code. + /// + /// + /// + /// + private bool TryGetColorGradientPresetInternal(int hashCode, out TMP_ColorGradient gradientPreset) + { + gradientPreset = null; + + if (m_ColorGradientReferenceLookup.TryGetValue(hashCode, out gradientPreset)) + { + return true; + } + + return false; + } + + + /// + /// Function returning the Font Material corresponding to the provided hash code. + /// + /// + /// + /// + public static bool TryGetMaterial(int hashCode, out Material material) + { + return MaterialReferenceManager.instance.TryGetMaterialInternal(hashCode, out material); + } + + /// + /// Internal function returning the Font Material corresponding to the provided hash code. + /// + /// + /// + /// + private bool TryGetMaterialInternal(int hashCode, out Material material) + { + material = null; + + if (m_FontMaterialReferenceLookup.TryGetValue(hashCode, out material)) + { + return true; + } + + return false; + } + + + /// + /// Function to lookup a material based on hash code and returning the MaterialReference containing this material. + /// + /// + /// + /// + //public bool TryGetMaterial(int hashCode, out MaterialReference materialReference) + //{ + // int materialIndex = -1; + + // if (m_MaterialReferenceLookup.TryGetValue(hashCode, out materialIndex)) + // { + // materialReference = materialReferences[materialIndex]; + + // return true; + // } + + // materialReference = new MaterialReference(); + + // return false; + //} + + + + /// + /// + /// + /// + /// + //public int GetMaterialIndex(TMP_FontAsset fontAsset) + //{ + // if (m_MaterialReferenceLookup.ContainsKey(fontAsset.materialHashCode)) + // return m_MaterialReferenceLookup[fontAsset.materialHashCode]; + + // return -1; + //} + + + /// + /// + /// + /// + /// + //public TMP_FontAsset GetFontAsset(int index) + //{ + // if (index >= 0 && index < materialReferences.Length) + // return materialReferences[index].fontAsset; + + // return null; + //} + + + /// + /// + /// + /// + /// + /// + //public void SetDefaultMaterial(Material material, int materialHashCode, TMP_FontAsset fontAsset) + //{ + // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) + // { + // materialReferences[0].fontAsset = fontAsset; + // materialReferences[0].material = material; + // materialReferences[0].index = 0; + // materialReferences[0].isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; + // materialReferences[0].referenceCount = 0; + // m_MaterialReferenceLookup[materialHashCode] = 0; + + // // Compute Padding value and store it + // // TODO + + // int fontHashCode = fontAsset.hashCode; + + // if (!m_FontAssetReferenceLookup.ContainsKey(fontHashCode)) + // m_FontAssetReferenceLookup.Add(fontHashCode, fontAsset); + // } + // else + // { + // materialReferences[0].fontAsset = fontAsset; + // materialReferences[0].material = material; + // materialReferences[0].index = 0; + // materialReferences[0].referenceCount = 0; + // m_MaterialReferenceLookup[materialHashCode] = 0; + // } + // // Compute padding + // // TODO + + // m_countInternal = 1; + //} + + + + /// + /// + /// + //public void Clear() + //{ + // //m_currentIndex = 0; + // m_MaterialReferenceLookup.Clear(); + // m_SpriteAssetReferenceLookup.Clear(); + // m_FontAssetReferenceLookup.Clear(); + //} + + + /// + /// Function to clear the reference count for each of the material references. + /// + //public void ClearReferenceCount() + //{ + // m_countInternal = 0; + + // for (int i = 0; i < materialReferences.Length; i++) + // { + // if (materialReferences[i].fontAsset == null) + // return; + + // materialReferences[i].referenceCount = 0; + // } + //} + + } + + + + public struct MaterialReference + { + + public int index; + public TMP_FontAsset fontAsset; + public TMP_SpriteAsset spriteAsset; + public Material material; + public bool isDefaultMaterial; + public bool isFallbackMaterial; + public Material fallbackMaterial; + public float padding; + public int referenceCount; + + + /// + /// Constructor for new Material Reference. + /// + /// + /// + /// + /// + /// + public MaterialReference(int index, TMP_FontAsset fontAsset, TMP_SpriteAsset spriteAsset, Material material, float padding) + { + this.index = index; + this.fontAsset = fontAsset; + this.spriteAsset = spriteAsset; + this.material = material; + this.isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; + this.isFallbackMaterial = false; + this.fallbackMaterial = null; + this.padding = padding; + this.referenceCount = 0; + } + + + /// + /// Function to check if a certain font asset is contained in the material reference array. + /// + /// + /// + /// + public static bool Contains(MaterialReference[] materialReferences, TMP_FontAsset fontAsset) + { + int id = fontAsset.GetInstanceID(); + + for (int i = 0; i < materialReferences.Length && materialReferences[i].fontAsset != null; i++) + { + if (materialReferences[i].fontAsset.GetInstanceID() == id) + return true; + } + + return false; + } + + + /// + /// Function to add a new material reference and returning its index in the material reference array. + /// + /// + /// + /// + /// + /// + public static int AddMaterialReference(Material material, TMP_FontAsset fontAsset, MaterialReference[] materialReferences, Dictionary materialReferenceIndexLookup) + { + int materialID = material.GetInstanceID(); + + if (materialReferenceIndexLookup.TryGetValue(materialID, out int index)) + { + return index; + } + else + { + index = materialReferenceIndexLookup.Count; + + // Add new reference index + materialReferenceIndexLookup[materialID] = index; + + materialReferences[index].index = index; + materialReferences[index].fontAsset = fontAsset; + materialReferences[index].spriteAsset = null; + materialReferences[index].material = material; + materialReferences[index].isDefaultMaterial = materialID == fontAsset.material.GetInstanceID() ? true : false; + //materialReferences[index].padding = 0; + materialReferences[index].referenceCount = 0; + + return index; + } + } + + + /// + /// + /// + /// + /// + /// + /// + /// + public static int AddMaterialReference(Material material, TMP_SpriteAsset spriteAsset, MaterialReference[] materialReferences, Dictionary materialReferenceIndexLookup) + { + int materialID = material.GetInstanceID(); + + if (materialReferenceIndexLookup.TryGetValue(materialID, out int index)) + { + return index; + } + else + { + index = materialReferenceIndexLookup.Count; + + // Add new reference index + materialReferenceIndexLookup[materialID] = index; + + materialReferences[index].index = index; + materialReferences[index].fontAsset = materialReferences[0].fontAsset; + materialReferences[index].spriteAsset = spriteAsset; + materialReferences[index].material = material; + materialReferences[index].isDefaultMaterial = true; + //materialReferences[index].padding = 0; + materialReferences[index].referenceCount = 0; + + return index; + } + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/MaterialReferenceManager.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/MaterialReferenceManager.cs.meta new file mode 100644 index 00000000..17ad5664 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/MaterialReferenceManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 11a6a034ab84493cbed6af5ae7aae78b +timeCreated: 1449743129 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Asset.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Asset.cs new file mode 100644 index 00000000..a0ff4971 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Asset.cs @@ -0,0 +1,26 @@ +using UnityEngine; + +namespace TMPro +{ + + // Base class inherited by the various TextMeshPro Assets. + [System.Serializable] + public class TMP_Asset : ScriptableObject + { + /// + /// HashCode based on the name of the asset. + /// + public int hashCode; + + /// + /// The material used by this asset. + /// + public Material material; + + /// + /// HashCode based on the name of the material assigned to this asset. + /// + public int materialHashCode; + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Asset.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Asset.cs.meta new file mode 100644 index 00000000..62e9ee7a --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Asset.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3bda1886f58f4e0ab1139400b160c3ee +timeCreated: 1459318952 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Character.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Character.cs new file mode 100644 index 00000000..8fc161ec --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Character.cs @@ -0,0 +1,51 @@ +using System; +using UnityEngine.TextCore; + +namespace TMPro +{ + /// + /// A basic element of text. + /// + [Serializable] + public class TMP_Character : TMP_TextElement + { + /// + /// Default constructor. + /// + public TMP_Character() + { + m_ElementType = TextElementType.Character; + this.scale = 1.0f; + } + + /// + /// Constructor for new character + /// + /// Unicode value. + /// Glyph + public TMP_Character(uint unicode, Glyph glyph) + { + m_ElementType = TextElementType.Character; + + this.unicode = unicode; + this.glyph = glyph; + this.glyphIndex = glyph.index; + this.scale = 1.0f; + } + + /// + /// Constructor for new character + /// + /// Unicode value. + /// Glyph index. + internal TMP_Character(uint unicode, uint glyphIndex) + { + m_ElementType = TextElementType.Character; + + this.unicode = unicode; + this.glyph = null; + this.glyphIndex = glyphIndex; + this.scale = 1.0f; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Character.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Character.cs.meta new file mode 100644 index 00000000..55aea1b6 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Character.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4ac5b6a65aaeb59478e3b78660e9f134 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CharacterInfo.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CharacterInfo.cs new file mode 100644 index 00000000..e15c46af --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CharacterInfo.cs @@ -0,0 +1,73 @@ +using UnityEngine; +using UnityEngine.TextCore; + +namespace TMPro +{ + public struct TMP_Vertex + { + public Vector3 position; + public Vector2 uv; + public Vector2 uv2; + public Vector2 uv4; + public Color32 color; + + //public Vector3 normal; + //public Vector4 tangent; + } + + /// + /// Structure containing information about individual text elements (character or sprites). + /// + public struct TMP_CharacterInfo + { + public char character; // Should be changed to an int to handle UTF 32 + /// + /// Index of the character in the raw string. + /// + public int index; // Index of the character in the input string. + public int stringLength; + public TMP_TextElementType elementType; + + public TMP_TextElement textElement; + public TMP_FontAsset fontAsset; + public TMP_SpriteAsset spriteAsset; + public int spriteIndex; + public Material material; + public int materialReferenceIndex; + public bool isUsingAlternateTypeface; + + public float pointSize; + + //public short wordNumber; + public int lineNumber; + //public short charNumber; + public int pageNumber; + + + public int vertexIndex; + public TMP_Vertex vertex_BL; + public TMP_Vertex vertex_TL; + public TMP_Vertex vertex_TR; + public TMP_Vertex vertex_BR; + + public Vector3 topLeft; + public Vector3 bottomLeft; + public Vector3 topRight; + public Vector3 bottomRight; + public float origin; + public float ascender; + public float baseLine; + public float descender; + + public float xAdvance; + public float aspectRatio; + public float scale; + public Color32 color; + public Color32 underlineColor; + public Color32 strikethroughColor; + public Color32 highlightColor; + public FontStyles style; + public bool isVisible; + //public bool isIgnoringAlignment; + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CharacterInfo.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CharacterInfo.cs.meta new file mode 100644 index 00000000..9367a16e --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CharacterInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90fe1c65e6bb3bc4e90862df7297719e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_ColorGradient.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_ColorGradient.cs new file mode 100644 index 00000000..0730adaf --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_ColorGradient.cs @@ -0,0 +1,68 @@ +using UnityEngine; +using System.Collections; + +namespace TMPro +{ + public enum ColorMode + { + Single, + HorizontalGradient, + VerticalGradient, + FourCornersGradient + } + + [System.Serializable] + public class TMP_ColorGradient : ScriptableObject + { + public ColorMode colorMode = ColorMode.FourCornersGradient; + + public Color topLeft; + public Color topRight; + public Color bottomLeft; + public Color bottomRight; + + const ColorMode k_DefaultColorMode = ColorMode.FourCornersGradient; + static readonly Color k_DefaultColor = Color.white; + + /// + /// Default Constructor which sets each of the colors as white. + /// + public TMP_ColorGradient() + { + colorMode = k_DefaultColorMode; + topLeft = k_DefaultColor; + topRight = k_DefaultColor; + bottomLeft = k_DefaultColor; + bottomRight = k_DefaultColor; + } + + /// + /// Constructor allowing to set the default color of the Color Gradient. + /// + /// + public TMP_ColorGradient(Color color) + { + colorMode = k_DefaultColorMode; + topLeft = color; + topRight = color; + bottomLeft = color; + bottomRight = color; + } + + /// + /// The vertex colors at the corners of the characters. + /// + /// Top left color. + /// Top right color. + /// Bottom left color. + /// Bottom right color. + public TMP_ColorGradient(Color color0, Color color1, Color color2, Color color3) + { + colorMode = k_DefaultColorMode; + this.topLeft = color0; + this.topRight = color1; + this.bottomLeft = color2; + this.bottomRight = color3; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_ColorGradient.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_ColorGradient.cs.meta new file mode 100644 index 00000000..1d79d010 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_ColorGradient.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 54d21f6ece3b46479f0c328f8c6007e0 +timeCreated: 1468187202 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CoroutineTween.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CoroutineTween.cs new file mode 100644 index 00000000..bec1f54e --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CoroutineTween.cs @@ -0,0 +1,246 @@ +using UnityEngine; +using UnityEngine.Events; +using System.Collections; + + +namespace TMPro +{ + // Base interface for tweeners, + // using an interface instead of + // an abstract class as we want the + // tweens to be structs. + internal interface ITweenValue + { + void TweenValue(float floatPercentage); + bool ignoreTimeScale { get; } + float duration { get; } + bool ValidTarget(); + } + + // Color tween class, receives the + // TweenValue callback and then sets + // the value on the target. + internal struct ColorTween : ITweenValue + { + public enum ColorTweenMode + { + All, + RGB, + Alpha + } + + public class ColorTweenCallback : UnityEvent { } + + private ColorTweenCallback m_Target; + private Color m_StartColor; + private Color m_TargetColor; + private ColorTweenMode m_TweenMode; + + private float m_Duration; + private bool m_IgnoreTimeScale; + + public Color startColor + { + get { return m_StartColor; } + set { m_StartColor = value; } + } + + public Color targetColor + { + get { return m_TargetColor; } + set { m_TargetColor = value; } + } + + public ColorTweenMode tweenMode + { + get { return m_TweenMode; } + set { m_TweenMode = value; } + } + + public float duration + { + get { return m_Duration; } + set { m_Duration = value; } + } + + public bool ignoreTimeScale + { + get { return m_IgnoreTimeScale; } + set { m_IgnoreTimeScale = value; } + } + + public void TweenValue(float floatPercentage) + { + if (!ValidTarget()) + return; + + var newColor = Color.Lerp(m_StartColor, m_TargetColor, floatPercentage); + + if (m_TweenMode == ColorTweenMode.Alpha) + { + newColor.r = m_StartColor.r; + newColor.g = m_StartColor.g; + newColor.b = m_StartColor.b; + } + else if (m_TweenMode == ColorTweenMode.RGB) + { + newColor.a = m_StartColor.a; + } + m_Target.Invoke(newColor); + } + + public void AddOnChangedCallback(UnityAction callback) + { + if (m_Target == null) + m_Target = new ColorTweenCallback(); + + m_Target.AddListener(callback); + } + + public bool GetIgnoreTimescale() + { + return m_IgnoreTimeScale; + } + + public float GetDuration() + { + return m_Duration; + } + + public bool ValidTarget() + { + return m_Target != null; + } + } + + // Float tween class, receives the + // TweenValue callback and then sets + // the value on the target. + internal struct FloatTween : ITweenValue + { + public class FloatTweenCallback : UnityEvent { } + + private FloatTweenCallback m_Target; + private float m_StartValue; + private float m_TargetValue; + + private float m_Duration; + private bool m_IgnoreTimeScale; + + public float startValue + { + get { return m_StartValue; } + set { m_StartValue = value; } + } + + public float targetValue + { + get { return m_TargetValue; } + set { m_TargetValue = value; } + } + + public float duration + { + get { return m_Duration; } + set { m_Duration = value; } + } + + public bool ignoreTimeScale + { + get { return m_IgnoreTimeScale; } + set { m_IgnoreTimeScale = value; } + } + + public void TweenValue(float floatPercentage) + { + if (!ValidTarget()) + return; + + var newValue = Mathf.Lerp(m_StartValue, m_TargetValue, floatPercentage); + m_Target.Invoke(newValue); + } + + public void AddOnChangedCallback(UnityAction callback) + { + if (m_Target == null) + m_Target = new FloatTweenCallback(); + + m_Target.AddListener(callback); + } + + public bool GetIgnoreTimescale() + { + return m_IgnoreTimeScale; + } + + public float GetDuration() + { + return m_Duration; + } + + public bool ValidTarget() + { + return m_Target != null; + } + } + + // Tween runner, executes the given tween. + // The coroutine will live within the given + // behaviour container. + internal class TweenRunner where T : struct, ITweenValue + { + protected MonoBehaviour m_CoroutineContainer; + protected IEnumerator m_Tween; + + // utility function for starting the tween + private static IEnumerator Start(T tweenInfo) + { + if (!tweenInfo.ValidTarget()) + yield break; + + var elapsedTime = 0.0f; + while (elapsedTime < tweenInfo.duration) + { + elapsedTime += tweenInfo.ignoreTimeScale ? Time.unscaledDeltaTime : Time.deltaTime; + var percentage = Mathf.Clamp01(elapsedTime / tweenInfo.duration); + tweenInfo.TweenValue(percentage); + yield return null; + } + tweenInfo.TweenValue(1.0f); + } + + public void Init(MonoBehaviour coroutineContainer) + { + m_CoroutineContainer = coroutineContainer; + } + + public void StartTween(T info) + { + if (m_CoroutineContainer == null) + { + Debug.LogWarning("Coroutine container not configured... did you forget to call Init?"); + return; + } + + StopTween(); + + if (!m_CoroutineContainer.gameObject.activeInHierarchy) + { + info.TweenValue(1.0f); + return; + } + + m_Tween = Start(info); + m_CoroutineContainer.StartCoroutine(m_Tween); + } + + public void StopTween() + { + if (m_Tween != null) + { + m_CoroutineContainer.StopCoroutine(m_Tween); + m_Tween = null; + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CoroutineTween.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CoroutineTween.cs.meta new file mode 100644 index 00000000..01cf5eb3 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_CoroutineTween.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 658c1fb149e7498aa072b0c0f3bf13f0 +timeCreated: 1464850953 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_DefaultControls.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_DefaultControls.cs new file mode 100644 index 00000000..7bc6f97e --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_DefaultControls.cs @@ -0,0 +1,385 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; + + +namespace TMPro +{ + + public static class TMP_DefaultControls + { + public struct Resources + { + public Sprite standard; + public Sprite background; + public Sprite inputField; + public Sprite knob; + public Sprite checkmark; + public Sprite dropdown; + public Sprite mask; + } + + private const float kWidth = 160f; + private const float kThickHeight = 30f; + private const float kThinHeight = 20f; + private static Vector2 s_ThickElementSize = new Vector2(kWidth, kThickHeight); + private static Vector2 s_ThinElementSize = new Vector2(kWidth, kThinHeight); + //private static Vector2 s_ImageElementSize = new Vector2(100f, 100f); + private static Color s_DefaultSelectableColor = new Color(1f, 1f, 1f, 1f); + //private static Color s_PanelColor = new Color(1f, 1f, 1f, 0.392f); + private static Color s_TextColor = new Color(50f / 255f, 50f / 255f, 50f / 255f, 1f); + + + private static GameObject CreateUIElementRoot(string name, Vector2 size) + { + GameObject child = new GameObject(name); + RectTransform rectTransform = child.AddComponent(); + rectTransform.sizeDelta = size; + return child; + } + + static GameObject CreateUIObject(string name, GameObject parent) + { + GameObject go = new GameObject(name); + go.AddComponent(); + SetParentAndAlign(go, parent); + return go; + } + + private static void SetDefaultTextValues(TMP_Text lbl) + { + // Set text values we want across UI elements in default controls. + // Don't set values which are the same as the default values for the Text component, + // since there's no point in that, and it's good to keep them as consistent as possible. + lbl.color = s_TextColor; + lbl.fontSize = 14; + } + + private static void SetDefaultColorTransitionValues(Selectable slider) + { + ColorBlock colors = slider.colors; + colors.highlightedColor = new Color(0.882f, 0.882f, 0.882f); + colors.pressedColor = new Color(0.698f, 0.698f, 0.698f); + colors.disabledColor = new Color(0.521f, 0.521f, 0.521f); + } + + private static void SetParentAndAlign(GameObject child, GameObject parent) + { + if (parent == null) + return; + + child.transform.SetParent(parent.transform, false); + SetLayerRecursively(child, parent.layer); + } + + private static void SetLayerRecursively(GameObject go, int layer) + { + go.layer = layer; + Transform t = go.transform; + for (int i = 0; i < t.childCount; i++) + SetLayerRecursively(t.GetChild(i).gameObject, layer); + } + + // Actual controls + + public static GameObject CreateScrollbar(Resources resources) + { + // Create GOs Hierarchy + GameObject scrollbarRoot = CreateUIElementRoot("Scrollbar", s_ThinElementSize); + + GameObject sliderArea = CreateUIObject("Sliding Area", scrollbarRoot); + GameObject handle = CreateUIObject("Handle", sliderArea); + + Image bgImage = scrollbarRoot.AddComponent(); + bgImage.sprite = resources.background; + bgImage.type = Image.Type.Sliced; + bgImage.color = s_DefaultSelectableColor; + + Image handleImage = handle.AddComponent(); + handleImage.sprite = resources.standard; + handleImage.type = Image.Type.Sliced; + handleImage.color = s_DefaultSelectableColor; + + RectTransform sliderAreaRect = sliderArea.GetComponent(); + sliderAreaRect.sizeDelta = new Vector2(-20, -20); + sliderAreaRect.anchorMin = Vector2.zero; + sliderAreaRect.anchorMax = Vector2.one; + + RectTransform handleRect = handle.GetComponent(); + handleRect.sizeDelta = new Vector2(20, 20); + + Scrollbar scrollbar = scrollbarRoot.AddComponent(); + scrollbar.handleRect = handleRect; + scrollbar.targetGraphic = handleImage; + SetDefaultColorTransitionValues(scrollbar); + + return scrollbarRoot; + } + + public static GameObject CreateButton(Resources resources) + { + GameObject buttonRoot = CreateUIElementRoot("Button", s_ThickElementSize); + + GameObject childText = new GameObject("Text (TMP)"); + childText.AddComponent(); + SetParentAndAlign(childText, buttonRoot); + + Image image = buttonRoot.AddComponent(); + image.sprite = resources.standard; + image.type = Image.Type.Sliced; + image.color = s_DefaultSelectableColor; + + Button bt = buttonRoot.AddComponent