Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to unity version 2019.4.11f1 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions AngryDOTS/.idea/.idea.AngryDOTS/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions AngryDOTS/.idea/.idea.AngryDOTS/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions AngryDOTS/.idea/.idea.AngryDOTS/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions AngryDOTS/.idea/.idea.AngryDOTS/.idea/riderModule.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions AngryDOTS/.idea/.idea.AngryDOTS/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 31 additions & 16 deletions AngryDOTS/Assets/Addons/RenderPipelines/LightweightAsset.asset
Original file line number Diff line number Diff line change
@@ -4,37 +4,52 @@
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: LightweightAsset
m_EditorClassIdentifier:
k_AssetVersion: 3
m_MaxPixelLights: 8
m_SupportsVertexLight: 1
k_AssetVersion: 5
k_AssetPreviousVersion: 5
m_RendererType: 1
m_RendererData: {fileID: 0}
m_RendererDataList:
- {fileID: 11400000, guid: f2da4954c90b29d48a34341321f4ffff, type: 2}
m_DefaultRendererIndex: 0
m_RequireDepthTexture: 1
m_RequireSoftParticles: 1
m_RequireOpaqueTexture: 0
m_OpaqueDownsampling: 1
m_SupportsTerrainHoles: 1
m_SupportsHDR: 1
m_MSAA: 4
m_RenderScale: 1
m_SupportsDynamicBatching: 1
m_DirectionalShadowsSupported: 1
m_ShadowAtlasResolution: 2048
m_MainLightRenderingMode: 1
m_MainLightShadowsSupported: 1
m_MainLightShadowmapResolution: 2048
m_AdditionalLightsRenderingMode: 1
m_AdditionalLightsPerObjectLimit: 8
m_AdditionalLightShadowsSupported: 1
m_AdditionalLightsShadowmapResolution: 512
m_ShadowDistance: 50
m_ShadowCascades: 2
m_Cascade2Split: 0.24214624
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_LocalShadowsSupported: 1
m_LocalShadowsAtlasResolution: 512
m_ShadowDepthBias: 1
m_ShadowNormalBias: 1
m_SoftShadowsSupported: 1
m_KeepAdditionalLightVariants: 1
m_KeepVertexLightVariants: 1
m_KeepDirectionalShadowVariants: 1
m_KeepLocalShadowVariants: 1
m_KeepSoftShadowVariants: 1
m_ResourcesAsset: {fileID: 11400000, guid: aac5a08c32552a14c89394b703f1978a, type: 2}
m_UseSRPBatcher: 1
m_SupportsDynamicBatching: 1
m_MixedLightingSupported: 1
m_DebugLevel: 0
m_PostProcessingFeatureSet: 0
m_ColorGradingMode: 0
m_ColorGradingLutSize: 32
m_ShadowType: 2
m_LocalShadowsSupported: 1
m_LocalShadowsAtlasResolution: 512
m_MaxPixelLights: 8
m_ShadowAtlasResolution: 2048
m_ShaderVariantLogLevel: 0
38 changes: 38 additions & 0 deletions AngryDOTS/Assets/ForwardRenderer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
m_Name: ForwardRenderer
m_EditorClassIdentifier:
m_RendererFeatures: []
m_RendererFeatureMap:
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
shaders:
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd,
type: 3}
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
m_OpaqueLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_TransparentLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_DefaultStencilState:
overrideStencilState: 0
stencilReference: 0
stencilCompareFunction: 8
passOperation: 0
failOperation: 0
zFailOperation: 0
m_ShadowTransparentReceive: 1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion AngryDOTS/Assets/Scripts/ECS/Systems/CollisionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Unity.Burst;
using ECS.Systems;
using Unity.Burst;
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
46 changes: 23 additions & 23 deletions AngryDOTS/Assets/Scripts/ECS/Systems/MoveForwardSystem.cs
Original file line number Diff line number Diff line change
@@ -3,32 +3,32 @@
using Unity.Entities;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using Unity.Transforms;

namespace Unity.Transforms
namespace ECS.Systems
{
public class MoveForwardSystem : JobComponentSystem
{
[BurstCompile]
[RequireComponentTag(typeof(MoveForward))]
struct MoveForwardRotation : IJobForEach<Translation, Rotation, MoveSpeed>
{
public float dt;
public class MoveForwardSystem : JobComponentSystem
{
[BurstCompile]
[RequireComponentTag(typeof(MoveForward))]
struct MoveForwardRotation : IJobForEach<Translation, Rotation, MoveSpeed>
{
public float dt;

public void Execute(ref Translation pos, [ReadOnly] ref Rotation rot, [ReadOnly] ref MoveSpeed speed)
{
pos.Value = pos.Value + (dt * speed.Value * math.forward(rot.Value));
}
}
public void Execute(ref Translation pos, [ReadOnly] ref Rotation rot, [ReadOnly] ref MoveSpeed speed)
{
pos.Value = pos.Value + (dt * speed.Value * math.forward(rot.Value));
}
}

protected override JobHandle OnUpdate(JobHandle inputDeps)
{
var moveForwardRotationJob = new MoveForwardRotation
{
dt = Time.deltaTime
};
protected override JobHandle OnUpdate(JobHandle inputDeps)
{
var moveForwardRotationJob = new MoveForwardRotation
{
dt = UnityEngine.Time.deltaTime
};

return moveForwardRotationJob.Schedule(this, inputDeps);
}
}
return moveForwardRotationJob.Schedule(this, inputDeps);
}
}
}
56 changes: 28 additions & 28 deletions AngryDOTS/Assets/Scripts/ECS/Systems/TimedDestroySystem.cs
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
using Unity.Entities;
using Unity.Jobs;
using Unity.Transforms;
using UnityEngine;


[UpdateAfter(typeof(MoveForwardSystem))]
public class TimedDestroySystem : JobComponentSystem
namespace ECS.Systems
{
EndSimulationEntityCommandBufferSystem buffer;

protected override void OnCreateManager()
[UpdateAfter(typeof(MoveForwardSystem))]
public class TimedDestroySystem : JobComponentSystem
{
buffer = World.Active.GetOrCreateSystem<EndSimulationEntityCommandBufferSystem>();
}
EndSimulationEntityCommandBufferSystem buffer;

struct CullingJob : IJobForEachWithEntity<TimeToLive>
{
public EntityCommandBuffer.Concurrent commands;
public float dt;
protected override void OnCreate()
{
buffer = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem<EndSimulationEntityCommandBufferSystem>();
}

public void Execute(Entity entity, int jobIndex, ref TimeToLive timeToLive)
struct CullingJob : IJobForEachWithEntity<TimeToLive>
{
timeToLive.Value -= dt;
if (timeToLive.Value <= 0f)
commands.DestroyEntity(jobIndex, entity);
public EntityCommandBuffer.Concurrent commands;
public float dt;

public void Execute(Entity entity, int jobIndex, ref TimeToLive timeToLive)
{
timeToLive.Value -= dt;
if (timeToLive.Value <= 0f)
commands.DestroyEntity(jobIndex, entity);
}
}
}

protected override JobHandle OnUpdate(JobHandle inputDeps)
{
var job = new CullingJob
protected override JobHandle OnUpdate(JobHandle inputDeps)
{
commands = buffer.CreateCommandBuffer().ToConcurrent(),
dt = Time.deltaTime
};
var job = new CullingJob
{
commands = buffer.CreateCommandBuffer().ToConcurrent(),
dt = UnityEngine.Time.deltaTime
};

var handle = job.Schedule(this, inputDeps);
buffer.AddJobHandleForProducer(handle);
var handle = job.Schedule(this, inputDeps);
buffer.AddJobHandleForProducer(handle);

return handle;
return handle;
}
}
}

Loading
Oops, something went wrong.