您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
23 行
708 B
23 行
708 B
using Unity.Entities;
|
|
using Unity.MegaCity.CameraManagement;
|
|
using UnityEngine;
|
|
|
|
namespace Unity.MegaCity.Authoring
|
|
{
|
|
/// <summary>
|
|
/// Create tag component for the player camera target
|
|
/// </summary>
|
|
public class PlayerCameraTargetAuthoring : MonoBehaviour
|
|
{
|
|
|
|
[BakingVersion("julian", 2)]
|
|
public class PlayerCameraTargetBaker : Baker<PlayerCameraTargetAuthoring>
|
|
{
|
|
public override void Bake(PlayerCameraTargetAuthoring authoring)
|
|
{
|
|
var entity = GetEntity(authoring.gameObject, TransformUsageFlags.Dynamic);
|
|
AddComponent<PlayerCameraTarget>(entity);
|
|
}
|
|
}
|
|
}
|
|
}
|