Created a new build step option, which can contain UnityObjects. They will be assigned by using the common unity UnityObject dialog and have to be "converted" inside their actual buildstep "BuildStepStart(BuildConfiguration pConfiguration)" method
Sample:
namespace UBSExtension { [BuildStepTypeFilter(EBuildStepType.PreBuildStep)] [BuildStepDescription("Sets the vr daydream icon, which you can normally specify inside the playersettings.")] [BuildStepParameterFilterAttribute(EBuildStepParameterType.UnityObject)] public class SetVRDaydreamIcon : IBuildStepProvider { public void BuildStepStart(BuildConfiguration pConfiguration) { Texture2D texture; var succeeded = UBS.Helpers.TryGetUnityObjectTypeFromBuildConfigurationParameter(pConfiguration, out texture); if (succeeded) { PlayerSettings.VRDaydream.daydreamIcon = texture; AssetDatabase.SaveAssets(); } else { pConfiguration.Cancel("Could not convert assigned object to needed texture2D"); } } public void BuildStepUpdate() { } public bool IsBuildStepDone() { return true; } } }
Created a new build step option, which can contain UnityObjects. They will be assigned by using the common unity UnityObject dialog and have to be "converted" inside their actual buildstep "BuildStepStart(BuildConfiguration pConfiguration)" method
Sample:
namespace UBSExtension { [BuildStepTypeFilter(EBuildStepType.PreBuildStep)] [BuildStepDescription("Sets the vr daydream icon, which you can normally specify inside the playersettings.")] [BuildStepParameterFilterAttribute(EBuildStepParameterType.UnityObject)] public class SetVRDaydreamIcon : IBuildStepProvider { public void BuildStepStart(BuildConfiguration pConfiguration) { Texture2D texture; var succeeded = UBS.Helpers.TryGetUnityObjectTypeFromBuildConfigurationParameter(pConfiguration, out texture); if (succeeded) { PlayerSettings.VRDaydream.daydreamIcon = texture; AssetDatabase.SaveAssets(); } else { pConfiguration.Cancel("Could not convert assigned object to needed texture2D"); } } public void BuildStepUpdate() { } public bool IsBuildStepDone() { return true; } } }