public static void CreateProxyGO() { if (!myxARMProxyGO) { // create GO with components attached myxARMProxyGO = new GameObject("xARMProxy"); myxARMProxy = myxARMProxyGO.AddComponent <xARMProxy> (); if (!myxARMProxy) { RemoveProxyGO(); xARMPreviewWindow.WarningBoxText = "Could not create xARMProxy. Do NOT put xARM in the Editor folder."; xARMGalleryWindow.WarningBoxText = "Could not create xARMProxy. Do NOT put xARM in the Editor folder."; } } }
public static void CreateProxyGO() { // create Proxy only if needed and not while switching to play mode if (!myxARMProxyGO && (EditorApplication.isPlaying || !EditorApplication.isPlayingOrWillChangePlaymode)) { // create GO with components attached myxARMProxyGO = new GameObject("xARMProxy"); myxARMProxy = myxARMProxyGO.AddComponent <xARMProxy> (); if (xARMManager.Config.IntegrationUGUIPhySize) { myxARMProxyGO.AddComponent <xARMDelegateUGUI> (); } if (!myxARMProxy) { RemoveProxyGO(); xARMPreviewWindow.WarningBoxText = "Could not create xARMProxy. Do NOT put xARM in the Editor folder."; xARMGalleryWindow.WarningBoxText = "Could not create xARMProxy. Do NOT put xARM in the Editor folder."; } } }
public static void CreateProxyGO() { if(!myxARMProxyGO){ // create GO with components attached myxARMProxyGO = new GameObject("xARMProxy"); myxARMProxy = myxARMProxyGO.AddComponent<xARMProxy> (); if(!myxARMProxy){ RemoveProxyGO (); xARMPreviewWindow.WarningBoxText = "Could not create xARMProxy. Do NOT put xARM in the Editor folder."; xARMGalleryWindow.WarningBoxText = "Could not create xARMProxy. Do NOT put xARM in the Editor folder."; } } }