public NJS_OBJECT ToBasicModel() { List <NJS_OBJECT> newchildren = new List <NJS_OBJECT>(Children.Count); foreach (NJS_OBJECT item in Children) { newchildren.Add(item.ToBasicModel()); } NJS_OBJECT result = new NJS_OBJECT(); if (Attach != null) { result.Attach = Attach.ToBasicModel(); } result.Position = Position; result.Rotation = Rotation; result.Scale = Scale; result.Children = newchildren; return(result); }