public void Awake() { var gObj = new GameObject("texteditConfirm", typeof(DelegateDialog)); DontDestroyOnLoad(gObj); dialog = (DelegateDialog)gObj.GetComponent(typeof(DelegateDialog)); var urlGetter = new WWW(string.Format("file://{0}GameData/kOS/GFX/resize-button.png", KSPUtil.ApplicationRootPath.Replace("\\", "/"))); urlGetter.LoadImageIntoTexture(resizeImage); }
public void Awake() { WindowRect = new Rect(0, 0, 470, 280); // bogus starting value will be changed later when attaching to a terminal. // Load dummy textures resizeImage = Utilities.Utils.GetTextureWithErrorMsg("kOS/GFX/dds_resize-button", false); dialog = gameObject.AddComponent <DelegateDialog>(); GetFont(); }
public void Awake() { WindowRect = new Rect(0, 0, 470, 280); // bogus starting value will be changed later when attaching to a terminal. // Load dummy textures resizeImage = new Texture2D(0, 0, TextureFormat.DXT1, false); dialog = gameObject.AddComponent <DelegateDialog>(); var urlGetter = new WWW(string.Format("file://{0}GameData/kOS/GFX/resize-button.png", KSPUtil.ApplicationRootPath.Replace("\\", "/"))); urlGetter.LoadImageIntoTexture(resizeImage); GetFont(); }