(Sometimes it's easier to just try it, rather than interpret what people mean, or guess their level of experience.)
using UnityEngine;
using System;
public class argl : MonoBehaviour {
void doit(__arglist)
{
ArgIterator ai = new ArgIterator(__arglist);
while(ai.GetRemainingCount() > 0)
{
TypedReference tr = ai.GetNextArg();
Debug.Log(TypedReference.ToObject(tr));
}
}
// Use this for initialization
void Start () {
doit(__arglist("hello", 42, 123.4f));
}
}
Consoles shows:
hello
UnityEngine.Debug:Internal_Log(Int32, String, Object)
42
UnityEngine.Debug:Internal_Log(Int32, String, Object)
123.4
UnityEngine.Debug:Internal_Log(Int32, String, Object)
So I think we can say Unity supports at least `__arglist`. Question is then why anyone would want this in their game code. ;-)
↧