2026-03-27 13:07:39 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
|
|
|
|
|
namespace XCEngine
|
|
|
|
|
{
|
|
|
|
|
internal static class InternalCalls
|
|
|
|
|
{
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Debug_Log(string message);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Debug_LogWarning(string message);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Debug_LogError(string message);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern float Time_GetDeltaTime();
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern string GameObject_GetName(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void GameObject_SetName(ulong gameObjectUUID, string name);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern bool GameObject_GetActiveSelf(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern bool GameObject_GetActiveInHierarchy(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void GameObject_SetActive(ulong gameObjectUUID, bool active);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern bool GameObject_HasComponent(ulong gameObjectUUID, Type componentType);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern ulong GameObject_GetComponent(ulong gameObjectUUID, Type componentType);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern bool Behaviour_GetEnabled(ulong scriptComponentUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Behaviour_SetEnabled(ulong scriptComponentUUID, bool enabled);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetLocalPosition(ulong gameObjectUUID, out Vector3 position);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_SetLocalPosition(ulong gameObjectUUID, ref Vector3 position);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetLocalRotation(ulong gameObjectUUID, out Quaternion rotation);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_SetLocalRotation(ulong gameObjectUUID, ref Quaternion rotation);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetLocalScale(ulong gameObjectUUID, out Vector3 scale);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_SetLocalScale(ulong gameObjectUUID, ref Vector3 scale);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetLocalEulerAngles(ulong gameObjectUUID, out Vector3 eulerAngles);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_SetLocalEulerAngles(ulong gameObjectUUID, ref Vector3 eulerAngles);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetPosition(ulong gameObjectUUID, out Vector3 position);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_SetPosition(ulong gameObjectUUID, ref Vector3 position);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetRotation(ulong gameObjectUUID, out Quaternion rotation);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_SetRotation(ulong gameObjectUUID, ref Quaternion rotation);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetScale(ulong gameObjectUUID, out Vector3 scale);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_SetScale(ulong gameObjectUUID, ref Vector3 scale);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetForward(ulong gameObjectUUID, out Vector3 forward);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetRight(ulong gameObjectUUID, out Vector3 right);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_GetUp(ulong gameObjectUUID, out Vector3 up);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_Translate(ulong gameObjectUUID, ref Vector3 translation, int relativeTo);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_Rotate(ulong gameObjectUUID, ref Vector3 eulers, int relativeTo);
|
|
|
|
|
|
2026-03-27 14:39:19 +08:00
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_RotateAxisAngle(ulong gameObjectUUID, ref Vector3 axis, float angle, int relativeTo);
|
|
|
|
|
|
2026-03-27 13:07:39 +08:00
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_LookAt(ulong gameObjectUUID, ref Vector3 target);
|
|
|
|
|
|
2026-03-27 14:39:19 +08:00
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_LookAtWithUp(ulong gameObjectUUID, ref Vector3 target, ref Vector3 up);
|
|
|
|
|
|
2026-03-27 13:07:39 +08:00
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_TransformPoint(ulong gameObjectUUID, ref Vector3 point, out Vector3 transformedPoint);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_InverseTransformPoint(ulong gameObjectUUID, ref Vector3 point, out Vector3 transformedPoint);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_TransformDirection(ulong gameObjectUUID, ref Vector3 direction, out Vector3 transformedDirection);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_InverseTransformDirection(ulong gameObjectUUID, ref Vector3 direction, out Vector3 transformedDirection);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern ulong Transform_GetParent(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Transform_SetParent(ulong gameObjectUUID, ulong parentGameObjectUUID, bool worldPositionStays);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern int Transform_GetChildCount(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern ulong Transform_GetChild(ulong gameObjectUUID, int index);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern float Camera_GetFieldOfView(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Camera_SetFieldOfView(ulong gameObjectUUID, float value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern float Camera_GetNearClipPlane(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Camera_SetNearClipPlane(ulong gameObjectUUID, float value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern float Camera_GetFarClipPlane(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Camera_SetFarClipPlane(ulong gameObjectUUID, float value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern float Camera_GetDepth(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Camera_SetDepth(ulong gameObjectUUID, float value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern bool Camera_GetPrimary(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Camera_SetPrimary(ulong gameObjectUUID, bool value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern float Light_GetIntensity(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Light_SetIntensity(ulong gameObjectUUID, float value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern float Light_GetRange(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Light_SetRange(ulong gameObjectUUID, float value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern float Light_GetSpotAngle(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Light_SetSpotAngle(ulong gameObjectUUID, float value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern bool Light_GetCastsShadows(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void Light_SetCastsShadows(ulong gameObjectUUID, bool value);
|
2026-03-27 14:52:00 +08:00
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern string MeshFilter_GetMeshPath(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void MeshFilter_SetMeshPath(ulong gameObjectUUID, string path);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern int MeshRenderer_GetMaterialCount(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern string MeshRenderer_GetMaterialPath(ulong gameObjectUUID, int index);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void MeshRenderer_SetMaterialPath(ulong gameObjectUUID, int index, string path);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void MeshRenderer_ClearMaterials(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern bool MeshRenderer_GetCastShadows(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void MeshRenderer_SetCastShadows(ulong gameObjectUUID, bool value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern bool MeshRenderer_GetReceiveShadows(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void MeshRenderer_SetReceiveShadows(ulong gameObjectUUID, bool value);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern int MeshRenderer_GetRenderLayer(ulong gameObjectUUID);
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
internal static extern void MeshRenderer_SetRenderLayer(ulong gameObjectUUID, int value);
|
2026-03-27 13:07:39 +08:00
|
|
|
}
|
|
|
|
|
}
|