FairyGUI.UIObjectFactory.SetPackageItemExtension C# (CSharp) Method

SetPackageItemExtension() public static method

public static SetPackageItemExtension ( string url, System type ) : void
url string
type System
return void
        public static void SetPackageItemExtension(string url, System.Type type)
        {
            packageItemExtensions[url.Substring(5)] = type.GetConstructor(System.Type.EmptyTypes);
        }

Usage Example

Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="url"></param>
 /// <param name="luaClass"></param>
 public static void SetExtension(string url, System.Type baseType, LuaFunction extendFunction)
 {
     UIObjectFactory.SetPackageItemExtension(url, () => {
         GComponent gcom = (GComponent)Activator.CreateInstance(baseType);
         gcom.data       = extendFunction;
         return(gcom);
     });
 }
All Usage Examples Of FairyGUI.UIObjectFactory::SetPackageItemExtension