Пример #1
0
        protected void LoadResources <T>(Collection <VirtualResource> resources, SystemManifest manifest) where T : OfficeWorkerDetail
        {
            // Iterate through each resource and create the office worker process
            foreach (var resource in resources)
            {
                // First determine if the resource already exists in the Resource collection.  If not, then
                // have VirtualResource create it, then update it with other data and add it to the list.
                var detail = manifest.Resources.GetResource <T>(resource.VirtualResourceId);
                if (detail == null)
                {
                    detail = (T)CreateDetail(resource);
                    detail.OfficeWorkerCount = ResourcePacker.TotalResourceCount(ResourceType);
                    detail.StartIndex        = ManifestAgent.UserAccounts.StartIndex(((OfficeWorker)resource).UserPool);
                    detail.UserNameFormat    = ManifestAgent.UserAccounts.UserFormat(((OfficeWorker)resource).UserPool);
                    detail.CommandPortOffset = 40000;
                    manifest.Resources.Add(detail);
                }

                // Get the next credential and add it to the OW definition
                OfficeWorkerCredential credential = AddCredential(resource, detail);
                detail.UserCredentials.Add(credential);

                // Add any external credentials associated with the OW credential
                AddExternalCredentials(credential, detail);
            }
        }
Пример #2
0
    static void BuildSub()
    {
        PackProject pp = new PackProject();

        pp.pack.Add("test/*.prefab");

        var ap = new ResourcePacker();

        ap.namePattern = PackNamePattern.Hash;

        ap.Pack(pp, "../release/android/update",
                BuildAssetBundleOptions.UncompressedAssetBundle,
                BuildTarget.StandaloneOSXUniversal
                );

        ap.GenerateResourceTable("../release/android/update/resourceTable.json");
    }