public DiffTexGeneratorProcess(DifferenceTextureGenerator _differenceTextureGenerator, string _basePath) { differenceTextureGenerator = _differenceTextureGenerator; basePath = _basePath; if (differenceTextureGenerator.base_path != null && differenceTextureGenerator.base_path != "") { basePath = FileUtil.GetPathFromRelative(_basePath, differenceTextureGenerator.base_path.Replace("~/", "")); } /* * テクスチャの名前に使用されるラベルのスタイル * --------------------- * フォントサイズ: 14 * フォントスタイル: Bold * マージン: 左4, 残り0 * --------------------- */ styleTextureNameLabel = new GUIStyle(EditorStyles.label); styleTextureNameLabel.fontSize = 16; styleTextureNameLabel.fontStyle = FontStyle.Bold; styleTextureNameLabel.margin = new RectOffset(4, 0, 0, 0); /* * パーツの名前に使用されるラベルのスタイル */ stylePartsNameLabel = new GUIStyle(EditorStyles.label); stylePartsNameLabel.fontSize = 14; stylePartsNameLabel.fontStyle = FontStyle.Bold; stylePartsNameLabel.margin = new RectOffset(4, 0, 0, 0); }
//ベースパスからDiffTexGenのjsonファイルを読み込む public static DiffTexGeneratorProcess LoadDiffTexGenFromBaseDir(string basePath) { for (int i = 0; i < diffTexJsonFileNames.Length; i++) { string jsonPath = basePath + diffTexJsonFileNames[i]; if (File.Exists(jsonPath)) { DifferenceTextureGenerator diffTexGen = FileUtil.LoadJsonFile <DifferenceTextureGenerator>(jsonPath); return(new DiffTexGeneratorProcess(diffTexGen, Path.GetDirectoryName(jsonPath))); } jsonPath = basePath + "RiClothesSetuper/" + diffTexJsonFileNames[i]; if (File.Exists(jsonPath)) { DifferenceTextureGenerator diffTexGen = FileUtil.LoadJsonFile <DifferenceTextureGenerator>(jsonPath); return(new DiffTexGeneratorProcess(diffTexGen, Path.GetDirectoryName(jsonPath))); } } return(null); }