解决 Agora Base.cas(7727,26): error CS0117: ‘Buffer’ does not contain a definition for ‘BlockCopy’
遇到该问题
报错处代码如下
感觉是 Unity(2022.3.9f1) 和 Agora SDK(Version 4.2.2)之间的问题
尝试多个版本 SDK 以及 不同版本 Unity 均无果
public byte[] encryptionKdfSalt
{
set { Buffer.BlockCopy(value, 0, encryptionKdfSalt32, 0, 32); }
get { return encryptionKdfSalt32;
}
接改成下述代码
public byte[] encryptionKdfSalt
{
set
{
for(int i = 0; i < 32; i++)
{
encryptionKdfSalt32[i] = value[i];
}
}
get
{
return encryptionKdfSalt32;
}
}