コード例 #1
0
        private static void RepaintInspector()
        {
            var window = Resources.FindObjectsOfTypeAll <EditorWindow>();

            var inspectorWindow = ArrayUtility.FindAll(window, c => c.GetType().Name == "InspectorWindow").ToArray();

            inspectorWindow.ForEach(x => x.Repaint());
        }
コード例 #2
0
        private void TileSelection(Tile.TileState tileState)
        {
            List <Tile> result = ArrayUtility.FindAll(FindObjectsOfType <Tile>(), (t) => t.tileState == tileState);

            GameObject[] results = new GameObject[result.Count];

            int i = 0;

            foreach (Tile tile in result)
            {
                results[i] = tile.gameObject;
                i++;
            }

            Selection.objects = results;
        }