mrnee
1
GameObject.Find(“Main Camera”).GetComponent(“PreScore”).fours+=1;
but
GameObject.Find("Main Camera").GetComponent("PreScore").fours++;
returns error BCE0049: Expression ‘GameObject.Find(“Main Camera”).GetComponent(“PreScore”).fours’ cannot be assigned to. Why?
I believe Berenger is right
I think the reason is because in the really long task you basically end up with a reference of a variable with which the += can then change.
but because its more of a reference than an actual variable you cant use the ++
now I bet that if you set that look up task to a variable then tried using ++ it would work
Im HORRIBLE with the technical jargon
but +=is like a real operation
where as ++ is more exclusive