浏览代码

Update to 19649

/main
unity-pets-bot 5 年前
当前提交
3687b1b7
共有 9 个文件被更改,包括 58 次插入23 次删除
  1. 8
      Assets/Scenes/Whitebox_Basic_A/Whitebox_Basic_A/030_Gameplay.unity
  2. 13
      Assets/Unity.Sample.BaseCharacter/Scripts/Character/CharacterController/CharacterControllerAuthoring.cs
  3. 8
      Assets/Unity.Sample.BaseCharacter/Scripts/Character/CharacterController/CharacterControllerCheckSupportSystem.cs
  4. 15
      Assets/Unity.Sample.BaseCharacter/Scripts/Character/CharacterController/CharacterControllerStepSystem.cs
  5. 2
      Assets/Unity.Sample.BaseCharacter/Scripts/Character/CharacterSystemShared.cs
  6. 9
      Packages/manifest.json
  7. 11
      ProjectSettings/ProjectSettings.asset
  8. 4
      ProjectSettings/ProjectVersion.txt
  9. 11
      README.md

8
Assets/Scenes/Whitebox_Basic_A/Whitebox_Basic_A/030_Gameplay.unity


m_Script: {fileID: 11500000, guid: b275e5f92732148048d7b77e264ac30e, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShapeType: 31
m_ShapeType: 0
m_PrimitiveCenter:
x: -1
y: -1.0000002

m_SimplificationTolerance: 0.030000007
m_BevelRadius: 0.05
m_MinimumAngle: 2.5000002
m_CustomMesh: {fileID: 0}
m_CustomMesh: {fileID: 7319280665265834630, guid: 150ad86663792b44893572265a86e816,
type: 3}
m_ForceUnique: 0
m_Material:
m_SupportsTemplate: 1
m_Template: {fileID: 11400000, guid: 5594fc3a3af26714b85125f24ce491e2, type: 2}

m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 66be85f64fd6e7f438ffc3de9984f8e2, type: 2}
- {fileID: 2100000, guid: a7ed9b602129b5046aa730cd50af1cd2, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0

13
Assets/Unity.Sample.BaseCharacter/Scripts/Character/CharacterController/CharacterControllerAuthoring.cs


using System;
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
using Unity.Mathematics;

}
}
[DisableAutoCreation]
[AlwaysSynchronizeSystem]
[UpdateInGroup(typeof(InitializationSystemGroup))]
[UpdateInGroup(typeof(AbilityUpdateSystemGroup))]
[UpdateAfter(typeof(MovementUpdatePhase))]
[UpdateBefore(typeof(CharacterControllerStepSystem))]
var ecb = World.GetOrCreateSystem<EndInitializationEntityCommandBufferSystem>().CreateCommandBuffer();
var ecb = new EntityCommandBuffer(Allocator.TempJob);
Entities
.WithNone<CharacterControllerCollider>()

collider.Collider.Dispose();
ecb.RemoveComponent<CharacterControllerCollider>(e);
}).Run();
ecb.Playback(EntityManager);
ecb.Dispose();
return inputDeps;
}
}

8
Assets/Unity.Sample.BaseCharacter/Scripts/Character/CharacterController/CharacterControllerCheckSupportSystem.cs


using Unity.Mathematics;
using Unity.Physics;
using Unity.Physics.Systems;
using Unity.NetCode;
[UpdateInGroup(typeof(AbilityUpdateSystemGroup))]
[UpdateAfter(typeof(CharacterControllerStepSystem))]

{
var physicsWorld = m_BuildPhysicsWorldSystem.PhysicsWorld;
var time = m_GameTimeSingletonQuery.GetSingleton<GlobalGameTime>().gameTime;
var PredictingTick = World.GetExistingSystem<GhostPredictionSystemGroup>().PredictingTick;
var constraints = new NativeList<SurfaceConstraintInfo>(Allocator.Temp);
var castHits = new NativeList<ColliderCastHit>(Allocator.Temp);

ref CharacterControllerMoveResult resultPosition,
ref CharacterControllerVelocity velocity,
ref CharacterControllerCollider ccCollider,
ref CharacterControllerGroundSupportData ccGroundData)=>
ref CharacterControllerGroundSupportData ccGroundData,
in PredictedGhostComponent predictedGhostComponent) =>
if (!GhostPredictionSystemGroup.ShouldPredict(PredictingTick, predictedGhostComponent))
return;
if (!ccQuery.CheckSupport)
{
ccGroundData.SupportedState = CharacterControllerUtilities.CharacterSupportState.Unsupported;

15
Assets/Unity.Sample.BaseCharacter/Scripts/Character/CharacterController/CharacterControllerStepSystem.cs


using Unity.Physics.Extensions;
using Unity.Physics.Systems;
using Unity.Transforms;
using Unity.NetCode;
[UpdateInGroup(typeof(AbilityUpdateSystemGroup))]
[UpdateAfter(typeof(MovementUpdatePhase))]

inputDeps.Complete();
var physicsWorld = m_BuildPhysicsWorldSystem.PhysicsWorld;
var PredictingTick = World.GetExistingSystem<GhostPredictionSystemGroup>().PredictingTick;
Entities
.ForEach((

ref CharacterControllerVelocity ccVelocity) =>
ref CharacterControllerVelocity ccVelocity,
in PredictedGhostComponent predictedGhostComponent) =>
if (!GhostPredictionSystemGroup.ShouldPredict(PredictingTick, predictedGhostComponent))
return;
if (!ccMoveQuery.FollowGround)
return;

var castHits = new NativeList<ColliderCastHit>(Allocator.Temp);
var distanceHits = new NativeList<DistanceHit>(Allocator.Temp);
var PredictingTick = World.GetExistingSystem<GhostPredictionSystemGroup>().PredictingTick;
Entities
.WithName("CharacterControllerStepSystem")
.ForEach((

ref CharacterControllerMoveResult moveResult,
ref CharacterControllerVelocity velocity)=>
ref CharacterControllerVelocity velocity,
in PredictedGhostComponent predictedGhostComponent) =>
if (!GhostPredictionSystemGroup.ShouldPredict(PredictingTick, predictedGhostComponent))
return;
constraints.Clear();
castHits.Clear();
distanceHits.Clear();

2
Assets/Unity.Sample.BaseCharacter/Scripts/Character/CharacterSystemShared.cs


var state = new Character.State();
var heroTypeAsset = heroRegistry.Value.Heroes[characterRepAll.heroTypeIndex];
ref var heroTypeAsset = ref heroRegistry.Value.Heroes[characterRepAll.heroTypeIndex];
// Setup health
healthState.SetMaxHealth(heroTypeAsset.health);

9
Packages/manifest.json


"dependencies": {
"com.unity.analytics": "3.3.2",
"com.unity.animation": "0.2.16-preview.5",
"com.unity.burst": "1.2.0-preview.9",
"com.unity.collections": "0.3.0-preview.0",
"com.unity.collections": "0.4.0-preview.6",
"com.unity.entities": "0.3.0-preview.4",
"com.unity.entities": "0.4.0-preview.10",
"com.unity.jobs": "0.2.1-preview.3",
"com.unity.jobs": "0.2.2-preview.6",
"com.unity.mathematics": "1.1.0",
"com.unity.netcode": "0.0.2-preview.1",
"com.unity.performance.profile-analyzer": "0.5.0-preview.1",

"com.unity.render-pipelines.high-definition": "7.1.6",
"com.unity.render-pipelines.high-definition-config": "7.1.6",
"com.unity.rendering.hybrid": "0.3.0-preview.4",
"com.unity.rendering.hybrid": "0.3.1-preview.10",
"com.unity.scriptablebuildpipeline": "1.6.3-preview",
"com.unity.shadergraph": "7.1.6",
"com.unity.test-framework": "1.1.3",

11
ProjectSettings/ProjectSettings.asset


openGLRequireES31: 0
openGLRequireES31AEP: 0
openGLRequireES32: 0
vuforiaEnabled: 0
m_TemplateCustomTags: {}
mobileMTRendering:
Android: 1

m_EncodingQuality: 1
- m_BuildTarget: PS4
m_EncodingQuality: 1
- m_BuildTarget: Android
m_EncodingQuality: 2
- m_BuildTarget: Lumin
m_EncodingQuality: 2
- m_BuildTarget: Windows Store Apps
m_EncodingQuality: 2
m_BuildTargetGroupLightmapSettings: []
playModeTestRunnerEnabled: 0
runPlayModeTestAsEditModeTest: 0

switchRatingsInt_9: 0
switchRatingsInt_10: 0
switchRatingsInt_11: 0
switchRatingsInt_12: 0
switchLocalCommunicationIds_0: 0x0005000C10000001
switchLocalCommunicationIds_1:
switchLocalCommunicationIds_2:

- libSceNpToolkit2.prx
- libSceS3DConversion.prx
- libSceSmart.prx
ps4attribVROutputEnabled: 0
monoEnv:
splashScreenBackgroundSourceLandscape: {fileID: 0}
splashScreenBackgroundSourcePortrait: {fileID: 0}

webGLThreadsSupport: 0
webGLWasmStreaming: 0
scriptingDefineSymbols:
1: DefaultCharacterWalkRight;CROSS_PLATFORM_INPUT;UNITY_POST_PROCESSING_STACK_V2;ENABLE_DOTS_COMPILER;ENABLE_SUBSCENE_IMPORTER
1: DefaultCharacterWalkRight;CROSS_PLATFORM_INPUT;UNITY_POST_PROCESSING_STACK_V2;ENABLE_DOTS_COMPILER;ENABLE_SUBSCENE_IMPORTER;ENABLE_SIMPLE_SYSTEM_DEPENDENCIES
2: CROSS_PLATFORM_INPUT
4: CROSS_PLATFORM_INPUT;MOBILE_INPUT;UNITY_POST_PROCESSING_STACK_V2
7: CROSS_PLATFORM_INPUT;MOBILE_INPUT;UNITY_POST_PROCESSING_STACK_V2

4
ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2019.3.0f1
m_EditorVersionWithRevision: 2019.3.0f1 (ffacea4b84e7)
m_EditorVersion: 2019.3.0f3
m_EditorVersionWithRevision: 2019.3.0f3 (6c9e2bfd6f81)

11
README.md


The purpose of this project is to test and demonstrate the new packages from
the Unity DOTS tech stack in a single place. Currently, the major ones are:
* Animation for DOTS
* Unity Animation
* Unity Transport and Unity NetCode
* Unity Physics
* Entities with conversion workflow and Unity Live Link

***Note*** This project is using the Burst compiler and for now you need to make
sure you have the following prerequisites: https://docs.unity3d.com/Packages/com.unity.burst@1.2/manual/index.html#burst-aot-requirements
***Known issue***: Be aware that with MacOS 10.15 there is a known crash on certain
MacBook Pro's (e.g. the 2015 model). This will take down the entire OS so
recommend you either use an older version of MacOS or wait until this has
been resolved.
***Known issue***: Be aware that with the first versions of MacOS 10.15 there is a known crash on certain
MacBook Pro's (e.g. the 2015 model). This issue will take down the entire OS so be sure
to upgrade to at least 10.15.2 where it was fixed.
## Opening the project for the first time

If you prefer, you can also turn on Jobs > Burst > Synchronous Compilation which will wait for
all burst compilations to finish before entering play mode.
At present, the project is configured with the define `ENABLE_SIMPLE_SYSTEM_DEPENDENCIES` that was introduced in entities version 0.3. This provides better performance in the editor since most gamecode is still tied to
the main thread. See the changelog of entities 0.3.0 for more information.
## Caveats and known issues

正在加载...
取消
保存