Quantcast
Channel: Answers by "Graham-Dunnett"
Viewing all articles
Browse latest Browse all 959

Answer by Graham Dunnett

$
0
0
(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. ;-)

Viewing all articles
Browse latest Browse all 959

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>