Megacity demo game for UOS
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
927 B

using Unity.Entities;
using UnityEngine;
using Unity.MegaCity.Gameplay;
namespace Unity.MegaCity.Authoring
{
/// <summary>
/// Add required tag components for cosmetic physics
/// </summary>
public class PlayerVehicleCosmeticPhysicsAuthoring : MonoBehaviour
{
public GameObject VehicleController;
[BakingVersion("julian", 2)]
public class PlayerVehicleCosmeticPhysicsBaker : Baker<PlayerVehicleCosmeticPhysicsAuthoring>
{
public override void Bake(PlayerVehicleCosmeticPhysicsAuthoring authoring)
{
var vehicle = GetEntity(authoring.VehicleController, TransformUsageFlags.Dynamic);
var entity = GetEntity(authoring.gameObject, TransformUsageFlags.Dynamic);
AddComponent(entity, new PlayerVehicleCosmeticPhysics { VehicleEntity = vehicle });
}
}
}
}