前提・実現したいこと
probuilderで作成したオブジェクトをクリックしたら回転するようにしたいです。event triggerを用いました。
発生している問題・エラーメッセージ
このエラーが出ているのでprobuilderがおかしいのかなと考えました。probuilderについての知識が浅すぎるのでさっぱりわかりませんでした‥
NullReferenceException: Object reference not set to an instance of an object ProBuilder2.Common.pb_ElementGraphics.OnDisable () (at <18af90a43fca47ddb60c356c71cec131>:0)
該当のソースコード
C#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rotate : MonoBehaviour
{
// Start is called before the first frame update
public void rotate()
{
this.transform.Rotate(new Vector3(90, 0, 0));
}
}
### 試したこと まず、probuilderで作成したオブジェクトをクリックしてもタッチ判定がないです。GameobjectからCubeを作成して同じことをするとしっかり実行できました。 ### 補足情報(FW/ツールのバージョンなど) ここにより詳細な情報を記載してください。
あなたの回答
tips
プレビュー