public string CreateCloudBuildMethods() { var classTextAsset = ClassTemplate?.text; var methodsTextAsset = MethodsTemplate?.text; if (string.IsNullOrEmpty(classTextAsset)) { Debug.LogWarning($"CreateCloudBuildClass: ERROR CLASS {ClassTemplatePath} NULL value"); return(string.Empty); } if (string.IsNullOrEmpty(methodsTextAsset)) { Debug.LogWarning($"CreateCloudBuildMethods: ERROR METHODS {MethodsTemplatePath} NULL value"); return(string.Empty); } var commands = AssetEditorTools.GetAssets <UniBuildCommandsMap>(); var methodsValue = string.Empty; foreach (var command in commands) { var guid = AssetEditorTools.GetGUID(command); var methodValue = methodsTextAsset.Replace(ConfigGUIDKey, guid); var methodName = command.name.RemoveSpecialAndDotsCharacters(); methodsValue += methodValue.Replace(BuildConfigKey, methodName); } return(classTextAsset.Replace(MethodsKey, methodsValue)); }
public string CreateBuildMethod(UniBuildCommandsMap config) { var name = config.ItemName.RemoveSpecialAndDotsCharacters(); var id = AssetEditorTools.GetGUID(config); var method = $"{string.Format(_menuTemplate,name)} public static void Build_{name}() => UniBuildTool.BuildByConfigurationId(\"{id}\");"; return(method); }
public static void Reimport() { var atlases = AssetEditorTools.GetAssets <SpriteAtlas>(); var addressableAtlases = atlases. Where(x => x.IsInAnyAddressableAssetGroup()). Select(x => new AssetReferenceSpriteAtlas(AssetEditorTools.GetGUID(x))). ToList(); var atlasManagers = AssetEditorTools.GetAssets <AddressableSpriteAtlasConfiguration>(); foreach (var manager in atlasManagers) { SetupMap(manager, addressableAtlases); manager.MarkDirty(); } }
public string CreateCloudBuildMethods() { var methodsTextAsset = LoadMethodsTemplate(); var commands = AssetEditorTools.GetAssets <UniBuildCommandsMap>(); var methodsValue = string.Empty; foreach (var command in commands) { var guid = AssetEditorTools.GetGUID(command); var methodValue = methodsTextAsset.Replace(ConfigGUIDKey, guid); var methodName = command.name.RemoveSpecialAndDotsCharacters(); methodsValue += methodValue.Replace(BuildConfigKey, methodName); } var classTextAsset = ClassTemplate.Replace(ClassNameTemplate, ClassName); return(classTextAsset.Replace(MethodsKey, methodsValue)); }
private Object UpdateGuidAssetData() { UpdateView(asset ? AssetEditorTools.GetGUID(asset) : string.Empty); return(asset); }