fix: Examples colliders and missing namespace. (#3881)

* fix: Example scene and prefab colliders fixed.

No idea what happened, but some box colliders seem to be double the default size.

* Namespace to couch coop scripts.
This commit is contained in:
JesusLuvsYooh 2024-08-02 11:57:56 +01:00 committed by GitHub
parent b409245946
commit 5b7da43d5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 113 additions and 107 deletions

View File

@ -165,7 +165,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &34377706
MeshRenderer:
@ -258,7 +258,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &80415369
MeshRenderer:
@ -497,7 +497,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &121552836
MeshRenderer:
@ -642,7 +642,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &388677688
MeshRenderer:
@ -792,7 +792,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &446496355
MeshRenderer:
@ -928,7 +928,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &498523325
MeshRenderer:
@ -1183,7 +1183,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &738449928
MeshRenderer:
@ -1319,7 +1319,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &828682888
MeshRenderer:
@ -1412,7 +1412,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &898358223
MeshRenderer:
@ -1697,7 +1697,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1179387014
MeshRenderer:
@ -1829,7 +1829,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1218169083
MeshRenderer:
@ -1922,7 +1922,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1263590062
MeshRenderer:
@ -2091,7 +2091,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1284513254
MeshRenderer:
@ -2565,7 +2565,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1648326111
MeshRenderer:
@ -3174,7 +3174,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &2105958124
MeshRenderer:

View File

@ -1,8 +1,10 @@
using UnityEngine;
using Mirror;
public class MovingPlatform : NetworkBehaviour
namespace Mirror.Examples.CouchCoop
{
public class MovingPlatform : NetworkBehaviour
{
public Transform endTarget;
public float moveSpeed = 0.5f;
// allows for on demand syncing of stopping and starting platform movement, change via server
@ -73,4 +75,5 @@ private void OnCollisionExit(Collision collision)
}
}
}
}
}

View File

@ -1,8 +1,10 @@
using UnityEngine;
using Mirror;
public class PlatformMovement : NetworkBehaviour
namespace Mirror.Examples.CouchCoop
{
public class PlatformMovement : NetworkBehaviour
{
// A separate script to handle platform behaviour, see its partner script, MovingPlatform.cs
private bool onPlatform;
private Transform platformTransform;
@ -43,4 +45,5 @@ private void OnCollisionExit(Collision collision)
platformTransform = null;
}
}
}
}

View File

@ -539,7 +539,7 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 2, z: 2}
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0.5, z: -0.1}
--- !u!114 &4118329204170882586
MonoBehaviour: