- 77 名前:名前は開発中のものです。 mailto:sage [2015/03/05(木) 17:26:16.12 ID:QefTOu49.net]
- NGUIについて質問です
スクリプトからコンポーネントの追加を試しています エディタ上で実行すると問題なくコンポーネントが追加されテクスチャが表示されるのですが、 EXEを生成して実行するとgobj.AddComponentの処理でNullReferenceExceptionのエラーが発生してしまいます 必要な処理が抜けているのでしょうか。 void Start (){ Texture2D texture = new Texture2D (32, 32, TextureFormat.ARGB32, false); GameObject gobj = new GameObject ("Tex2d"); UITexture uiTex = gobj.AddComponent <UITexture>( );uiTex.mainTexture = texture; uiTex.transform.parent= GameObject.Find("Anchor/Panel").transform; }
|

|