Unity 3.4 standard assets not working in iOS builds?

Hi guys,

I upgraded to Unity 3.4 for its new features, however it screwed up itself somehow. What I mean by that is that its default scripts such as ThirdPersonController.js no longer work when trying to build to iOS. Did something change? Is there a way to fix this?

Here is an example of some of the errors I will get:

----CompilerOutput:-stdout--exitcode: 255--compilationhadfailure: True--outfile: Temp/Assembly-UnityScript-firstpass.dll
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(325,33): BCE0048: Type 'Object' does not support slicing.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(326,33): BCE0048: Type 'Object' does not support slicing.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(327,44): BCE0019: 'CrossFade' is not a member of 'Object'. 
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(329,33): BCE0048: Type 'Object' does not support slicing.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(330,33): BCE0048: Type 'Object' does not support slicing.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(331,44): BCE0019: 'CrossFade' is not a member of 'Object'. 
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(337,44): BCE0019: 'CrossFade' is not a member of 'Object'. 
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(342,41): BCE0048: Type 'Object' does not support slicing.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(343,52): BCE0019: 'CrossFade' is not a member of 'Object'. 
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(346,41): BCE0048: Type 'Object' does not support slicing.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(347,52): BCE0019: 'CrossFade' is not a member of 'Object'. 
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(350,41): BCE0048: Type 'Object' does not support slicing.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(351,52): BCE0019: 'CrossFade' is not a member of 'Object'. 
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js(141,9): BCE0005: Unknown identifier: 'currentHeight'.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js(142,9): BCE0005: Unknown identifier: 'currentHeight'.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js(145,9): BCE0005: Unknown identifier: 'currentRotation'.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js(150,37): BCE0005: Unknown identifier: 'currentRotation'.
Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js(153,38): BCE0005: Unknown identifier: 'currentHeight'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(32,9): BCE0005: Unknown identifier: 'wantedRotationAngle'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(33,9): BCE0005: Unknown identifier: 'wantedHeight'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(35,9): BCE0005: Unknown identifier: 'currentRotationAngle'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(36,9): BCE0005: Unknown identifier: 'currentHeight'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(39,9): BCE0005: Unknown identifier: 'currentRotationAngle'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(42,9): BCE0005: Unknown identifier: 'currentHeight'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(45,9): BCE0005: Unknown identifier: 'currentRotation'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(50,31): BCE0005: Unknown identifier: 'currentRotation'.
Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js(53,32): BCE0005: Unknown identifier: 'currentHeight'.

The thing is I’ve never touched these scripts, they are not ones I have written they are default assets and will work fine if I change my build target to PC/Mac instead of iOS (but I need iOS). Some of these scripts are not even used in my game such as the Smooth Follow so I don’t know why I’m getting errors on it.

Has anyone else ran into this? Is there a fix? I’d really like to use Unity 3.4 but cannot if I can’t get this working.

I’ve already tried reimporting assets, reinstalling, and disabling the offending scripts but nothing is working.

Any help would be greatly appreciated :slight_smile:

I had this problem with ThirdPersonControl.js and the var _animation variable.

I changed it to be strong typed by making the variable var _animation : Animation and the Slicing issue went away. I assume it has to do with the dynamic typing.

add this to smoothfollow.js

var currentHeight;
var wantedHeight;
var currentRotationAngle;
var wantedRotationAngle;
var currentRotation : Quaternion;

I have two errors left, as soon as they are fixed I will post it here (FIXED NOW)

change this in dragrigidbody.js

    if (!springJoint)

	    {

		    var go = new GameObject("Rigidbody dragger");

		    go.AddComponent("Rigidbody");

		    springJoint = go.AddComponent("SpringJoint");

		    go.rigidbody.isKinematic = true;

	    }

and delete these files:

FPFlyer.js
WaveMeshAdjustment.js
WaterLightmapFog.js
WaveAnimation.js
UnderwaterEffects.js
PerformanceTweak.js
Heron.js

and all errors are now fixed, you can play this on android or IOS :slight_smile:

same problem here

Same problem here …tooo …any answers…