GObject CreateObject(PackageItem item, System.Type userClass) { Stats.LatestObjectCreation = 0; Stats.LatestGraphicsCreation = 0; GetItemAsset(item); GObject g = null; if (item.type == PackageItemType.Component) { if (userClass != null) g = (GComponent)userClass.Assembly.CreateInstance(userClass.FullName); else g = UIObjectFactory.NewObject(item); } else g = UIObjectFactory.NewObject(item); if (g == null) return null; _constructing++; g.packageItem = item; g.ConstructFromResource(); _constructing--; return g; }
internal GObject CreateObject(PackageItem item, System.Type userClass) { GObject g = null; if (item.type == PackageItemType.Component) { if (userClass != null) { g = (GComponent)userClass.Assembly.CreateInstance(userClass.FullName); } else { g = UIObjectFactory.NewObject(item); } } else { g = UIObjectFactory.NewObject(item); } if (g == null) { return(null); } _constructing++; g.ConstructFromResource(item); _constructing--; return(g); }
GObject CreateObject(PackageItem item, System.Type userClass) { Stats.LatestObjectCreation = 0; Stats.LatestGraphicsCreation = 0; GetItemAsset(item); GObject g = null; if (item.type == PackageItemType.Component) { if (userClass != null) { g = (GComponent)Activator.CreateInstance(userClass); } else { g = UIObjectFactory.NewObject(item); } } else { g = UIObjectFactory.NewObject(item); } if (g == null) { return(null); } _constructing++; g.packageItem = item; g.ConstructFromResource(); _constructing--; return(g); }