예제 #1
0
        public static EmbedRequest Embed(string packageName)
        {
            long operationId;
            var  status = NativeClient.Embed(out operationId, packageName);

            return(new EmbedRequest(operationId, status));
        }
예제 #2
0
        public static EmbedRequest Embed(string packageName)
        {
            var packageInfo = PackageInfo.GetAll().FirstOrDefault(p => p.name == packageName);

            if (packageInfo == null)
            {
                throw new InvalidOperationException($"Cannot embed package [{packageName}] because it is not registered in the Asset Database.");
            }

            Debug.Assert(packageInfo.entitlements.isAllowed, "Expected [entitlements.isAllowed] flag to be true.");

            long operationId;
            var  status = NativeClient.Embed(out operationId, packageName);

            return(new EmbedRequest(operationId, status));
        }