Hello
Ihave this scriptt
I think the syntax is good but i have this message
“The left-hand side of an assignment must be a variable, a property or an indexer”
line 28 and 54 for PROJET ?!
What’s wrong
public class test : MonoBehaviour
{
public Camera cameraIntro;
public AudioClip musique;
public float duree;
public GameObject [] objetsIntro;
//public Camera cameraPrincipale;
public GameObject PROJET;
public List<Renderer> moviePlayers;
IEnumerator Start ()
{
foreach (Renderer r in moviePlayers)
r.enabled = false;
foreach (GameObject g in objetsIntro)
g.SetActive (true);
cameraIntro.enabled = true;
//cameraPrincipale.enabled = false;
PROJET.SetActive = false;
AudioSource.PlayClipAtPoint (musique, Vector3.zero);
yield return new WaitForSeconds (duree == 0 ? musique.length : duree);
foreach (GameObject g in objetsIntro)
g.SetActive (false);
foreach (Renderer r in moviePlayers)
{
MovieTexture m = ((MovieTexture) r.material.mainTexture);
if (m)
{
m.Stop ();
while (!m.isReadyToPlay)
yield return new WaitForSeconds (0.1f);
r.enabled = true;
m.Play ();
yield return new WaitForSeconds (m.duration);
m.Stop ();
r.enabled = false;
}
}
//cameraPrincipale.enabled = true;
cameraIntro.enabled = false;
PROJET.SetActive = true;
}
}