diff --git a/Assets/Build.meta b/Assets/Build.meta new file mode 100644 index 00000000..b419a3bc --- /dev/null +++ b/Assets/Build.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f607a6da10617d4a967a6198c8ac2fa +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameData/MapAssets/TileInfo/Buildings/Defense/[PH] Turret.asset b/Assets/GameData/MapAssets/TileInfo/Buildings/Defense/[PH] Turret.asset index 75597962..94b642fd 100644 --- a/Assets/GameData/MapAssets/TileInfo/Buildings/Defense/[PH] Turret.asset +++ b/Assets/GameData/MapAssets/TileInfo/Buildings/Defense/[PH] Turret.asset @@ -41,7 +41,7 @@ MonoBehaviour: offshorePlatformMesh: {fileID: 0} icon: {fileID: 0} faction: 1 - maxHealth: 100 + maxHealth: 1000 healthBar: {fileID: 11400000, guid: 64264ba37fb009140b7237d68e6e4e60, type: 2} healthBarOffset: x: 0 diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 6dbcbd1d..4c6afcee 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -352,7 +352,7 @@ RectTransform: m_Children: - {fileID: 2033154686} m_Father: {fileID: 0} - m_RootOrder: 8 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -1914,7 +1914,7 @@ Transform: m_LocalScale: {x: 20, y: 50, z: 20} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &170076733 GameObject: @@ -2497,7 +2497,7 @@ Transform: m_Children: - {fileID: 574622351} m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &196126402 MonoBehaviour: @@ -5994,7 +5994,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 60, y: 0, z: 0} --- !u!114 &534669907 MonoBehaviour: @@ -6369,7 +6369,7 @@ RectTransform: - {fileID: 491449966} - {fileID: 1802015228} m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -6772,6 +6772,49 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 557116066} m_CullTransparentMesh: 0 +--- !u!1 &574144031 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 574144033} + - component: {fileID: 574144032} + m_Layer: 0 + m_Name: Steam + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &574144032 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 574144031} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ef4bffeda13d7a748973ff9204401c07, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &574144033 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 574144031} + m_LocalRotation: {x: 0, y: 0, z: 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 &574622350 GameObject: m_ObjectHideFlags: 0 @@ -6988,7 +7031,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 10 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &612722465 GameObject: @@ -8170,7 +8213,7 @@ RectTransform: - {fileID: 1551769501} - {fileID: 1723077716} m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -10040,7 +10083,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 9 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1040115290 GameObject: @@ -10931,7 +10974,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 11 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1189289495 GameObject: @@ -12424,7 +12467,6 @@ GameObject: - component: {fileID: 1369379225} - component: {fileID: 1369379227} - component: {fileID: 1369379226} - - component: {fileID: 1369379228} m_Layer: 8 m_Name: _GLOBAL m_TagString: Untagged @@ -12501,25 +12543,13 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: statusUI: {fileID: 53534244} - baseNameUI: {fileID: 0} - mainCamera: {fileID: 0} - cameraController: {fileID: 0} + baseNameUI: {fileID: 636739581} + mainCamera: {fileID: 534669904} + cameraController: {fileID: 534669909} tileDatabase: {fileID: 11400000, guid: f973b4e22fe4f24429859b2a7732f9b3, type: 2} unitDatabase: {fileID: 11400000, guid: 257b8032a7f89164fa7302037505cacf, type: 2} buildingDatabase: {fileID: 11400000, guid: 0916d0c03da4488419a09b66e76cac63, type: 2} rarityColors: {fileID: 11400000, guid: ae4d7de8b5bf37241b9237424a88b932, type: 2} ---- !u!114 &1369379228 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1369379222} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ef4bffeda13d7a748973ff9204401c07, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &1381702101 GameObject: m_ObjectHideFlags: 0 @@ -12866,7 +12896,7 @@ RectTransform: 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: -443.00003} + m_AnchoredPosition: {x: 0, y: -443} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} --- !u!114 &1427279150 @@ -17538,7 +17568,7 @@ RectTransform: m_Children: - {fileID: 1740703293} m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} diff --git a/Assets/Scenes/MainMenu.unity b/Assets/Scenes/MainMenu.unity index cb654ad9..aa70452b 100644 --- a/Assets/Scenes/MainMenu.unity +++ b/Assets/Scenes/MainMenu.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 19.842604, g: 75.43801, b: 151.95778, a: 1} + m_IndirectSpecularColor: {r: 19.842604, g: 75.43801, b: 151.91823, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -668,6 +668,49 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &379879225 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 379879227} + - component: {fileID: 379879226} + m_Layer: 0 + m_Name: Steam + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &379879226 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 379879225} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ef4bffeda13d7a748973ff9204401c07, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &379879227 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 379879225} + m_LocalRotation: {x: 0, y: 0, z: 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 &458254135 GameObject: m_ObjectHideFlags: 0 @@ -699,7 +742,7 @@ Transform: - {fileID: 583560981} - {fileID: 1805130590} m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &458254137 MonoBehaviour: @@ -1248,7 +1291,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -1807,7 +1850,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 60, y: 0, z: 0} --- !u!1 &1805130585 GameObject: diff --git a/Assets/Scripts/Effects/LineFactory.cs b/Assets/Scripts/Effects/LineFactory.cs index e7eca112..0eb364e7 100644 --- a/Assets/Scripts/Effects/LineFactory.cs +++ b/Assets/Scripts/Effects/LineFactory.cs @@ -51,10 +51,10 @@ public static void UpdateStaticLine(EntityCommandBuffer.Concurrent cmb, int inde cmb.SetComponent(index, e, new Rotation { Value = r }); } - public static (float3 translation, float3 scale, Quaternion rotation) PrepareLine(float3 a, float3 b, float thiccness) + public static (float3 translation, float3 scale, quaternion rotation) PrepareLine(float3 a, float3 b, float thiccness) { var dir = b - a; - return (a, new float3(thiccness, thiccness, Vector3.Magnitude(dir)), Quaternion.LookRotation(dir, Vector3.up)); + return (a, new float3(thiccness, thiccness, math.length(dir)), quaternion.LookRotationSafe(dir, math.up())); } } } \ No newline at end of file diff --git a/Assets/Scripts/Game Logic/Systems/Combat/PhosCoreSystem.cs b/Assets/Scripts/Game Logic/Systems/Combat/PhosCoreSystem.cs index 12d715d6..6ef78280 100644 --- a/Assets/Scripts/Game Logic/Systems/Combat/PhosCoreSystem.cs +++ b/Assets/Scripts/Game Logic/Systems/Combat/PhosCoreSystem.cs @@ -75,9 +75,9 @@ protected override void OnUpdate() private void SimulateAI() { - Entities.WithNone().ForEach((Entity e, ref PhosCore core, ref PhosCoreData data, ref Translation t, ref FactionId faction) => + Entities.WithNone().ForEach((Entity e, ref PhosCore core, ref PhosCoreData data, ref Translation t, ref FactionId faction) => { - var baseAngle = (((float)Time.ElapsedTime % core.spinRate) / core.spinRate) * (math.PI * 2); //Angle of the ring + var baseAngle = (((float)Time.ElapsedTime % core.spinRate) / core.spinRate) * (math.PI * 2); //Rotation of the ring PostUpdateCommands.SetComponent(data.ring, new Rotation { Value = quaternion.AxisAngle(Vector3.up, baseAngle + (math.PI * 2) / 12f) }); if (core.nextVolleyTime <= Time.ElapsedTime) { @@ -121,6 +121,8 @@ private void FireBurst(float3 startPos, float baseAngle, float3 target, PhosCore private void FirePorjectile(float3 startPos, float angle, float3 target, PhosCore core, double targetTime, FactionId team) { + if (target.Equals(0)) + return; var dir = math.rotate(quaternion.RotateY(angle), Vector3.forward); var pos = startPos + (dir * 2.9f) + new float3(0, 4, 0); dir.y = .4f; @@ -148,12 +150,15 @@ private struct PhosProjectileJob : IJobChunk //IJobForEachWithEntity projectileType; public ArchetypeChunkComponentType velocityType; [ReadOnly] public ArchetypeChunkComponentType translationType; + [ReadOnly] public ArchetypeChunkEntityType entityType; + public EntityCommandBuffer.Concurrent CMB; public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex) { var vel = chunk.GetNativeArray(velocityType); var proj = chunk.GetNativeArray(projectileType); var trans = chunk.GetNativeArray(translationType); + var entities = chunk.GetNativeArray(entityType); for (int i = 0; i < chunk.Count; i++) { if (curTime < proj[i].targetTime) @@ -161,11 +166,13 @@ public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex) var v = vel[i]; v.Linear = math.normalize(proj[i].target - trans[i].Value) * proj[i].flightSpeed; vel[i] = v; + CMB.RemoveComponent(chunkIndex, entities[i]); } } } private EntityQuery entityQuery; + private EndSimulationEntityCommandBufferSystem endSimulation; protected override void OnCreate() { @@ -185,6 +192,7 @@ protected override void OnCreate() } }; entityQuery = GetEntityQuery(desc); + endSimulation = World.GetOrCreateSystem(); } protected override JobHandle OnUpdate(JobHandle inputDeps) @@ -195,10 +203,10 @@ protected override JobHandle OnUpdate(JobHandle inputDeps) projectileType = GetArchetypeChunkComponentType(true), velocityType = GetArchetypeChunkComponentType(false), translationType = GetArchetypeChunkComponentType(true), + CMB = endSimulation.CreateCommandBuffer().ToConcurrent(), + entityType = GetArchetypeChunkEntityType() }; - ////inputDeps = job.Schedule(this, inputDeps); inputDeps = job.ScheduleParallel(entityQuery, inputDeps); - inputDeps.Complete(); return inputDeps; } } diff --git a/Assets/Scripts/Game Logic/Systems/Combat/ProjectileCollisionSystem.cs b/Assets/Scripts/Game Logic/Systems/Combat/ProjectileCollisionSystem.cs index b22c3331..2c790ca8 100644 --- a/Assets/Scripts/Game Logic/Systems/Combat/ProjectileCollisionSystem.cs +++ b/Assets/Scripts/Game Logic/Systems/Combat/ProjectileCollisionSystem.cs @@ -18,10 +18,10 @@ public struct ProjectileCollisionJob : ICollisionEventsJob public void Execute(CollisionEvent collisionEvent) { - if (damage.HasComponent(collisionEvent.Entities.EntityA)) - DealDamage(collisionEvent.Entities.EntityA, collisionEvent.Entities.EntityB); - else if (damage.HasComponent(collisionEvent.Entities.EntityB)) - DealDamage(collisionEvent.Entities.EntityB, collisionEvent.Entities.EntityA); + if (damage.HasComponent(collisionEvent.EntityA)) + DealDamage(collisionEvent.EntityA, collisionEvent.EntityB); + else if (damage.HasComponent(collisionEvent.EntityB)) + DealDamage(collisionEvent.EntityB, collisionEvent.EntityA); } private void DealDamage(Entity src, Entity tgt) diff --git a/Assets/Scripts/Game Logic/Systems/Combat/TurretSystem.cs b/Assets/Scripts/Game Logic/Systems/Combat/TurretSystem.cs index 93439730..af80b606 100644 --- a/Assets/Scripts/Game Logic/Systems/Combat/TurretSystem.cs +++ b/Assets/Scripts/Game Logic/Systems/Combat/TurretSystem.cs @@ -57,6 +57,12 @@ protected override void OnCreate() }; } + protected override void OnDestroy() + { + base.OnDestroy(); + _castHits.Dispose(); + } + protected override void OnUpdate() { if (!_isReady) @@ -75,9 +81,10 @@ protected override void OnUpdate() Entities.ForEach((Entity e, ref Turret t, ref Translation pos, ref AttackSpeed speed, ref AttackRange range, ref AttackTarget attackTarget) => { var r = EntityManager.GetComponentData(t.Head).Value; - var tgtPos = EntityManager.GetComponentData(attackTarget.Value); - var desR = quaternion.LookRotation(pos.Value - tgtPos.Value, math.up()); - desR = Quaternion.RotateTowards(r, desR, 10 * Time.DeltaTime); + var tgtPos = EntityManager.GetComponentData(attackTarget.Value).Value; + tgtPos.y = pos.Value.y; + var desR = quaternion.LookRotation(pos.Value - tgtPos, math.up()); + desR = Quaternion.RotateTowards(r, desR, 360 * Time.DeltaTime); EntityManager.SetComponentData(t.Head, new Rotation { Value = desR @@ -105,16 +112,17 @@ protected override void OnUpdate() Entities.ForEach((Entity e, ref Turret t, ref Translation pos, ref AttackSpeed speed, ref AttackRange range, ref AttackTarget attackTarget) => { var r = EntityManager.GetComponentData(t.Head).Value; - var tgtPos = EntityManager.GetComponentData(attackTarget.Value); - var dir = math.normalizesafe(pos.Value - tgtPos.Value); - var desR = quaternion.LookRotation(dir, math.up()); - if (!r.value.Equals(desR)) + var tgtPos = EntityManager.GetComponentData(attackTarget.Value).Value; + var dir = math.normalizesafe(pos.Value - tgtPos); + var flatDir = dir; + flatDir.y = 0; + var desR = quaternion.LookRotation(flatDir, math.up()); + if (r.value.Equals(desR.value)) return; if (Time.ElapsedTime < speed.NextAttackTime) return; speed.NextAttackTime += speed.Value; - - var b = _bullet.Instantiate(pos.Value + math.up() * 2, 0.5f, dir * 5); + var b = _bullet.Instantiate(pos.Value + math.up() * 2, 0.2f, -dir); PostUpdateCommands.AddComponent(b, new DeathTime { Value = Time.ElapsedTime + 5 }); }); } diff --git a/Assets/Scripts/Game Logic/UI/GameUI/GameUI.cs b/Assets/Scripts/Game Logic/UI/GameUI/GameUI.cs index aba9328d..28f208ba 100644 --- a/Assets/Scripts/Game Logic/UI/GameUI/GameUI.cs +++ b/Assets/Scripts/Game Logic/UI/GameUI/GameUI.cs @@ -102,7 +102,7 @@ private void Init() private void CategorySelected(BuildingCategory category) { _selectionPanel.Hide(); - _state = UIState.PlaceBuilding; + _prevState = _state = UIState.PlaceBuilding; _buildPanel.Show(category); } @@ -110,7 +110,7 @@ private void EnterDeconstructMode() { _buildPanel.Hide(); _categoryPanel.DeselectAll(); - _state = UIState.Deconstruct; + _prevState = _state = UIState.Deconstruct; _buildPanel.state = UIBuildPanel.BuildState.Deconstruct; } diff --git a/Assets/Scripts/Map/ECS/PhysicsMeshEntity.cs b/Assets/Scripts/Map/ECS/PhysicsMeshEntity.cs index 3f3264a1..e23d317d 100644 --- a/Assets/Scripts/Map/ECS/PhysicsMeshEntity.cs +++ b/Assets/Scripts/Map/ECS/PhysicsMeshEntity.cs @@ -77,7 +77,7 @@ public Entity BufferedInstantiate(EntityCommandBuffer commandBuffer, Vector3 pos Radius = colliderRadius, }, GetFilter(), new Unity.Physics.Material { - Flags = Unity.Physics.Material.MaterialFlags.EnableCollisionEvents + CollisionResponse = CollisionResponsePolicy.CollideRaiseCollisionEvents }) }; diff --git a/Assets/Scripts/Map/Generators/StructureGenerator.cs b/Assets/Scripts/Map/Generators/StructureGenerator.cs index 7bb893cb..ccd88db6 100644 --- a/Assets/Scripts/Map/Generators/StructureGenerator.cs +++ b/Assets/Scripts/Map/Generators/StructureGenerator.cs @@ -81,6 +81,6 @@ public void PlaceCrystal(Map map, HexCoords coords) if (origTile == null) return; map[coords] = phosCrystal.CreateTile(map, coords, origTile.Height); - map[coords].originalTile = origTile.info; + map[coords].originalTile = origTile.originalTile != null ? origTile.originalTile : origTile.info; } } \ No newline at end of file diff --git a/Assets/Scripts/Map/Tiles/TileInfo/TileEntity.cs b/Assets/Scripts/Map/Tiles/TileInfo/TileEntity.cs index ce265bb0..39c7af97 100644 --- a/Assets/Scripts/Map/Tiles/TileInfo/TileEntity.cs +++ b/Assets/Scripts/Map/Tiles/TileInfo/TileEntity.cs @@ -32,7 +32,6 @@ public override IEnumerable GetComponents() return base.GetComponents().Concat(new ComponentType[]{ typeof(HexPosition), typeof(PhysicsCollider), - typeof(PhysicsDebugDisplayData), }); } @@ -41,12 +40,8 @@ public override void PrepareDefaultComponentData(Entity entity) base.PrepareDefaultComponentData(entity); //Map.EM.SetComponentData(entity, new FactionId { Value = faction }); - Map.EM.SetComponentData(entity, new PhysicsDebugDisplayData - { - DrawColliders = 1 - }); var physMat = Unity.Physics.Material.Default; - physMat.Flags |= Unity.Physics.Material.MaterialFlags.EnableCollisionEvents; + physMat.CollisionResponse = CollisionResponsePolicy.CollideRaiseCollisionEvents; var colFilter = new CollisionFilter { CollidesWith = ~0u, diff --git a/Assets/Scripts/Map/Units/MobileUnitEntity.cs b/Assets/Scripts/Map/Units/MobileUnitEntity.cs index 6fecd006..95af5c3b 100644 --- a/Assets/Scripts/Map/Units/MobileUnitEntity.cs +++ b/Assets/Scripts/Map/Units/MobileUnitEntity.cs @@ -80,7 +80,7 @@ public Entity Instantiate(float3 pos, Quaternion rotation, int id, Faction facti }; var physMat = Unity.Physics.Material.Default; - physMat.Flags |= Unity.Physics.Material.MaterialFlags.EnableCollisionEvents; + physMat.CollisionResponse = CollisionResponsePolicy.CollideRaiseCollisionEvents; Map.EM.SetComponentData(e, new PhysicsCollider { diff --git a/Packages/manifest.json b/Packages/manifest.json index d8f16960..9bbba372 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -10,8 +10,8 @@ "com.unity.ide.visualstudio": "2.0.2", "com.unity.jobs": "0.2.9-preview.15", "com.unity.mathematics": "1.1.0", - "com.unity.physics": "0.3.2-preview", - "com.unity.platforms": "0.4.0-preview.3", + "com.unity.physics": "0.4.0-preview.5", + "com.unity.platforms": "0.5.0-preview.6", "com.unity.probuilder": "4.2.3", "com.unity.progrids": "3.0.3-preview.4", "com.unity.quicksearch": "1.5.4", @@ -54,6 +54,7 @@ "com.unity.modules.video": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", - "com.unity.modules.xr": "1.0.0" + "com.unity.modules.xr": "1.0.0", + "com.unity.platforms.windows": "0.5.0-preview.6" } } diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 07ee6150..ec61ba3a 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -47,7 +47,7 @@ }, "com.unity.collections": { "version": "0.9.0-preview.6", - "depth": 2, + "depth": 1, "source": "registry", "dependencies": { "com.unity.test-framework.performance": "2.0.8-preview", @@ -89,7 +89,7 @@ }, "com.unity.jobs": { "version": "0.2.10-preview.12", - "depth": 2, + "depth": 1, "source": "registry", "dependencies": { "com.unity.collections": "0.9.0-preview.6", @@ -121,32 +121,51 @@ "url": "https://packages.unity.com" }, "com.unity.physics": { - "version": "0.3.2-preview", + "version": "0.4.0-preview.5", "depth": 0, "source": "registry", "dependencies": { - "com.unity.burst": "1.3.0-preview.7", - "com.unity.collections": "0.7.1-preview.3", - "com.unity.entities": "0.9.0-preview.6", - "com.unity.jobs": "0.2.8-preview.3", + "com.unity.burst": "1.3.0", + "com.unity.collections": "0.9.0-preview.6", + "com.unity.entities": "0.11.1-preview.4", + "com.unity.jobs": "0.2.10-preview.12", "com.unity.mathematics": "1.1.0", "com.unity.test-framework": "1.1.11", - "com.unity.test-framework.performance": "1.3.3-preview", + "com.unity.test-framework.performance": "2.2.0-preview", "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" }, "url": "https://packages.unity.com" }, "com.unity.platforms": { - "version": "0.4.0-preview.3", + "version": "0.5.0-preview.6", "depth": 0, "source": "registry", "dependencies": { - "com.unity.properties": "1.2.0-preview", - "com.unity.properties.ui": "1.2.0-preview", + "com.unity.properties": "1.3.0-preview", + "com.unity.properties.ui": "1.3.0-preview", "com.unity.scriptablebuildpipeline": "1.6.4-preview", "com.unity.searcher": "4.0.9", - "com.unity.serialization": "1.2.0-preview" + "com.unity.serialization": "1.3.0-preview" + }, + "url": "https://packages.unity.com" + }, + "com.unity.platforms.desktop": { + "version": "0.5.0-preview.6", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.platforms": "0.5.0-preview.6" + }, + "url": "https://packages.unity.com" + }, + "com.unity.platforms.windows": { + "version": "0.5.0-preview.6", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.platforms": "0.5.0-preview.6", + "com.unity.platforms.desktop": "0.5.0-preview.6" }, "url": "https://packages.unity.com" }, @@ -167,22 +186,22 @@ "url": "https://packages.unity.com" }, "com.unity.properties": { - "version": "1.2.0-preview", + "version": "1.3.0-preview", "depth": 1, "source": "registry", "dependencies": { "nuget.mono-cecil": "0.1.5-preview", - "com.unity.test-framework.performance": "1.3.3-preview" + "com.unity.test-framework.performance": "2.0.8-preview" }, "url": "https://packages.unity.com" }, "com.unity.properties.ui": { - "version": "1.2.0-preview", + "version": "1.3.0-preview", "depth": 1, "source": "registry", "dependencies": { - "com.unity.properties": "1.2.0-preview", - "com.unity.serialization": "1.2.0-preview" + "com.unity.properties": "1.3.0-preview", + "com.unity.serialization": "1.3.0-preview" }, "url": "https://packages.unity.com" }, @@ -247,15 +266,15 @@ "url": "https://packages.unity.com" }, "com.unity.serialization": { - "version": "1.2.0-preview", + "version": "1.3.0-preview", "depth": 1, "source": "registry", "dependencies": { - "com.unity.collections": "0.7.0-preview.2", - "com.unity.burst": "1.3.0-preview.5", - "com.unity.jobs": "0.2.7-preview.11", - "com.unity.properties": "1.2.0-preview", - "com.unity.test-framework.performance": "1.3.3-preview" + "com.unity.collections": "0.8.0-preview.5", + "com.unity.burst": "1.3.0-preview.12", + "com.unity.jobs": "0.2.9-preview.15", + "com.unity.properties": "1.3.0-preview", + "com.unity.test-framework.performance": "2.0.8-preview" }, "url": "https://packages.unity.com" }, @@ -288,8 +307,8 @@ "url": "https://packages.unity.com" }, "com.unity.test-framework.performance": { - "version": "2.0.9-preview", - "depth": 0, + "version": "2.2.0-preview", + "depth": 1, "source": "registry", "dependencies": { "com.unity.test-framework": "1.1.0", diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 29b491d3..15bad076 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -14,6 +14,9 @@ EditorUserSettings: lightmappingDeviceAndPlatform: value: 53 flags: 0 + unity-properties__ui-persistent-state: + value: 183b144645154b7d0202082d05376c0417031d6876681d5a6d695d73a2a07478f98d76a9a77a7f7c7942af7c447e4314f7134b51b646595d4656a45740a8425f7b8558855a885f5c8b595c8e8d5fe7e2d9c3d1a882abf3cacbdacab2b4b0aeb8b5b1e5e6e6c2bc80eaefbef1ef82dcae818af7848c868987fa929193fcf8d7ca9b8cc59b88d2808e88dcf2def7c8ebced3e1e4d6d5e5d9ebdddedcf22285ae6c73622ae0fcbeb78caebc07c33230c4c83237c6643be0cfccc9d23fccd4ce8ae502dad9db06dbdadb21de0dde2364657a230f28183b013b3c0c3d350b083a6d196566643a683b37686e6f700206767f44504477117a3e4d5c293a24417f121714111a4749103c19174a6261634e633949696655666957686b695d705d70cb322da16b74abb46cbd6bbabab55ba557739ab6b7b84a4c4846504d49bd5380f61514d7c25493870e0d091c888f5ca45ea15f92aaf4a7bcabaaabb1ae9daeb1c49ab3b1e5b8e5bae8bfbcebb9bcec86f8a881eff6e59eeb989ee8efeed18598ba8e989591c59bcac89ce0cacf9ca78eaeb2a1e3f0d7a2adaabaa2f0f2f1f3def3f2f3f9ab0ff6f927f886f507c02dc230c5b472868d7874917084734d68935496cd1a067c75f081 + flags: 0 vcSharedLogLevel: value: 0d5e400f0650 flags: 0