2015-09-18 213 views
1

我在UnityScript中使用了最新的Unity 4(在發佈遊戲之前不想升級到Unity 5,只是爲了避免併發症)。不幸的是,我不得不升級到iOS 9和Xcode的7場比賽,建於團結然後在Xcode中打開,但是在iPhone上部署過程中,我開始收到錯誤:LoadLevel無法在iOS設備上工作

clang: error: linker command failed with exit code 1 (use -v to see invocation) 

升級到Unity 5之後,Xcode的部署電話工作,但是在手機上,我無法通過單擊GUI按鈕或定時加載另一個場景,但它只是無法加載,但是可以在Unity編輯器中使用。

是不是有什麼毛病Application.LoadLevel(「NewScene「);或者是別的事情需要做或做不同

而且,由於某些原因,該物體的旋轉停止Unity5工作(甚至是?在編輯)

transform.Translate(Vector3.left GameManager.speed/12 Time.deltaTime, Space.World); 
GetComponent.().angularVelocity = direction * 500; 

有什麼事情可以做,以解決這兩個問題?也許我需要降級到Unity 4,那麼如何解決Xcode的錯誤(上面)?

回答

1

確保你的場景包含在生成設置(文件 - >生成設置...)

transform.Translate(Vector3.left GameManager.speed/12 Time.deltaTime, Space.World); 
GetComponent.().angularVelocity = direction * 500; 

這甚至不會編譯,因爲許多語法錯誤的,我敢打賭,你想是這樣的:

transform.Translate(Vector3.left * GameManager.speed/12 * Time.deltaTime, Space.World); 
GetComponent<Rigidbody>().angularVelocity = direction * 500; 

如果這不起作用請確保您已連接剛體,禁用期望軸上的旋轉凍結並檢查方向是否有任何值(不是(0,0,0))

另外請注意,您不應該直接使用angularVelocity。團結文檔狀態(http://docs.unity3d.com/ScriptReference/Rigidbody-angularVelocity.html):

In most cases you should not modify it directly, as this can result in unrealistic behaviour.

你可以使用http://docs.unity3d.com/ScriptReference/Rigidbody.AddRelativeTorque.html代替。

相關問題