diff --git a/README.md b/README.md index ebd68e1..8072fef 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ In the editor's top menu, go to the `Croquet` drop-down and ensure that the `Bui **IMPORTANT: During the next step the editor may appear to have frozen, possibly for some minutes. This is not a sign of failure; please be patient.** -Press the Play button. The first time you do so after installation, C4U will notice that you have not yet installed the JavaScript build tools from the package. It will copy them across, and also run an `npm install` that fetches all Croquet and other dependencies that are needed. *Depending on network conditions, this could take a minute or more - during which, because of Unity's scheduling mechanisms, nothing will appear in the console.* +Press the Play button. The first time you do so after installation, C4U will notice that you have not yet installed the JavaScript build tools from the package. It will copy them across, and also run an `npm install` that fetches all Croquet and other dependencies that are needed. *As noted above, depending on network conditions this could take a few minutes - during which, because of Unity's scheduling mechanisms, nothing will appear in the console.* In addition to the tools installation, because `Build JS on Play` is set C4U will run a full webpack build of the JavaScript code - eventually adding webpack's output to the console, each line prefixed with "JS builder". The first build of the game will take the longest; on subsequent runs the build process will be faster. @@ -114,7 +114,7 @@ On both MacOS and Windows, you can choose to use an external browser such as Chr In the Guardians scene (while play is stopped), select the `Croquet` object in the scene hierarchy, then in that object's `Croquet Runner` component select the **Debug Using External Session** checkbox. -Now whenever you press play, the console output will include a line of the form "ready for browser to load from http://localhost:...". Copy that address (if you click on the line, it will appear as selectable text in the view below the console) then use it to launch a new browser tab. This should complete the startup of the app. All the JS developer tools (console, breakpoints etc) offered by the browser are available for working with the code. +With this option set, whenever you start playing from that scene the Unity console will include a line of the form "ready for browser to load from http://localhost:...". Click on the line so that it appears in the text area below the console, and there click on the URL part to load it into your system's default browser. The loading of the URL will enable the app to continue. All the JS developer tools (console, breakpoints etc) offered by the browser are available for working with the code. When you stop play in the Unity editor, the browser tab will automatically leave the Croquet session. If you restart play, you will need to reload the tab to join the session again. @@ -125,11 +125,10 @@ The `Croquet Bridge` component's **JS Log Forwarding** property has checkboxes t Before building the app to deploy for a chosen platform (e.g., Windows or MacOS standalone, or iOS or Android), there are some settings that you need to pay attention to: * there must be an **Api Key** present in `CroquetSettings.asset` -* on `Croquet Bridge` the **Debug Force Scene Rebuild** checkbox _must_ be cleared * on `Croquet Runner` the **Debug Using External Session** checkbox _must_ be cleared * on `Croquet Runner` the **Force To Use Node JS** checkbox _must_ be cleared for anything other than a Windows build * on `Croquet Runner` the **Run Offline** checkbox _must_ be cleared -* ensuring that all checkboxes are cleared under **Debug Logging Flags** and **JS Log Forwarding** will reduce possibly resource-hungry logging +* on `Croquet Bridge`, ensuring that all checkboxes are cleared under **Croquet Debug Logging** and **JS Log Forwarding** will reduce possibly resource-hungry logging Hit **Build**! If any of the obligatory conditions listed above are not met, the build will be halted. Fix the conditions and try again. diff --git a/unity/Assets/Scenes/Guardians.unity b/unity/Assets/Scenes/Guardians.unity index 9490053..7952b9c 100644 --- a/unity/Assets/Scenes/Guardians.unity +++ b/unity/Assets/Scenes/Guardians.unity @@ -316,6 +316,62 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 89128820} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &127994054 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 3475047936742257374, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + m_PrefabInstance: {fileID: 1711147094} + m_PrefabAsset: {fileID: 0} +--- !u!114 &127994058 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127994054} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 28b46b536afa74ea5aacf53a0241e66c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &127994059 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127994054} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7913adbd782fa42ceb85aef558596f54, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &127994060 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127994054} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e126d841f13fa49678dac14addec6e6e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &127994061 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127994054} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 102e0a86589084572930d87fc4be9b31, type: 3} + m_Name: + m_EditorClassIdentifier: + assetManifestString: + addressablesReady: 0 --- !u!1 &150207625 GameObject: m_ObjectHideFlags: 0 @@ -1743,151 +1799,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1003224077 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1003224085} - - component: {fileID: 1003224084} - - component: {fileID: 1003224083} - - component: {fileID: 1003224082} - - component: {fileID: 1003224081} - - component: {fileID: 1003224080} - - component: {fileID: 1003224078} - m_Layer: 0 - m_Name: Croquet - m_TagString: Bridge - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1003224078 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1003224077} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 28b46b536afa74ea5aacf53a0241e66c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1003224080 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1003224077} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7913adbd782fa42ceb85aef558596f54, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1003224081 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1003224077} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e126d841f13fa49678dac14addec6e6e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1003224082 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1003224077} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 102e0a86589084572930d87fc4be9b31, type: 3} - m_Name: - m_EditorClassIdentifier: - assetManifestString: - addressablesReady: 0 ---- !u!114 &1003224083 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1003224077} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9c98cc1d7bc374101816379b2a2ac02e, type: 3} - m_Name: - m_EditorClassIdentifier: - waitForUserLaunch: 0 - forceToUseNodeJS: 0 - runOffline: 0 - localReflector: - showWebview: 0 ---- !u!114 &1003224084 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1003224077} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 21fd7bd096a814120ab634e6ff8be7b0, type: 3} - m_Name: - m_EditorClassIdentifier: - appProperties: {fileID: 11400000, guid: 0cbbfb66f6f8147d48f8ae2dbf5c8047, type: 2} - appName: guardians - defaultSessionName: 123 - launchViaMenuIntoScene: - debugForceSceneRebuild: 0 - croquetDebugLogging: - session: 0 - messages: 0 - sends: 0 - snapshot: 0 - data: 0 - hashing: 0 - subscribe: 0 - classes: 0 - ticks: 0 - JSLogForwarding: - log: 0 - warn: 1 - error: 1 - croquetSessionState: stopped - sessionName: - croquetViewId: - croquetViewCount: 0 - croquetActiveScene: - croquetActiveSceneState: - unitySceneState: preparing - triggerGlitchNow: 0 - glitchDuration: 3 - croquetSystems: [] ---- !u!4 &1003224085 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1003224077} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1024489370 GameObject: m_ObjectHideFlags: 0 @@ -3326,6 +3237,96 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1640116312} m_CullTransparentMesh: 1 +--- !u!1001 &1711147094 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3475047936742257374, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_Name + value: Croquet + objectReference: {fileID: 0} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: appName + value: guardians + objectReference: {fileID: 0} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: appProperties + value: + objectReference: {fileID: 11400000, guid: 0cbbfb66f6f8147d48f8ae2dbf5c8047, + type: 2} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: defaultSessionName + value: 123 + objectReference: {fileID: 0} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: debugForceSceneRebuild + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1e816dfed6d2248eba7d62bdd192bdb9, type: 3} --- !u!1 &1727382988 GameObject: m_ObjectHideFlags: 0 diff --git a/unity/Assets/Scenes/SessionChooser.unity b/unity/Assets/Scenes/SessionChooser.unity index 1856605..65341c7 100644 --- a/unity/Assets/Scenes/SessionChooser.unity +++ b/unity/Assets/Scenes/SessionChooser.unity @@ -124,151 +124,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &17056693 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 17056700} - - component: {fileID: 17056699} - - component: {fileID: 17056698} - - component: {fileID: 17056697} - - component: {fileID: 17056696} - - component: {fileID: 17056695} - - component: {fileID: 17056694} - m_Layer: 0 - m_Name: Croquet - m_TagString: Bridge - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &17056694 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 17056693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 28b46b536afa74ea5aacf53a0241e66c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &17056695 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 17056693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7913adbd782fa42ceb85aef558596f54, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &17056696 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 17056693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e126d841f13fa49678dac14addec6e6e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &17056697 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 17056693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 102e0a86589084572930d87fc4be9b31, type: 3} - m_Name: - m_EditorClassIdentifier: - assetManifestString: - addressablesReady: 0 ---- !u!114 &17056698 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 17056693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9c98cc1d7bc374101816379b2a2ac02e, type: 3} - m_Name: - m_EditorClassIdentifier: - waitForUserLaunch: 0 - runOffline: 0 - localReflector: - showWebview: 0 ---- !u!114 &17056699 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 17056693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 21fd7bd096a814120ab634e6ff8be7b0, type: 3} - m_Name: - m_EditorClassIdentifier: - appProperties: {fileID: 11400000, guid: 0cbbfb66f6f8147d48f8ae2dbf5c8047, type: 2} - useNodeJS: 0 - appName: guardians - defaultSessionName: 123 - launchViaMenuIntoScene: Guardians - debugForceSceneRebuild: 0 - croquetDebugLogging: - session: 0 - messages: 0 - sends: 0 - snapshot: 0 - data: 0 - hashing: 0 - subscribe: 0 - classes: 0 - ticks: 0 - JSLogForwarding: - log: 0 - warn: 1 - error: 1 - croquetSessionState: stopped - sessionName: - croquetViewId: - croquetViewCount: 0 - croquetActiveScene: - croquetActiveSceneState: - unitySceneState: preparing - triggerGlitchNow: 0 - glitchDuration: 3 - croquetSystems: [] ---- !u!4 &17056700 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 17056693} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &68712964 PrefabInstance: m_ObjectHideFlags: 0 @@ -1169,7 +1024,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &239549709 PrefabInstance: @@ -1341,6 +1196,157 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 842127925} m_CullTransparentMesh: 1 +--- !u!1001 &1305840559 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2948036424827437046, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3475047936742257374, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: m_Name + value: Croquet + objectReference: {fileID: 0} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: appName + value: guardians + objectReference: {fileID: 0} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: appProperties + value: + objectReference: {fileID: 11400000, guid: 0cbbfb66f6f8147d48f8ae2dbf5c8047, + type: 2} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: defaultSessionName + value: 123 + objectReference: {fileID: 0} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: debugForceSceneRebuild + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3479632283134871797, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + propertyPath: launchViaMenuIntoScene + value: Guardians + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1e816dfed6d2248eba7d62bdd192bdb9, type: 3} +--- !u!1 &1305840560 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 3475047936742257374, guid: 1e816dfed6d2248eba7d62bdd192bdb9, + type: 3} + m_PrefabInstance: {fileID: 1305840559} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1305840561 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1305840560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 28b46b536afa74ea5aacf53a0241e66c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1305840562 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1305840560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7913adbd782fa42ceb85aef558596f54, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1305840563 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1305840560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e126d841f13fa49678dac14addec6e6e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1305840564 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1305840560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 102e0a86589084572930d87fc4be9b31, type: 3} + m_Name: + m_EditorClassIdentifier: + assetManifestString: + addressablesReady: 0 --- !u!1 &1947875638 GameObject: m_ObjectHideFlags: 0 @@ -1387,7 +1393,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1947875642 MonoBehaviour: diff --git a/unity/Assets/Scripts/RaiseAlignToTerrain.cs b/unity/Assets/Scripts/RaiseAlignToTerrain.cs index 7c22a9f..0a6fc68 100644 --- a/unity/Assets/Scripts/RaiseAlignToTerrain.cs +++ b/unity/Assets/Scripts/RaiseAlignToTerrain.cs @@ -7,24 +7,24 @@ /// public class RaiseAlignToTerrain : MonoBehaviour { - + public bool objectIsStatic = false; [HeaderAttribute("Raising")] public bool raiseToTerrainHeight = true; public float fixedExtraRaise = 0.0f; public float randomRaiseLower = 0.0f; - - [HeaderAttribute("Alignment")] + + [HeaderAttribute("Alignment")] public bool alignToTerrain = true; public float alignmentStrengthNorm = 1.0f; - + private TerrainData terrainData; private Vector3 tPos; private float computedRaise; private CroquetSpatialComponent sc; private float radius; - + void Start() { var terrain = FindObjectOfType(); @@ -48,26 +48,26 @@ void Update() ? Croquet.ReadActorFloat(gameObject, "radius") : 0; } - + if (sc.hasBeenPlaced) { Align(); - + if (objectIsStatic) { // only need to run once Destroy(this); - } + } } } - + void Align() { if (!raiseToTerrainHeight && !alignToTerrain) { return; } - + Vector3 slopeNormal = terrainData.GetInterpolatedNormal((transform.position.x - tPos.x) / (terrainData.size.x), (transform.position.z - tPos.z) / (terrainData.size.z)); @@ -95,7 +95,7 @@ void Align() if (objectIsStatic) { - string croquetHandle = gameObject.GetComponent().croquetHandle; + int croquetHandle = gameObject.GetComponent().croquetHandle; CroquetSpatialSystem.Instance.SnapObjectTo(croquetHandle, transform.position, transform.rotation); } } diff --git a/unity/Assets/Scripts/RotateMe.cs b/unity/Assets/Scripts/RotateMe.cs index 9ac978b..78b60ee 100644 --- a/unity/Assets/Scripts/RotateMe.cs +++ b/unity/Assets/Scripts/RotateMe.cs @@ -7,8 +7,8 @@ public class RotateMe : MonoBehaviour, ICroquetDriven { public Vector3 axis = Vector3.up; public float speed = Mathf.Floor(Mathf.Rad2Deg); // degrees per second - private string croquetHandle; - + private int croquetHandle; + public void PawnInitializationComplete() { croquetHandle = gameObject.GetComponent().croquetHandle; diff --git a/unity/Assets/Scripts/moveAround.cs b/unity/Assets/Scripts/moveAround.cs index 5b28ba8..214b66f 100644 --- a/unity/Assets/Scripts/moveAround.cs +++ b/unity/Assets/Scripts/moveAround.cs @@ -14,7 +14,7 @@ public class moveAround : MonoBehaviour, ICroquetDriven // private float boostSpeed; // private float computedSpeed; - private string croquetHandle; + private int croquetHandle; private CroquetAvatarComponent avatarComponent; private GameState gameState; @@ -115,7 +115,7 @@ void CheckForMissileLaunch(float speed) Vector3 pos = (speed * 0.05f + 2.0f) * transform.forward + transform.position; // position in 50ms' time float[] args = { pos.x, pos.y, pos.z, yaw }; Croquet.Say(gameObject, "shoot", args); - + shotSound.PlayOneShot(shotSound.clip); } } diff --git a/unity/Packages/manifest.json b/unity/Packages/manifest.json index d10c072..7572c55 100644 --- a/unity/Packages/manifest.json +++ b/unity/Packages/manifest.json @@ -15,7 +15,7 @@ "com.unity.toolchain.macos-arm64-linux-x86_64": "1.0.1", "com.unity.ugui": "1.0.0", "com.unity.visualscripting": "1.8.0", - "io.croquet.multiplayer": "https://github.com/croquet/croquet-for-unity-package.git#v0.8.6", + "io.croquet.multiplayer": "https://github.com/croquet/croquet-for-unity-package.git#v0.9.0", "net.gree.unity-webview": "https://github.com/gree/unity-webview.git?path=/dist/package-nofragment", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", diff --git a/unity/Packages/packages-lock.json b/unity/Packages/packages-lock.json index 357905d..1b5f99c 100644 --- a/unity/Packages/packages-lock.json +++ b/unity/Packages/packages-lock.json @@ -215,14 +215,14 @@ "url": "https://packages.unity.com" }, "io.croquet.multiplayer": { - "version": "https://github.com/croquet/croquet-for-unity-package.git#v0.8.6", + "version": "https://github.com/croquet/croquet-for-unity-package.git#v0.9.0", "depth": 0, "source": "git", "dependencies": { "com.unity.addressables": "1.19.19", "com.unity.inputsystem": "1.5.0" }, - "hash": "f94fd316d339901024fd83a3d3e06617c29a58e0" + "hash": "9bddf70f2e43a0ef777ac04e8fcf6a15bfcc322e" }, "net.gree.unity-webview": { "version": "https://github.com/gree/unity-webview.git?path=/dist/package-nofragment", diff --git a/unity/ProjectSettings/ProjectSettings.asset b/unity/ProjectSettings/ProjectSettings.asset index 0c6bee4..830da6c 100644 --- a/unity/ProjectSettings/ProjectSettings.asset +++ b/unity/ProjectSettings/ProjectSettings.asset @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 1.2 + bundleVersion: 1.3 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0