public RESULT getUserProperty(string name, out USER_PROPERTY property) { using (StringHelper.ThreadSafeEncoding threadSafeEncoding = StringHelper.GetFreeHelper()) { return(FMOD_Studio_EventDescription_GetUserProperty(handle, threadSafeEncoding.byteFromStringUTF8(name), out property)); } }
public USER_PROPERTY createPublic() { USER_PROPERTY result = default(USER_PROPERTY); result.name = MarshallingHelper.stringFromNativeUtf8(this.name); result.type = this.type; switch (this.type) { case USER_PROPERTY_TYPE.INTEGER: result.intValue = this.value.intValue; break; case USER_PROPERTY_TYPE.BOOLEAN: result.boolValue = this.value.boolValue; break; case USER_PROPERTY_TYPE.FLOAT: result.floatValue = this.value.floatValue; break; case USER_PROPERTY_TYPE.STRING: result.stringValue = MarshallingHelper.stringFromNativeUtf8(this.value.stringValue); break; } return(result); }
public RESULT getUserProperty(string name, out USER_PROPERTY property) { USER_PROPERTY_INTERNAL uSER_PROPERTY_INTERNAL; RESULT rESULT = EventDescription.FMOD_Studio_EventDescription_GetUserProperty(this.rawPtr, Encoding.UTF8.GetBytes(name + '\0'), out uSER_PROPERTY_INTERNAL); if (rESULT != RESULT.OK) { property = default(USER_PROPERTY); return(rESULT); } property = uSER_PROPERTY_INTERNAL.createPublic(); return(RESULT.OK); }
public RESULT getUserPropertyByIndex(int index, out USER_PROPERTY property) { USER_PROPERTY_INTERNAL uSER_PROPERTY_INTERNAL; RESULT rESULT = EventDescription.FMOD_Studio_EventDescription_GetUserPropertyByIndex(this.rawPtr, index, out uSER_PROPERTY_INTERNAL); if (rESULT != RESULT.OK) { property = default(USER_PROPERTY); return(rESULT); } property = uSER_PROPERTY_INTERNAL.createPublic(); return(RESULT.OK); }
public UserProperty(USER_PROPERTY property) : this() { Name = property.name; Type = (UserPropertyType)property.type; switch (Type) { case UserPropertyType.Integer: _value.IntValue = property.intValue; break; case UserPropertyType.Single: _value.FloatValue = property.floatValue; break; case UserPropertyType.Boolean: _value.BoolValue = property.boolValue; break; case UserPropertyType.String: _stringValue = property.stringValue; break; default: throw new ArgumentOutOfRangeException(); } }
// Helper functions public USER_PROPERTY createPublic() { USER_PROPERTY publicProperty = new USER_PROPERTY(); publicProperty.name = MarshallingHelper.stringFromNativeUtf8(name); publicProperty.type = type; switch (type) { case USER_PROPERTY_TYPE.INTEGER: publicProperty.intValue = value.intValue; break; case USER_PROPERTY_TYPE.BOOLEAN: publicProperty.boolValue = value.boolValue; break; case USER_PROPERTY_TYPE.FLOAT: publicProperty.floatValue = value.floatValue; break; case USER_PROPERTY_TYPE.STRING: publicProperty.stringValue = MarshallingHelper.stringFromNativeUtf8(value.stringValue); break; } return publicProperty; }
public RESULT getUserProperty(string name, out USER_PROPERTY property) { USER_PROPERTY_INTERNAL propertyInternal; RESULT result = FMOD_Studio_EventDescription_GetUserProperty( rawPtr, Encoding.UTF8.GetBytes(name + Char.MinValue), out propertyInternal); if (result != RESULT.OK) { property = new USER_PROPERTY(); return result; } property = propertyInternal.createPublic(); return RESULT.OK; }
public RESULT getUserPropertyByIndex(int index, out USER_PROPERTY property) { USER_PROPERTY_INTERNAL propertyInternal; RESULT result = FMOD_Studio_EventDescription_GetUserPropertyByIndex(rawPtr, index, out propertyInternal); if (result != RESULT.OK) { property = new USER_PROPERTY(); return result; } property = propertyInternal.createPublic(); return RESULT.OK; }
public RESULT getUserPropertyByIndex(int index, out USER_PROPERTY property) { return(FMOD_Studio_EventDescription_GetUserPropertyByIndex(handle, index, out property)); }
private static extern RESULT FMOD_Studio_EventDescription_GetUserProperty(IntPtr eventdescription, byte[] name, out USER_PROPERTY property);
private static extern RESULT FMOD_Studio_EventDescription_GetUserPropertyByIndex(IntPtr eventdescription, int index, out USER_PROPERTY property);