LoginSignup
1
1

More than 5 years have passed since last update.

【Unity】ObjectにScriptをAttachできない

Posted at

困ったこと

  • ObjectにScriptをAttachできなかったこと

困るまでの手順

  • Assetsの下で右クリック:Create<C# Script でScriptを作成
  • Startメソッドに試しにログを仕込む

    $ Debug.Log(':::::START:::::');
    
  • HierarchyにあるObjectにできたScriptをDrag&Dropでアタッチしようとする

  • できなくて、困る

その時のダイアログの内容

   スクリーンショット 2018-06-19 19.58.18.png

解決方法

  • クラス名とScriptのファイル名を揃えてあげた(クラス名に変な変数が入っていた)

  スクリーンショット 2018-06-19 20.10.34.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1