InstantiateInOutputView() public static method

public static InstantiateInOutputView ( GameObject prefab ) : GameObject
prefab UnityEngine.GameObject
return UnityEngine.GameObject
コード例 #1
0
ファイル: Inspector.cs プロジェクト: ryo0ka/Sightsync
        static public void Output(ComponentInfo component)
        {
            var item = Window.InstantiateInOutputView(componentViewPrefab).GetComponent <ComponentItem>();

            item.component = component.instance;
            item.title     = string.Format("<b><i>{0}</i></b> ({1})",
                                           component.componentName, component.gameObjectPath);
            foreach (var field in component.fields)
            {
                InstantiateFieldItem(component, item, field);
            }
        }
コード例 #2
0
ファイル: Inspector.cs プロジェクト: ryo0ka/Sightsync
        static public void Inspect(GameObject gameObject)
        {
            if (gameObject == null)
            {
                Log.Warn("given GameObject is null.");
                return;
            }

            Utility.RunOnNextFrame(() => {
                var item = Window.InstantiateInOutputView(gameObjectViewPrefab).GetComponent <GameObjectItem>();;
                item.targetGameObject = gameObject;
                item.title            = gameObject.name;
            });
        }