public RenderContext(string spriteOutputFolderAssetPath, string fontFolderAssetPath, GameObject rootObject) { this.spriteOutputFolderAssetPath = spriteOutputFolderAssetPath; this.fontFolderAssetPath = fontFolderAssetPath; this.rootObject = rootObject; OptionAddXdGuidComponent = false; FreeChildObjects = new Dictionary <GameObject, GameObjectIdentifier>(); if (rootObject != null) { // 全ての子供を取得する var allChildren = new List <GameObject>(); ElementUtil.GetChildRecursive(rootObject, ref allChildren); foreach (var obj in allChildren) { if (obj == rootObject) { // 自分自身はスキップする continue; } AddFreeObject(obj); } } }