public static PrefabFactory FromBaseObject(BaseObject baseObj)
                {
                    if (baseObj == null || baseObj.NativeObject == IntPtr.Zero)
                    {
                        return(null);
                    }
                    PrefabFactory obj = baseObj as  PrefabFactory;

                    if (object.Equals(obj, null))
                    {
                        obj = new PrefabFactory(CreatedWhenConstruct.CWC_NotToCreate);
                        obj.BindNativeObject(baseObj.NativeObject, "CPrefabFactory");
                        obj.IncreaseCast();
                    }

                    return(obj);
                }