示例#1
0
        private void InitInternalResourceVersions()
        {
            if (m_AssetBundleBuilder == null)
            {
                return;
            }

            foreach (var platformConfig in m_AssetBundleBuilder.Config.PlatformConfigs)
            {
                m_InternalResourceVersions[platformConfig.TargetPlatform] =
                    AssetBundleBuilder.GetInternalResourceVersion(PlayerSettings.bundleVersion, platformConfig.TargetPlatform);
            }
        }
示例#2
0
            public Logger(AssetBundleBuilder assetBundleBuilder)
            {
                var prevPath = Path.Combine(assetBundleBuilder.LogDirectory, PreviousLogFileName);
                var curPath  = Path.Combine(assetBundleBuilder.LogDirectory, CurrentLogFileName);

                if (File.Exists(prevPath))
                {
                    File.Delete(prevPath);
                }

                if (File.Exists(curPath))
                {
                    File.Move(curPath, prevPath);
                }

                m_Writer = new FileInfo(curPath).CreateText();
            }
示例#3
0
        private void DrawInternalResourceVersion(AssetBundleBuilderConfig.PlatformConfig platformConfig)
        {
            var internalResourceVersion    = m_InternalResourceVersions[platformConfig.TargetPlatform];
            var newInternalResourceVersion = EditorGUILayout.DelayedIntField(internalResourceVersion,
                                                                             GUILayout.Width(InternalResourceVersionColumnWidth));

            if (newInternalResourceVersion != internalResourceVersion)
            {
                if (newInternalResourceVersion <= 0)
                {
                    EditorUtility.DisplayDialog(titleContent.text, "Illegal internal resource version.", "Okay");
                }
                else
                {
                    m_InternalResourceVersions[platformConfig.TargetPlatform] = newInternalResourceVersion;
                    AssetBundleBuilder.SetInternalResourceVersion(PlayerSettings.bundleVersion,
                                                                  platformConfig.TargetPlatform, newInternalResourceVersion);
                }
            }
        }
示例#4
0
 public OutputGeneratorBase(AssetBundleBuilder builder, string generatorDirectoryName)
 {
     m_Builder = builder;
     GeneratorDirectoryName = generatorDirectoryName;
 }
示例#5
0
 public OutputGeneratorInstaller(AssetBundleBuilder builder,
                                 string generatorDirectoryName, bool considerDontPackFlag) : base(builder, generatorDirectoryName)
 {
     m_ConsiderDontPackFlag = considerDontPackFlag;
 }
 public OutputGeneratorRemote(AssetBundleBuilder builder, string generatorDirectoryName)
     : base(builder, generatorDirectoryName)
 {
     // Empty.
 }
示例#7
0
 private void OnEnable()
 {
     m_AssetBundleBuilder = new AssetBundleBuilder();
     InitInternalResourceVersions();
 }
示例#8
0
        public static void Open(AssetBundleBuilder assetBundleBuilder = null)
        {
            var window = GetWindow <AssetBundleBuilderEditorWindow>(true, "Asset Bundle Builder");

            window.minSize = new Vector2(240f, 360f);
        }