using UnityEngine; using UnityEditor; namespace GeneralTools { public class ProductWindow : ScriptableWizard { public string companyName; public string productName; private void OnEnable() { productName = PlayerSettings.productName; companyName = PlayerSettings.companyName; } private void OnWizardCreate() { SetProduct(); } private void OnWizardOtherButton() { companyName = "FengYuZhu"; productName = Application.productName; SetProduct(); } private void SetProduct() { PlayerSettings.companyName = companyName; PlayerSettings.productName = productName; string identifier = string.Format("com.{0}.{1}", companyName, productName); PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Standalone, identifier); PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, identifier); PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, identifier); } } }