diff --git a/EntitiesSamples/.vsconfig b/EntitiesSamples/.vsconfig new file mode 100644 index 000000000..d70cd98b7 --- /dev/null +++ b/EntitiesSamples/.vsconfig @@ -0,0 +1,6 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.ManagedGame" + ] +} diff --git a/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/AnimateGameObject.unity b/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/AnimateGameObject.unity index c9a013c06..65a15c984 100644 --- a/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/AnimateGameObject.unity +++ b/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/AnimateGameObject.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.18028352, g: 0.22571376, b: 0.30692244, a: 1} + m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -208,14 +208,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 890793047} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalRotation: {x: 0.18861718, y: -0, z: -0, w: 0.9820508} + m_LocalPosition: {x: 0, y: 22, z: -70} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 21.744, y: 0, z: 0} --- !u!114 &890793051 MonoBehaviour: m_ObjectHideFlags: 0 @@ -246,6 +246,7 @@ MonoBehaviour: m_Dithering: 0 m_ClearDepth: 1 m_AllowXRRendering: 1 + m_AllowHDROutput: 1 m_UseScreenCoordOverride: 0 m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} @@ -323,7 +324,12 @@ PrefabInstance: - target: {fileID: 5701704621631426976, guid: 36e93c435d1648a4c86d516057a9cbe2, type: 3} propertyPath: m_Name - value: Warrior + value: WarriorInScene + objectReference: {fileID: 0} + - target: {fileID: 5701704621631426976, guid: 36e93c435d1648a4c86d516057a9cbe2, + type: 3} + propertyPath: m_IsActive + value: 1 objectReference: {fileID: 0} - target: {fileID: 6826973555475864791, guid: 36e93c435d1648a4c86d516057a9cbe2, type: 3} diff --git a/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/SpawnSystem.cs b/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/SpawnSystem.cs index 67439bf44..46fa15091 100644 --- a/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/SpawnSystem.cs +++ b/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/SpawnSystem.cs @@ -2,6 +2,7 @@ using Unity.Burst; using Unity.Collections; using Unity.Entities; +using Unity.Transforms; using UnityEngine; using Object = UnityEngine.Object; @@ -26,11 +27,17 @@ public void OnUpdate(ref SystemState state) var warriorGOPrefab = state.EntityManager.GetComponentData(entity); var instance = GameObject.Instantiate(warriorGOPrefab.Prefab); instance.hideFlags |= HideFlags.HideAndDontSave; - state.EntityManager.AddComponentObject(entity, instance.GetComponent()); + //state.EntityManager.AddComponentObject(entity, instance.GetComponent()); state.EntityManager.AddComponentObject(entity, instance.GetComponent()); + state.EntityManager.AddComponentObject(entity, new TransformGOInstance { Transform = instance.transform }); state.EntityManager.AddComponentData(entity, new WarriorGOInstance { Instance = instance }); state.EntityManager.RemoveComponent(entity); } + foreach (var (goTransform, transform) in SystemAPI.Query()) + { + goTransform.Transform.position = transform.Position; + goTransform.Transform.rotation = transform.Rotation; + } } } } diff --git a/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/WarriorAuthoring.cs b/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/WarriorAuthoring.cs index 101a8689a..ad9ba05ce 100644 --- a/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/WarriorAuthoring.cs +++ b/EntitiesSamples/Assets/Miscellaneous/AnimateGameObject/WarriorAuthoring.cs @@ -36,6 +36,10 @@ public void Dispose() UnityEngine.Object.DestroyImmediate(Instance); } } + public class TransformGOInstance : IComponentData + { + public Transform Transform; + } public struct WanderState : IComponentData { diff --git a/EntitiesSamples/Packages/manifest.json b/EntitiesSamples/Packages/manifest.json index 1c8022438..9974615e7 100644 --- a/EntitiesSamples/Packages/manifest.json +++ b/EntitiesSamples/Packages/manifest.json @@ -6,7 +6,7 @@ "com.unity.ide.rider": "3.0.21", "com.unity.ide.visualstudio": "2.0.18", "com.unity.ide.vscode": "1.2.5", - "com.unity.render-pipelines.universal": "14.0.7", + "com.unity.render-pipelines.universal": "14.0.8", "com.unity.textmeshpro": "3.0.6", "com.unity.ugui": "1.0.0", "com.unity.visualscripting": "1.8.0", diff --git a/EntitiesSamples/Packages/packages-lock.json b/EntitiesSamples/Packages/packages-lock.json index fd86efbe6..36b02985b 100644 --- a/EntitiesSamples/Packages/packages-lock.json +++ b/EntitiesSamples/Packages/packages-lock.json @@ -138,7 +138,7 @@ "url": "https://packages.unity.com" }, "com.unity.render-pipelines.core": { - "version": "14.0.7", + "version": "14.0.8", "depth": 1, "source": "builtin", "dependencies": { @@ -149,14 +149,14 @@ } }, "com.unity.render-pipelines.universal": { - "version": "14.0.7", + "version": "14.0.8", "depth": 0, "source": "builtin", "dependencies": { "com.unity.mathematics": "1.2.1", "com.unity.burst": "1.8.4", - "com.unity.render-pipelines.core": "14.0.7", - "com.unity.shadergraph": "14.0.7" + "com.unity.render-pipelines.core": "14.0.8", + "com.unity.shadergraph": "14.0.8" } }, "com.unity.scriptablebuildpipeline": { @@ -191,11 +191,11 @@ "url": "https://packages.unity.com" }, "com.unity.shadergraph": { - "version": "14.0.7", + "version": "14.0.8", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.render-pipelines.core": "14.0.7", + "com.unity.render-pipelines.core": "14.0.8", "com.unity.searcher": "4.9.2" } }, diff --git a/EntitiesSamples/ProjectSettings/ProjectVersion.txt b/EntitiesSamples/ProjectSettings/ProjectVersion.txt index 56ddb83a4..8fcd9947d 100644 --- a/EntitiesSamples/ProjectSettings/ProjectVersion.txt +++ b/EntitiesSamples/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2022.3.0f1 -m_EditorVersionWithRevision: 2022.3.0f1 (fb119bb0b476) +m_EditorVersion: 2022.3.1f1 +m_EditorVersionWithRevision: 2022.3.1f1 (f18e0c1b5784)