Add support for exporting prop, compatible with the new version, add the EnableRootMotion option (#143)
* update BillboardBuilder * add a new enum value * Add the EnableRootMotion option to support scenarios where the character is not within the camera view * Add support for exporting prop * update * compatible with the new version 2 * update --------- Co-authored-by: 左右看 <1918891542@qq.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
public static class AssetBundleDecryptor
|
||||
{
|
||||
public static byte[] DecryptFileToBytes(string inputFilePath, byte[] Keys)
|
||||
{
|
||||
if (string.IsNullOrEmpty(inputFilePath))
|
||||
throw new ArgumentNullException(nameof(inputFilePath));
|
||||
if (!File.Exists(inputFilePath))
|
||||
throw new FileNotFoundException("Input file not found", inputFilePath);
|
||||
if (Keys == null)
|
||||
throw new ArgumentException("Keys must not be null or empty", nameof(Keys));
|
||||
|
||||
byte[] data = File.ReadAllBytes(inputFilePath);
|
||||
|
||||
if (data.Length <= 256)
|
||||
return data;
|
||||
|
||||
for (int i = 256; i < data.Length; ++i)
|
||||
{
|
||||
data[i] ^= Keys[i % Keys.Length];
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user