You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.0 KiB
84 lines
2.0 KiB
using UnityEngine;
|
|
using UnityEditor;
|
|
using UnityEditor.Build;
|
|
using UnityEditor.Build.Reporting;
|
|
using UnityEditor.Callbacks;
|
|
|
|
#if true // for build setting
|
|
public class SymbolControl : MonoBehaviour
|
|
{
|
|
|
|
}
|
|
#else
|
|
public class SymbolControl : MonoBehaviour
|
|
{
|
|
public static void ChangeSettings()
|
|
{
|
|
//ChatSettings currentSettings = ChatSettings.Load();
|
|
//currentSettings.AppId = ChatMgr.PhotonChatAppId;
|
|
// EditorGUIUtility.PingObject(currentSettings);
|
|
PlayerSettings.keystorePass = "Ye9x9*46vwQ6";
|
|
PlayerSettings.keyaliasPass = "Ye9x9*46vwQ6";
|
|
PlayerSettings.bundleVersion = Global.AppVersionBuild();
|
|
#if VER_DEV
|
|
//Photon.Pun.PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime = "d16fd98d-f633-4278-aa4d-48699e8ba45d";
|
|
#else
|
|
//Photon.Pun.PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime = "2e312c6a-820e-4d34-a12d-d0abcf048935";
|
|
#endif
|
|
}
|
|
|
|
//0 이 내부에서 쓰이는 order 이므로 1 이상을 지정한다
|
|
[PostProcessBuild(1)]
|
|
static void OnPostProcessBuild(BuildTarget buildTarget, string path)
|
|
{
|
|
ChangeSettings();
|
|
}
|
|
|
|
[PostProcessScene]
|
|
static void OnPostProcessScene()
|
|
{
|
|
ChangeSettings();
|
|
}
|
|
|
|
[DidReloadScripts(0)]
|
|
static void OnReloadScriptsFirst()
|
|
{
|
|
ChangeSettings();
|
|
}
|
|
|
|
|
|
[InitializeOnLoadMethod]
|
|
static void ChangeBundleIdentifier()
|
|
{
|
|
ChangeSettings();
|
|
}
|
|
|
|
}
|
|
|
|
[InitializeOnLoad]
|
|
public class SymbolControlInitialize
|
|
{
|
|
static SymbolControlInitialize()
|
|
{
|
|
SymbolControl.ChangeSettings();
|
|
}
|
|
}
|
|
|
|
class IVPreBuildProcessor : IPreprocessBuildWithReport
|
|
{
|
|
public int callbackOrder { get { return 0; } }
|
|
public void OnPreprocessBuild(BuildReport report)
|
|
{
|
|
SymbolControl.ChangeSettings();
|
|
}
|
|
}
|
|
|
|
class IVActiveBuildProcessor : IActiveBuildTargetChanged
|
|
{
|
|
public int callbackOrder { get { return 0; } }
|
|
public void OnActiveBuildTargetChanged(BuildTarget previousTarget, BuildTarget newTarget)
|
|
{
|
|
SymbolControl.ChangeSettings();
|
|
}
|
|
}
|
|
#endif
|