mirror of
https://github.com/hanzoai/ProjectTinySamples.git
synced 2026-09-24 00:01:34 +00:00
19 lines
500 B
C#
19 lines
500 B
C#
using UnityEngine;
|
|
using Unity.Entities;
|
|
|
|
namespace Unity.Spaceship.Authoring
|
|
{
|
|
public class ButtonComponent : MonoBehaviour, IConvertGameObjectToEntity
|
|
{
|
|
public ButtonTypes ButtonType = ButtonTypes.None;
|
|
|
|
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
|
|
{
|
|
dstManager.AddComponentData(entity, new ButtonIdentifier()
|
|
{
|
|
Value = ButtonType
|
|
});
|
|
}
|
|
}
|
|
}
|