LoginSignup
0
0

More than 5 years have passed since last update.

Unity4で作ったプロジェクトをUnity5でアップグレードするに躓いた箇所覚え書き

Posted at

Unity4系(4.7だったと思う)をUnity5で開く際にアップグレードを求められます。
その際にスクリプトをいくつか修正する必要があるのでそのメモ。

■error: CS1061
参考にしたサイトはこちら
Unity5でvelocityがエラーになっちゃう。/そこにUnityがあるから

□解決策
GetComponentでの取得方法に切り替え。
私の場合は以下の2点必要でした。

・カメラオブジェクトの取得
camera.ScreenPointToRay(Input.mousePosition);

GetComponent<Camera>().ScreenPointToRay(Input.mousePosition);

・レンダーオブジェクトの取得
renderer.material = materials[0];

GetComponent<Renderer>().material = materials[0];

■error: CS1704
参考にしたサイトはこちら
【Unity】Unity 5.5.1f1 に移行した際のエラー/すずしろ備忘Log
中でも言及されている公式のスレッドはこちら
Help needed after upgrading to 5.5.. CS1704 UnityEngine.UI already imported error

□解決策
Unity再起動(`・ω・´)ゞ

公式スレではそれだけではエラーが消えない方がいて、Libraryフォルダ全消しで解決した方もいるようです。遭遇したらこちらを試してみよう。

0
0
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
0
0