2ちゃんねる ■掲示板に戻る■ 全部 1- 最新50    

■ このスレッドは過去ログ倉庫に格納されています

【ゲームエンジン】Unityなんでも質問スレpart11

505 :低クオリティでごめんねごめんね:2023/09/08(金) 15:59:57.42 ID:OYwRjle1.net
多分読まないと思うけど
https://docs.unity3d.com/ja/2020.3/ScriptReference/Transform.html

Transform はComponentから
GameObjectはObjectからの継承

Component.transform
Component.gameObject
GameObject.transform

の関係かなぁ

分かりにくいけどね
んでThisは
https://docs.unity3d.com/ja/2020.3/ScriptReference/Object.Destroy.html

ここ読んでなんとなくわかってもらえるといいけど

// Removes this script instance from the game object
Destroy(this);

これやるとゲームオブジェクトは消去されないでscript instance
のみ消えるというから要注意

総レス数 1001
286 KB
新着レスの表示

掲示板に戻る 全部 前100 次100 最新50
read.cgi ver.24052200