- Home /
Question by
arthurconnor100 · Oct 13, 2018 at 09:07 PM ·
listparametersconstructor
Getting Parameters of a Constructor
I am trying to add the assigned parameters of a constructor to a list inside a list.
public class assignCells
{
List<List<Vector3>> Cells = new List<List<Vector3>>();
public assignCells(Vector3 bottom, Vector3 top, Vector3 right, Vector3 left)
{
Type Parm = typeof(assignCells);
Type[] VC = new Type[3];
VC[0] = typeof(Vector3);
VC[1] = typeof(Vector3);
VC[2] = typeof(Vector3);
VC[3] = typeof(Vector3);
ConstructorInfo Constructbase = Parm.GetConstructor(VC);
if (top.x == bottom.x + 20.0 && right.x == left.x + 50.0)
{
Cells.Add(Constructbase.GetParameters());
}
}
}
This code, however, does not work. The last line just says it can't convert from parameter info to a list of vectors. I would really appreciate any help.
Comment
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Function is being called even when not told to 2 Answers
Create parameters on audioSource 2 Answers
function arguments list...? 2 Answers
Handling multiple tags 1 Answer