您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
30 行
822 B
30 行
822 B
#import <Foundation/Foundation.h>
|
|
|
|
int UnityMC_NSData_getLength(void* self)
|
|
{
|
|
NSData* data = (__bridge NSData*)self;
|
|
return (int)data.length;
|
|
}
|
|
|
|
void* UnityMC_NSData_createWithBytes(void* bytes, int length)
|
|
{
|
|
NSData* data = [[NSData alloc] initWithBytes:bytes
|
|
length:length];
|
|
|
|
return (__bridge_retained void*)data;
|
|
}
|
|
|
|
void* UnityMC_NSData_createWithBytesNoCopy(void* bytes, int length, bool freeWhenDone)
|
|
{
|
|
NSData* data = [[NSData alloc] initWithBytesNoCopy:bytes
|
|
length:length
|
|
freeWhenDone:freeWhenDone];
|
|
|
|
return (__bridge_retained void*)data;
|
|
}
|
|
|
|
const void* UnityMC_NSData_getBytes(void* self)
|
|
{
|
|
NSData* data = (__bridge NSData*)self;
|
|
return data.bytes;
|
|
}
|