- Home /
Help: foreach loop in c#
Im a c# beginner and I need help to understand this foreach loop:
foreach(MoveInfo move in myInfo.moves)
{
}
there is an access to:
public class MoveInfo: ScriptableObject {
public MoveInfo[] move = new MoveInfo[0];}
public CharacterInfo myInfo;
public MoveSetData[] moves = new MoveSetData[0];
The errormessage I get is: Cannot convert type MoveSetData' to
MoveInfo'
Comment
Your answer
Follow this Question
Related Questions
How to set a value for each level without using a switch statement 2 Answers
Is there a way to organize tracking of collisions? 0 Answers
[C#] Calling Interface from Array of MonoBehaviour 2 Answers
Foreach - what am I doing wrong? 1 Answer
Getting all objects with a tag and inserting them into an array of gameobject 1 Answer