docs: sync rendering pass execution docs
This commit is contained in:
@@ -110,6 +110,7 @@ set(XCENGINE_GAME_SCRIPT_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GameScripts/MeshComponentProbe.cs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GameScripts/MeshRendererEdgeCaseProbe.cs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GameScripts/ObjectApiProbe.cs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GameScripts/TagLayerProbe.cs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GameScripts/TickLogProbe.cs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GameScripts/TransformConversionProbe.cs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GameScripts/TransformMotionProbe.cs
|
||||
|
||||
35
managed/GameScripts/TagLayerProbe.cs
Normal file
35
managed/GameScripts/TagLayerProbe.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using XCEngine;
|
||||
|
||||
namespace Gameplay
|
||||
{
|
||||
public sealed class TagLayerProbe : MonoBehaviour
|
||||
{
|
||||
public string ObservedInitialTag = string.Empty;
|
||||
public int ObservedInitialLayer = -1;
|
||||
public bool ObservedInitialCompareTag;
|
||||
public bool ObservedGameObjectRouteMatches;
|
||||
public string ObservedUpdatedTag = string.Empty;
|
||||
public int ObservedUpdatedLayer = -1;
|
||||
public bool ObservedUpdatedCompareTag;
|
||||
public bool ObservedOriginalTagRejected;
|
||||
public bool ObservedEmptyTagRejected;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
ObservedInitialTag = tag;
|
||||
ObservedInitialLayer = layer;
|
||||
ObservedInitialCompareTag = CompareTag("Enemy");
|
||||
ObservedGameObjectRouteMatches = gameObject.tag == tag
|
||||
&& gameObject.layer == layer;
|
||||
|
||||
tag = "Player";
|
||||
layer = 33;
|
||||
|
||||
ObservedUpdatedTag = gameObject.tag;
|
||||
ObservedUpdatedLayer = gameObject.layer;
|
||||
ObservedUpdatedCompareTag = gameObject.CompareTag("Player");
|
||||
ObservedOriginalTagRejected = !CompareTag("Enemy");
|
||||
ObservedEmptyTagRejected = !CompareTag(string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,30 @@ namespace XCEngine
|
||||
public Transform Transform => GameObject.Transform;
|
||||
public Transform transform => Transform;
|
||||
|
||||
public string Tag
|
||||
{
|
||||
get => GameObject.tag;
|
||||
set => GameObject.tag = value;
|
||||
}
|
||||
|
||||
public string tag
|
||||
{
|
||||
get => Tag;
|
||||
set => Tag = value;
|
||||
}
|
||||
|
||||
public int Layer
|
||||
{
|
||||
get => GameObject.layer;
|
||||
set => GameObject.layer = value;
|
||||
}
|
||||
|
||||
public int layer
|
||||
{
|
||||
get => Layer;
|
||||
set => Layer = value;
|
||||
}
|
||||
|
||||
public bool HasComponent<T>() where T : Component
|
||||
{
|
||||
return GameObject.HasComponent<T>();
|
||||
@@ -60,6 +84,11 @@ namespace XCEngine
|
||||
return component != null;
|
||||
}
|
||||
|
||||
public bool CompareTag(string tag)
|
||||
{
|
||||
return GameObject.CompareTag(tag);
|
||||
}
|
||||
|
||||
internal static T Create<T>(ulong gameObjectUUID) where T : Component
|
||||
{
|
||||
return Create(typeof(T), gameObjectUUID) as T;
|
||||
|
||||
@@ -40,6 +40,30 @@ namespace XCEngine
|
||||
set => Name = value;
|
||||
}
|
||||
|
||||
public string Tag
|
||||
{
|
||||
get => InternalCalls.GameObject_GetTag(UUID) ?? string.Empty;
|
||||
set => InternalCalls.GameObject_SetTag(UUID, value ?? string.Empty);
|
||||
}
|
||||
|
||||
public string tag
|
||||
{
|
||||
get => Tag;
|
||||
set => Tag = value;
|
||||
}
|
||||
|
||||
public int Layer
|
||||
{
|
||||
get => InternalCalls.GameObject_GetLayer(UUID);
|
||||
set => InternalCalls.GameObject_SetLayer(UUID, value);
|
||||
}
|
||||
|
||||
public int layer
|
||||
{
|
||||
get => Layer;
|
||||
set => Layer = value;
|
||||
}
|
||||
|
||||
public bool activeSelf => InternalCalls.GameObject_GetActiveSelf(UUID);
|
||||
|
||||
public bool activeInHierarchy => InternalCalls.GameObject_GetActiveInHierarchy(UUID);
|
||||
@@ -54,6 +78,11 @@ namespace XCEngine
|
||||
InternalCalls.GameObject_Destroy(UUID);
|
||||
}
|
||||
|
||||
public bool CompareTag(string tag)
|
||||
{
|
||||
return InternalCalls.GameObject_CompareTag(UUID, tag ?? string.Empty);
|
||||
}
|
||||
|
||||
public Transform Transform => GetComponent<Transform>();
|
||||
public Transform transform => Transform;
|
||||
|
||||
|
||||
@@ -71,6 +71,21 @@ namespace XCEngine
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void GameObject_SetName(ulong gameObjectUUID, string name);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern string GameObject_GetTag(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void GameObject_SetTag(ulong gameObjectUUID, string tag);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern bool GameObject_CompareTag(ulong gameObjectUUID, string tag);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern int GameObject_GetLayer(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void GameObject_SetLayer(ulong gameObjectUUID, int layer);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern bool GameObject_GetActiveSelf(ulong gameObjectUUID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user