mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Remove mono from Glue functions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics.SymbolStore;
|
||||
using System;
|
||||
using System.Diagnostics.SymbolStore;
|
||||
using GlitchyEngine.Core;
|
||||
using GlitchyEngine.Math;
|
||||
|
||||
@@ -22,7 +23,7 @@ public class Material : Asset
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
ScriptGlue.Material_SetVariable(_uuid, name, ShaderVariableType.Float, 1, 4, 1, &value, sizeof(float4));
|
||||
ScriptGlue.Material_SetVariable(_uuid, name, ShaderVariableType.Float, 1, 4, 1, (IntPtr)(void*)&value, sizeof(float4));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,20 @@ public class SpriteRenderer : Component
|
||||
{
|
||||
get
|
||||
{
|
||||
ScriptGlue.SpriteRenderer_GetUvTransform(_uuid, out UVTransform uvTransform);
|
||||
return uvTransform;
|
||||
unsafe
|
||||
{
|
||||
// TODO: Is this a type we want to have in the engine?
|
||||
ScriptGlue.SpriteRenderer_GetUvTransform(_uuid, out float4 uvTransform);
|
||||
return *(UVTransform*)&uvTransform;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
ScriptGlue.SpriteRenderer_SetUvTransform(_uuid, *(float4*)&value);
|
||||
}
|
||||
}
|
||||
set => ScriptGlue.SpriteRenderer_SetUvTransform(_uuid, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user