commit 6ce9f0c1e7ac24c2cada93a28e7ec0dba2002935 parent 004262146d03c1f079c7c195b4de259d0f08650b Author: PlutoTank <qwolkensperg@gmail.com> Date: Thu, 23 Apr 2020 11:09:20 -0400 Bug Fixing and testing of orbitals Diffstat:
17 files changed, 732 insertions(+), 71 deletions(-)
diff --git a/Assets/Prefabs/Slimes/Slime.prefab b/Assets/Prefabs/Slimes/Slime.prefab @@ -1137,7 +1137,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: orbitals: - - owner: {fileID: 1531394410883810673} + - controlOwner: {fileID: 1531394410883810673} orbital: {fileID: 2311679785310360297, guid: 4e346bd7fa8310847b295522d78bb540, type: 3} orbitalLogic: {fileID: 11400000, guid: e77fb33472e993c4fbd1004f42fc4ed2, type: 2} @@ -1146,9 +1146,6 @@ MonoBehaviour: xAxis: 2.5 yAxis: 2.5 sticky: 0 - dropLayer: - serializedVersion: 2 - m_Bits: 1 --- !u!114 &1450437300 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Swords/TesterSword1.prefab b/Assets/Prefabs/Swords/TesterSword1.prefab @@ -124,7 +124,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c493037ae95819d4fa0c1961a904570a, type: 3} m_Name: m_EditorClassIdentifier: - rigidbody: {fileID: 2364959692505286347} + dropLayer: + serializedVersion: 2 + m_Bits: 1 + rb: {fileID: 2364959692505286347} --- !u!1 &2311745251963663901 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Slimecing/Characters/CharacterMovementController.cs b/Assets/Scripts/Slimecing/Characters/CharacterMovementController.cs @@ -1,5 +1,6 @@ using System; using Slimecing.SimpleComponents.Movement; +using Slimecing.TestScripts; using UnityEngine; namespace Slimecing.Characters diff --git a/Assets/Scripts/Slimecing/Swords/DropBehaviour/DropBehaviours/RigidbodyDropLogic.cs b/Assets/Scripts/Slimecing/Swords/DropBehaviour/DropBehaviours/RigidbodyDropLogic.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using Slimecing.Swords.Orbitals; +using UnityEngine; namespace Slimecing.Swords.DropBehaviour.DropBehaviours { @@ -8,6 +9,7 @@ namespace Slimecing.Swords.DropBehaviour.DropBehaviours public override void Drop() { + base.Drop(); if (rb.isKinematic) { rb.isKinematic = false; diff --git a/Assets/Scripts/Slimecing/Swords/DropBehaviour/DropLogic.cs b/Assets/Scripts/Slimecing/Swords/DropBehaviour/DropLogic.cs @@ -4,6 +4,11 @@ namespace Slimecing.Swords.DropBehaviour { public abstract class DropLogic : MonoBehaviour { - public abstract void Drop(); + [SerializeField] private LayerMask dropLayer; + + public virtual void Drop() + { + gameObject.layer = dropLayer; + } } } diff --git a/Assets/Scripts/Slimecing/Swords/Orbitals/IControllableOrbital.cs.meta b/Assets/Scripts/Slimecing/Swords/Orbitals/IControllableOrbital.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 86fe0342a1681784987b59f67c6b7a4d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Slimecing/Swords/Orbitals/Orbital.cs b/Assets/Scripts/Slimecing/Swords/Orbitals/Orbital.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using Slimecing.Dependency; using Slimecing.Swords.DropBehaviour; -using UnityEditor; using UnityEngine; namespace Slimecing.Swords.Orbitals @@ -11,7 +10,7 @@ namespace Slimecing.Swords.Orbitals public class Orbital { - [SerializeField] private GameObject owner; + [SerializeField] private GameObject controlOwner; [SerializeField] private GameObject orbital; [SerializeField] private OrbitalLogic orbitalLogic; [SerializeField] private float orbitalSpeed; @@ -19,18 +18,31 @@ namespace Slimecing.Swords.Orbitals [SerializeField] private float xAxis; [SerializeField] private float yAxis; [SerializeField] private bool sticky; - [SerializeField] private LayerMask dropLayer; + [SerializeField] private bool instantiateOnSpawn = true; private List<Collider> _ignoredCollisions; - private bool _hasDropBehaviour; - private GameObject _cachedOwner; + private GameObject _cachedControlOwner; private GameObject _cachedOrbital; private OrbitalLogic _cachedOrbitalLogic; public Collider orbitalCollider { get; private set; } public Collider ownerCollider { get; private set; } public float orbitalProgress { get; set; } public Ellipse orbitPath { get; set; } + public GameObject ownerObject { get; set; } + + public GameObject orbitalObject + { + get => orbital; + set => orbital = value; + } + + public OrbitalLogic currentOrbitalLogic + { + get => orbitalLogic; + set => orbitalLogic = value; + } + public float rotationSpeed { get => orbitalSpeed; @@ -54,29 +66,23 @@ namespace Slimecing.Swords.Orbitals get => yAxis; set => yAxis = value; } + + public GameObject ownerControlObject + { + get => controlOwner; + set => controlOwner = value; + } public bool orbitalSticky { get => sticky; set => sticky = value; } - - public GameObject ownerObject - { - get => owner; - set => owner = value; - } - - public GameObject orbitalObject - { - get => orbital; - set => orbital = value; - } - - public OrbitalLogic currentOrbitalLogic + + public bool instantiateOrbital { - get => orbitalLogic; - set => orbitalLogic = value; + get => instantiateOnSpawn; + set => instantiateOnSpawn = value; } public Orbital() @@ -84,10 +90,11 @@ namespace Slimecing.Swords.Orbitals orbitPath = new Ellipse(radiusX, radiusY); } - public Orbital(GameObject owner, GameObject orbital, OrbitalLogic orbitalLogic, float orbitalSpeed, - float yOffset, float xAxis, float yAxis, bool sticky) + public Orbital(GameObject ownerObject, GameObject controlOwner, GameObject orbital, OrbitalLogic orbitalLogic, + float orbitalSpeed, float yOffset, float xAxis, float yAxis, bool sticky) { - this.owner = owner; + this.ownerObject = ownerObject; + this.controlOwner = controlOwner; this.orbital = orbital; this.orbitalLogic = orbitalLogic; this.orbitalSpeed = orbitalSpeed; @@ -98,19 +105,20 @@ namespace Slimecing.Swords.Orbitals orbitPath = new Ellipse(radiusX, radiusY); } - public void Initialize() + public void Initialize(GameObject realOwner) { orbitPath = new Ellipse(radiusX, radiusY); + ownerObject = realOwner; InitializeOrbitalObject(); InitializeOrbitalLogic(); } private void InitializeOrbitalObject() { - SetCollider(); - if (orbitalObject.GetComponent<DropLogic>() != null) _hasDropBehaviour = true; _cachedOrbital = orbitalObject; - _cachedOwner = ownerObject; + _cachedControlOwner = ownerControlObject; + if (currentOrbitalLogic is IControllableOrbital logic) logic.ChangeController(_cachedControlOwner); + SetCollider(); } private void InitializeOrbitalLogic() @@ -123,8 +131,8 @@ namespace Slimecing.Swords.Orbitals private void SetCollider() { orbitalCollider = orbital.gameObject.GetComponent<Collider>(); - ownerCollider = owner.gameObject.GetComponent<Collider>(); - if (ownerCollider == null || orbitalCollider == null) return; + ownerCollider = ownerObject.gameObject.GetComponent<Collider>(); + if (orbitalCollider == null || ownerCollider == null) return; SetIgnoreCollisions(ownerCollider); } @@ -153,7 +161,7 @@ namespace Slimecing.Swords.Orbitals public bool Validate() { bool isValid = true; - if (_cachedOrbital != orbitalObject || _cachedOwner != ownerObject) + if (_cachedOrbital != orbitalObject || _cachedControlOwner != ownerObject) { DisableOrbital(); InitializeOrbitalObject(); @@ -172,16 +180,20 @@ namespace Slimecing.Swords.Orbitals public void DisableOrbital() { if (_cachedOrbital == null) return; - _cachedOrbital.layer = dropLayer; foreach (var col in _ignoredCollisions) { Physics.IgnoreCollision(orbitalCollider, col,false); } - - if (_hasDropBehaviour) + + if (HasComponent<DropLogic>(_cachedOrbital)) { _cachedOrbital.GetComponent<DropLogic>().Drop(); } } + + public static bool HasComponent<T>(GameObject obj) where T:Component + { + return obj.GetComponent<T>() != null; + } } } diff --git a/Assets/Scripts/Slimecing/Swords/Orbitals/OrbitalLogicScripts/InputOrbitalLogic.cs b/Assets/Scripts/Slimecing/Swords/Orbitals/OrbitalLogicScripts/InputOrbitalLogic.cs @@ -5,7 +5,7 @@ using UnityEngine.InputSystem; namespace Slimecing.Swords.Orbitals.OrbitalLogicScripts { [CreateAssetMenu(fileName = "InputOrbitalLogic", menuName = "Swords/Orbitals/OrbitalLogic/InputOrbitalLogic")] - public class InputOrbitalLogic : OrbitalLogic, IOrbitalTickEveryFrame + public class InputOrbitalLogic : OrbitalLogic, IOrbitalTickEveryFrame, IControllableOrbital { [SerializeField] private Trigger orbitalInputTrigger; @@ -20,7 +20,7 @@ namespace Slimecing.Swords.Orbitals.OrbitalLogicScripts { runtimeOrbitalInputTrigger = orbitalInputTrigger.GetTrigger(); GetInput(orbital, Vector2.up); - runtimeOrbitalInputTrigger.EnableTrigger(orbital.ownerObject); + runtimeOrbitalInputTrigger.EnableTrigger(orbital.ownerControlObject); } public override void Tick(Orbital orbital) @@ -78,5 +78,11 @@ namespace Slimecing.Swords.Orbitals.OrbitalLogicScripts } GetInput(orbital, action.ReadValue<Vector2>()); } + + public void ChangeController(GameObject controller) + { + if (runtimeOrbitalInputTrigger == null) return; + runtimeOrbitalInputTrigger.EnableTrigger(controller); + } } } \ No newline at end of file diff --git a/Assets/Scripts/Slimecing/Swords/Orbitals/OrbitalLogicScripts/TimerOrbitalLogic.cs b/Assets/Scripts/Slimecing/Swords/Orbitals/OrbitalLogicScripts/TimerOrbitalLogic.cs @@ -1,8 +1,4 @@ -using System; -using Slimecing.Dependency; -using Slimecing.Triggers; -using Slimecing.Triggers.TriggerLogic; -using UnityEngine; +using UnityEngine; using Random = UnityEngine.Random; namespace Slimecing.Swords.Orbitals.OrbitalLogicScripts diff --git a/Assets/Scripts/Slimecing/Swords/Orbitals/TakesOrbitals.cs b/Assets/Scripts/Slimecing/Swords/Orbitals/TakesOrbitals.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -20,8 +18,12 @@ namespace Slimecing.Swords.Orbitals var thisTransform = transform; foreach (var orbital in orbitals) { - orbital.orbitalObject = Instantiate(orbital.orbitalObject, thisTransform.position, - Quaternion.identity); + if (orbital.instantiateOrbital) + { + orbital.orbitalObject = Instantiate(orbital.orbitalObject, thisTransform.position, + Quaternion.identity); + } + InitializeCurrentOrbital(orbital); } } @@ -41,7 +43,7 @@ namespace Slimecing.Swords.Orbitals private void InitializeCurrentOrbital(Orbital orbital) { - orbital.Initialize(); + orbital.Initialize(gameObject); SetCollisions(orbital); } @@ -66,6 +68,20 @@ namespace Slimecing.Swords.Orbitals orbitals.Remove(orbital); } + public Orbital GetOrbital(GameObject orbital) + { + Orbital orbitalToReturn = null; + foreach (var o in orbitals) + { + if (o.orbitalObject.Equals(orbital)) + { + orbitalToReturn = o; + } + } + + return orbitalToReturn; + } + public void Update() { foreach (var orbital in orbitals) diff --git a/Assets/Scripts/Slimecing/TestScripts/CheckPlayerCollisionExtensionMethod.cs.meta b/Assets/Scripts/Slimecing/TestScripts/CheckPlayerCollisionExtensionMethod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01b2e33f199fa544884d3c1917ee7fd8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Slimecing/TestScripts/OrbitalInputChangerSwitch.cs.meta b/Assets/Scripts/Slimecing/TestScripts/OrbitalInputChangerSwitch.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c5856619c3c6bf44a9ffbe5e50ad9b7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SlimecingAssets/Materials/green.mat b/Assets/SlimecingAssets/Materials/green.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: green + 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.30411178, g: 0.9622642, b: 0.36788532, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/SlimecingAssets/Materials/green.mat.meta b/Assets/SlimecingAssets/Materials/green.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7abf1f7062475ea4598904eb5a57ebf3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scenes/Testing/SLope.unity b/Assets/_Scenes/Testing/SLope.unity @@ -1981,6 +1981,113 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 767125011} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &771799240 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 771799245} + - component: {fileID: 771799244} + - component: {fileID: 771799243} + - component: {fileID: 771799242} + - component: {fileID: 771799241} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &771799241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 771799240} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6c5856619c3c6bf44a9ffbe5e50ad9b7, type: 3} + m_Name: + m_EditorClassIdentifier: + onCollisionEvent: {fileID: 11400000, guid: 6900e96419897bb45a5ea790f7790d84, type: 2} +--- !u!65 &771799242 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 771799240} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &771799243 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 771799240} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 29b59119d7050884993013795f09fad7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &771799244 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 771799240} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &771799245 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 771799240} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -74.7, y: -15.41, z: 13.83} + 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 &829847528 GameObject: m_ObjectHideFlags: 0 @@ -2421,16 +2528,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2364959692505286347, guid: 4e346bd7fa8310847b295522d78bb540, - type: 3} - propertyPath: m_IsKinematic - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2364959692505286347, guid: 4e346bd7fa8310847b295522d78bb540, - type: 3} - propertyPath: m_UseGravity - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4e346bd7fa8310847b295522d78bb540, type: 3} --- !u!1 &1087962991 @@ -2822,6 +2919,123 @@ Transform: m_Father: {fileID: 1651529366} m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1244540587 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1244540592} + - component: {fileID: 1244540591} + - component: {fileID: 1244540590} + - component: {fileID: 1244540589} + - component: {fileID: 1244540588} + m_Layer: 0 + m_Name: OrbitPoint + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1244540588 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1244540587} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f7780a3c04e17841825f68a82642af4, type: 3} + m_Name: + m_EditorClassIdentifier: + orbitals: + - controlOwner: {fileID: 1244540587} + orbital: {fileID: 1469247986} + orbitalLogic: {fileID: 11400000, guid: f604a09f73d9b3e4a8d515810e94c6d9, type: 2} + orbitalSpeed: 5 + yOffset: 1 + xAxis: 10 + yAxis: 10 + sticky: 0 + instantiateOnSpawn: 0 +--- !u!135 &1244540589 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1244540587} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1244540590 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1244540587} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1244540591 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1244540587} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1244540592 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1244540587} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -70.37, y: -15.89, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1469247990} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1307121287 GameObject: m_ObjectHideFlags: 0 @@ -3115,17 +3329,15 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: orbitals: - - owner: {fileID: 1383329372} + - controlOwner: {fileID: 1383329372} orbital: {fileID: 621488908} orbitalLogic: {fileID: 11400000, guid: f604a09f73d9b3e4a8d515810e94c6d9, type: 2} orbitalSpeed: 10 yOffset: 1 xAxis: 3 yAxis: 3 - sticky: 0 - dropLayer: - serializedVersion: 2 - m_Bits: 1 + sticky: 1 + instantiateOnSpawn: 1 --- !u!1 &1384512436 GameObject: m_ObjectHideFlags: 0 @@ -3219,6 +3431,188 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1384512436} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1469247986 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1469247990} + - component: {fileID: 1469247989} + - component: {fileID: 1469247988} + - component: {fileID: 1469247987} + - component: {fileID: 1469247994} + - component: {fileID: 1469247991} + - component: {fileID: 1469247992} + - component: {fileID: 1469247993} + m_Layer: 0 + m_Name: Cube (36) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1469247987 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469247986} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1469247988 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469247986} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d0bb19cad963bad4095d65f8bb48c07e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1469247989 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469247986} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1469247990 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469247986} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 10.110001, y: 0.710001, z: 0.6} + m_LocalScale: {x: 6.499345, y: 0.54524815, z: 16.497879} + m_Children: [] + m_Father: {fileID: 1244540592} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1469247991 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469247986} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f1329b9d578ad4d9b8d6d5d290f667, type: 3} + m_Name: + m_EditorClassIdentifier: + ownerOfThisOrbital: {fileID: 1244540588} + orbitalLogicToSetTo: {fileID: 11400000, guid: e77fb33472e993c4fbd1004f42fc4ed2, + type: 2} +--- !u!114 &1469247992 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469247986} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f7862acd69d43259782a7a9472c703f, type: 3} + m_Name: + m_EditorClassIdentifier: + gameEvent: {fileID: 11400000, guid: fdc607aa50c05f348bc9b3893c862523, type: 2} + unityEventResponse: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1469247991} + m_MethodName: SetOwnerOfThisOrbital + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1469247993 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469247986} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f7862acd69d43259782a7a9472c703f, type: 3} + m_Name: + m_EditorClassIdentifier: + gameEvent: {fileID: 11400000, guid: 6900e96419897bb45a5ea790f7790d84, type: 2} + unityEventResponse: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1469247991} + m_MethodName: UnSetOwnerOfThisOrbital + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!54 &1469247994 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469247986} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 1 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!1 &1487538292 GameObject: m_ObjectHideFlags: 0 @@ -4238,6 +4632,113 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1735171566} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1881280637 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1881280642} + - component: {fileID: 1881280641} + - component: {fileID: 1881280640} + - component: {fileID: 1881280639} + - component: {fileID: 1881280638} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1881280638 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1881280637} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6c5856619c3c6bf44a9ffbe5e50ad9b7, type: 3} + m_Name: + m_EditorClassIdentifier: + onCollisionEvent: {fileID: 11400000, guid: fdc607aa50c05f348bc9b3893c862523, type: 2} +--- !u!65 &1881280639 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1881280637} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1881280640 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1881280637} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7abf1f7062475ea4598904eb5a57ebf3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1881280641 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1881280637} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1881280642 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1881280637} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -71.83395, y: -15.41, z: 13.83} + 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 &1891858504 GameObject: m_ObjectHideFlags: 0 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset @@ -5,7 +5,7 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - - enabled: 1 + - enabled: 0 path: Assets/_Scenes/Testing/TestScene.unity guid: 97f768ec7b33bd3459bfe4a6ab6dea4f - enabled: 0 @@ -26,6 +26,9 @@ EditorBuildSettings: - enabled: 0 path: Assets/_Scenes/Testing/IslandTest.unity guid: d3cd0c2911592794abea97aefa1d5cee + - enabled: 1 + path: Assets/_Scenes/Testing/SLope.unity + guid: 550dea25eebffe543823d4ae0a56ff77 m_configObjects: com.unity.input.settings: {fileID: 11400000, guid: ce1ba5e1a303b424ab184a808a473b43, type: 2} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset @@ -120,7 +120,8 @@ PlayerSettings: 16:9: 1 Others: 1 bundleVersion: 1.0 - preloadedAssets: [] + preloadedAssets: + - {fileID: 11400000, guid: ce1ba5e1a303b424ab184a808a473b43, type: 2} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1