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

33 行
916 B

using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace Unity.Entities.Editor
{
[CustomEditor(typeof(GameObjectEntity))]
public class GameObjectEntityEditor : UnityEditor.Editor
{
[SerializeField] private SystemInclusionList inclusionList;
private void OnEnable()
{
inclusionList = new SystemInclusionList();
}
public override void OnInspectorGUI()
{
var gameObjectEntity = (GameObjectEntity) target;
if (gameObjectEntity.EntityManager == null || !gameObjectEntity.EntityManager.IsCreated || !gameObjectEntity.EntityManager.Exists(gameObjectEntity.Entity))
return;
inclusionList.OnGUI(World.Active, gameObjectEntity.Entity);
}
public override bool RequiresConstantRepaint()
{
return true;
}
}
}