Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink
Share
Go down
Member [Lv. 1]
Member [Lv. 1]
Posts : 2
Points : 663
Rep : 0
Join date : 2016-09-29
View user profile

Please Help! need to make movie texture play

on Fri Sep 30, 2016 1:38 pm
Hello dears,

I'm new with unity and I try to follow already many tutorials, but can't make movie texture applied to plane play. I tried the script suggested:
using UnityEngine;
using System.Collections;

public class videocontroler :MonoBehaviour {
public MovieTexture movTexture;
void Start () {

MovieTexture movie = GetComponent<Renderer>().material.mainTexture as MovieTexture;
movie.Play ();
}

// Update is called once per frame
void Update () {

}
}

and I don't know what's wrong with it, but I can't apply it to my plane, gives an error:
Can't add script component 'video controler' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match.

pale pale pale pale pale
who Knows, what am I doing wrong?
avatar
{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
Posts : 53
Points : 1528
Rep : 11
Join date : 2015-01-18
Age : 41
Location : Italia
View user profile

Re: Please Help! need to make movie texture play

on Sun Oct 02, 2016 2:56 am
I think you've given a different name to the file.
should as in the "public class videocontroler: MonoBehaviour{"
If you have renamed in video controler does not recognize the defined class.
regards
Member [Lv. 1]
Member [Lv. 1]
Posts : 2
Points : 663
Rep : 0
Join date : 2016-09-29
View user profile

Thanks!!!

on Sun Oct 02, 2016 3:33 am
Thanks!!! That worked! cheers There was a space in between indeed, feel so stupid Embarassed
Back to top
Permissions in this forum:
You cannot reply to topics in this forum