Movie Texture Code

Before Unity, the closest I’ve come to scripting is writing film scripts. I’ve made a bit of progress none the less. I’m trying to add Java script to make a movie texture play, and this is where the plot thickens… MissingMethodException: Method not found: ‘UnityEngine.Texture.Play’…(more error data after that) is my latest and greatest error. The movie texture code I copied right out of the reference material. I changed the code to 'UnityEngine.Texture instead of material.mainTexture.Play(); it didn’t like that either. HELP! What is it asking for? I’ve come this far only to be stuck on a cliff during a dust storm. Any assistance would be well received.

Thanks

Digital D

s

Could you post more of your script?

function Start () {
renderer.material.mainTexture.Play();

}

]Error came back: MissingMethodException: Method not found: ‘UnityEngine.Texture.Play’.
UnityScript.Lang.UnityRuntimeServices.Invoke (System.Object target, System.String name, System.Object[ ] args, System.Type scriptBaseType) [0x00000]
NewBehaviourScript.Start () (at Assets/NewBehaviourScript.js:2)

function Update () {
if (Input.GetButtonDown (“Jump”)) {
if (renderer.material.mainTexture.isPlaying) {
renderer.material.mainTexture.Pause();
}
else {
renderer.material.mainTexture.Play();
}
}
}

I get the following error…MissingMethodException: Method not found: ‘UnityEngine.Texture.Play’.
UnityScript.Lang.UnityRuntimeServices.Invoke (System.Object target, System.String name, System.Object[ ] args, System.Type scriptBaseType) [0x00000]
NewBehaviourScript.Start () (at Assets/NewBehaviourScript.js:2)

Hmm. I don’t see anything wrong with your code. I think I remember reading that movies are a pro only feature. I’m not sure about this though. Are you using Unity Indie or Pro?

That was yesterday’s problem, …not using Pro. I upgraded and lovin it. I think I just…yep…Just found the problem. When I dragged the Texture onto the object it didn’t really take. I dragged it onto the selected object in the Heirgraph view and the movie popped right up using the shorter code. Thanks for looking at it Daniel. I’m sure you’ll see me back the forum soon, or maybe on the notorious 14 freeway…

Digital Duane

Hmm,

I use the same code and am getting the same error, i’m a pro user but it just stopped working… what gives

How, accidently put the code on a none plane surface… DOH