mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Allow resetting material variable
This commit is contained in:
@@ -15,4 +15,9 @@ public class Material : Asset
|
||||
ScriptGlue.Material_SetVariable(_uuid, name, ScriptGlue.ShaderVariableType.Float, 1, 4, 1, &value, sizeof(float4));
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetVariable(string name)
|
||||
{
|
||||
ScriptGlue.Material_ResetVariable(_uuid, name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,7 +399,10 @@ internal static class ScriptGlue
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern unsafe bool Material_SetVariable(UUID assetId, String variableName, ShaderVariableType elementType, int rows, int columns, int arrayLength, void* rawData, int dataLength);
|
||||
internal static extern unsafe bool Material_SetVariable(UUID assetId, string variableName, ShaderVariableType elementType, int rows, int columns, int arrayLength, void* rawData, int dataLength);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern bool Material_ResetVariable(UUID assetId, string variableName);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user