Синтаксис:
Используется csharp
using UnityEngine;
using System.Collections;
public class Interface : MonoBehaviour {
public MovieTexture pMove;
void Start () {
renderer.material.mainTexture = pMove;
pMove.Play();
}
}
using System.Collections;
public class Interface : MonoBehaviour {
public MovieTexture pMove;
void Start () {
renderer.material.mainTexture = pMove;
pMove.Play();
}
}
А не получается. Мне выдает такую ошибку.
MissingComponentException: There is no 'Renderer' attached to the "Main Camera" game object, but a script is trying to access it.
You probably need to add a Renderer to the game object "Main Camera". Or your script needs to check if the component is attached before using it.
Interface.Start () (at Assets/Interface.cs:10)
Исходя с текста ошибки, у камеры нет рендера. Но я не пойпу как камере его добавить. Или я вообще не так понял текст ошибки. Помогите пожалуйста.
p.s Скрипт привязан к Камере "Main Camera"