Hi
I have a script where I use iTween to have an instantiated object follow a path, I try to use iTween.Stab to play the sound from an ambulance.
The ambulance runs fine along the path, and there is a speaker attached to it in the scene view. However the sound does not play. When I check the the clone of the object the in the Inspector, the attached Audio Scource does not contain the audio clip.
Any ideas??
Bob
The Code:
var instance: GameObject = Instantiate(ambulance, Vector3(758,2,924), transform.rotation);
iTween.Stab(instance, {“clip”: sirene, “volume”: 3, “pitch”:1});
iTween.MoveTo(instance, {“path” : [Vector3(738,0,932), Vector3(674,0,961), Vector3(672,0,995), transform.position], “time” : 6, “orienttopath” : true});
The error message:
NullReferenceException
iTween.GenerateStabTargets () (at Assets/Standard Assets/iTween.cs:3436)
iTween.GenerateTargets () (at Assets/Standard Assets/iTween.cs:3232)
iTween.TweenStart () (at Assets/Standard Assets/iTween.cs:4570)
iTween+c__Iterator2.MoveNext () (at Assets/Standard Assets/iTween.cs:6455)