I have a jagged list which contains(or should contain) multiple value types, GameObject,int,bool…and whatever else i might throw in there. Im having a tough time with the C# version of the script as i am a noob with this language. The UnityScript version works perfectly, but my conversion has been going slow thanks to this current problem.
error CS1503: Argument #1' cannot convert
bool’ expression to type `UnityEngine.Object’
error CS1503: Argument #1' cannot convert
int’ expression to type `UnityEngine.Object’
To my understanding i should be able to add an int and bool to an Object List, maybe theres a special way to do it in C#?? Heres my Jagged List
var jaggedList = new List<List<Object> >();
foreach(var ship in ships)
{
jaggedList.Add( new List<Object>() );
}
for(int i=0;i<jaggedList.Count;i++)
{
var sh=ships*;*
var aiPrimary=sh.GetComponent<AI_Primary>();
jaggedList*.Add(sh); // GO*
jaggedList*.Add(aiPrimary.friendly); // bool*
jaggedList*.Add(aiPrimary.unitID); // int*
}
Thanks in advance!