static private void BuildAssetBundle(BuildTarget buildTarget) { var abDirInfo = AssetBundleDirInfo.LoadAssetBundleDirInfo(); ms_ResourceSetting = Resources.Load <ResourceSetting>("ResSetting"); string sOutputPath = GetOutputDir(buildTarget); if (!Directory.Exists(sOutputPath)) { Directory.CreateDirectory(sOutputPath); } AssetBundleBuild[] assetBundleBuilds = abDirInfo.GetAssetBundleBuilds(ms_ResourceSetting.ResourcePath); AssetBundleManifest assetBundleManifest = BuildPipeline.BuildAssetBundles(sOutputPath, assetBundleBuilds, BuildAssetBundleOptions.ChunkBasedCompression, buildTarget); if (assetBundleManifest != null) { CreateFileList(buildTarget, assetBundleBuilds); AssetDatabase.Refresh(); Debug.Log("Build assetbundle successed."); } else { Debug.LogError("Build assetbundle failed."); } }
public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus) { RegistApi(); bus.Send(new NHRegisterEventMessage(typeof(IMemberShipFactory), typeof(MemberShipFactory))); //send the init data bus.Send(new MemberShipData()); ResourceSetting.Registry(); context.MapRoute( AreaName + "_images", AreaRoutePrefix + "/images/{resourceName}", new { controller = "OrnamentEmbeddedResource", action = "Index", resourcePath = "images" }, new[] { "Ornament.Web.Controllers" } ); //MemberShips/User/Edit/admin context.MapRoute(AreaName + "_EditUser", AreaName + "/User/Edit/{loginId}", new { action = "Edit", loginId = UrlParameter.Optional, controller = "User" } ); context.MapRoute( AreaName + "_AssingUser", AreaName + "/User/Assign/{loginId}", new { action = "Assign", loginId = UrlParameter.Optional, controller = "User" }, new[] { "Ornament.MemberShip.Plugin.Areas.MemberShips.Controllers" } ); context.MapRoute( AreaName + "_default", AreaName + "/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, new[] { "Ornament.MemberShip.Plugin.Areas.MemberShips.Controllers" } ); var helper = new AreaRegistrationHelper(this, context); helper.RegistSeajsModule("Scripts/User"); helper.RegistSeajsModule("Scripts/Org"); helper.RegistSeajsModule("Scripts/Role"); helper.RegistSeajsModule("Scripts/Share"); helper.RegistSeajsModule("Scripts/Permissions"); base.RegisterArea(context, bus); }
static void CreateGameSetting() { ResourceSetting resourceSetting = Resources.Load <ResourceSetting>("ResSetting"); if (resourceSetting == null) { return; } GameSetting gameSetting = ScriptableObject.CreateInstance <GameSetting>(); string sPath = StringUtils.PathCombine(resourceSetting.ResourcePath, "GameSetting.asset"); AssetDatabase.CreateAsset(gameSetting, sPath); resourceSetting = null; }
void LoadResSetting(string sResSetting) { ResourceSetting = Resources.Load <ResourceSetting>(sResSetting); }
private void Awake() { m_ResourceSetting = AssetDatabase.LoadAssetAtPath <ResourceSetting>("Assets/Resources/ResSetting.asset"); m_So = new SerializedObject(m_ResourceSetting); }
static void CreateResourceSetting() { ResourceSetting gameSetting = ScriptableObject.CreateInstance <ResourceSetting>(); AssetDatabase.CreateAsset(gameSetting, "Assets/Resources/ResSetting.asset"); }