Class ScreenToWorld
Inherited Members
Unity.Entities.SystemBase.CompleteDependency()
Unity.Entities.SystemBase.Update()
Unity.Entities.SystemBase.GetComponent<T>(Unity.Entities.Entity)
Unity.Entities.SystemBase.SetComponent<T>(Unity.Entities.Entity, T)
Unity.Entities.SystemBase.HasComponent<T>(Unity.Entities.Entity)
Unity.Entities.SystemBase.GetComponentDataFromEntity<T>(System.Boolean)
Unity.Entities.SystemBase.GetBuffer<T>(Unity.Entities.Entity)
Unity.Entities.SystemBase.GetBufferFromEntity<T>(System.Boolean)
Unity.Entities.SystemBase.OnCreateForCompiler()
Unity.Entities.SystemBase.Dependency
Unity.Entities.SystemBase.Entities
Unity.Entities.SystemBase.Job
Unity.Entities.ComponentSystemBase.OnCreate()
Unity.Entities.ComponentSystemBase.OnStartRunning()
Unity.Entities.ComponentSystemBase.OnStopRunning()
Unity.Entities.ComponentSystemBase.OnDestroy()
Unity.Entities.ComponentSystemBase.ShouldRunSystem()
Unity.Entities.ComponentSystemBase.GetComponentTypeHandle<T>(System.Boolean)
Unity.Entities.ComponentSystemBase.GetDynamicComponentTypeHandle(Unity.Entities.ComponentType)
Unity.Entities.ComponentSystemBase.GetBufferTypeHandle<T>(System.Boolean)
Unity.Entities.ComponentSystemBase.GetSharedComponentTypeHandle<T>()
Unity.Entities.ComponentSystemBase.GetEntityTypeHandle()
Unity.Entities.ComponentSystemBase.RequireForUpdate(Unity.Entities.EntityQuery)
Unity.Entities.ComponentSystemBase.RequireSingletonForUpdate<T>()
Unity.Entities.ComponentSystemBase.HasSingleton<T>()
Unity.Entities.ComponentSystemBase.GetSingleton<T>()
Unity.Entities.ComponentSystemBase.SetSingleton<T>(T)
Unity.Entities.ComponentSystemBase.GetSingletonEntity<T>()
Unity.Entities.ComponentSystemBase.GetEntityQuery(Unity.Entities.ComponentType[])
Unity.Entities.ComponentSystemBase.GetEntityQuery(Unity.Collections.NativeArray<Unity.Entities.ComponentType>)
Unity.Entities.ComponentSystemBase.GetEntityQuery(Unity.Entities.EntityQueryDesc[])
Unity.Entities.ComponentSystemBase.GetArchetypeChunkComponentType<T>(System.Boolean)
Unity.Entities.ComponentSystemBase.GetArchetypeChunkComponentTypeDynamic(Unity.Entities.ComponentType)
Unity.Entities.ComponentSystemBase.GetArchetypeChunkBufferType<T>(System.Boolean)
Unity.Entities.ComponentSystemBase.GetArchetypeChunkSharedComponentType<T>()
Unity.Entities.ComponentSystemBase.GetArchetypeChunkEntityType()
Unity.Entities.ComponentSystemBase.Enabled
Unity.Entities.ComponentSystemBase.EntityQueries
Unity.Entities.ComponentSystemBase.GlobalSystemVersion
Unity.Entities.ComponentSystemBase.LastSystemVersion
Unity.Entities.ComponentSystemBase.EntityManager
Unity.Entities.ComponentSystemBase.World
Unity.Entities.ComponentSystemBase.Time
Unity.Entities.ComponentSystemBase.ExecutingSystemType
Namespace: Unity.Tiny.Rendering
Syntax
public class ScreenToWorld : SystemBase
Methods
AdjustInputPositionToPixels(float2)
Declaration
public float2 AdjustInputPositionToPixels(float2 inputPos)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float2 | inputPos |
Returns
Type | Description |
---|---|
Unity.Mathematics.float2 |
CameraFromPass(Entity)
Declaration
protected Entity CameraFromPass(Entity ePass)
Parameters
Type | Name | Description |
---|---|---|
Unity.Entities.Entity | ePass |
Returns
Type | Description |
---|---|
Unity.Entities.Entity |
FindCamera(ScreenToWorldId)
Declaration
protected Entity FindCamera(ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Type | Name | Description |
---|---|---|
ScreenToWorldId | id |
Returns
Type | Description |
---|---|
Unity.Entities.Entity |
FindPickRoot(out Entity, out Entity, ScreenToWorldId)
Declaration
protected void FindPickRoot(out Entity eOutPickRoot, out Entity eOutPass, ScreenToWorldId id)
Parameters
Type | Name | Description |
---|---|---|
Unity.Entities.Entity | eOutPickRoot | |
Unity.Entities.Entity | eOutPass | |
ScreenToWorldId | id |
GetWorldSpaceCameraPlane(out float3, out float3, out float3, Single, Entity)
Declaration
public void GetWorldSpaceCameraPlane(out float3 pos, out float3 up, out float3 left, float distanceToCamera, Entity eCam = null)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float3 | pos | |
Unity.Mathematics.float3 | up | |
Unity.Mathematics.float3 | left | |
Single | distanceToCamera | |
Unity.Entities.Entity | eCam |
InputPosToWorldSpacePos(float2, Single, ScreenToWorldId)
Declaration
public float3 InputPosToWorldSpacePos(float2 inputPos, float distanceToCamera, ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float2 | inputPos | |
Single | distanceToCamera | |
ScreenToWorldId | id |
Returns
Type | Description |
---|---|
Unity.Mathematics.float3 |
InputPosToWorldSpaceRay(float2, out float3, out float3, ScreenToWorldId)
Declaration
public void InputPosToWorldSpaceRay(float2 inputPos, out float3 origin, out float3 direction, ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float2 | inputPos | |
Unity.Mathematics.float3 | origin | |
Unity.Mathematics.float3 | direction | |
ScreenToWorldId | id |
IntersectPlaneRay(float3, float3, float3, float3)
Declaration
protected float3 IntersectPlaneRay(float3 planePos, float3 planeNormal, float3 rayOrigin, float3 rayDirection)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float3 | planePos | |
Unity.Mathematics.float3 | planeNormal | |
Unity.Mathematics.float3 | rayOrigin | |
Unity.Mathematics.float3 | rayDirection |
Returns
Type | Description |
---|---|
Unity.Mathematics.float3 |
InversePassTransform(float4, RenderPass)
Declaration
public static float4 InversePassTransform(float4 pos, in RenderPass pass)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float4 | pos | |
RenderPass | pass |
Returns
Type | Description |
---|---|
Unity.Mathematics.float4 |
InverseViewPortTransform(float2, RenderPass)
Declaration
public static float2 InverseViewPortTransform(float2 p, RenderPass pass)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float2 | p | |
RenderPass | pass |
Returns
Type | Description |
---|---|
Unity.Mathematics.float2 |
OnUpdate()
Declaration
protected override void OnUpdate()
Overrides
Unity.Entities.SystemBase.OnUpdate()
PassTransform(float4, RenderPass)
Declaration
public static float4 PassTransform(float4 pos, in RenderPass pass)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float4 | pos | |
RenderPass | pass |
Returns
Type | Description |
---|---|
Unity.Mathematics.float4 |
ScreenSpaceToWorldSpace(float2, Single, ScreenToWorldId)
Declaration
public float3 ScreenSpaceToWorldSpace(float2 screenPos, float normalizedZ, ScreenToWorldId id)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float2 | screenPos | |
Single | normalizedZ | |
ScreenToWorldId | id |
Returns
Type | Description |
---|---|
Unity.Mathematics.float3 |
ScreenSpaceToWorldSpacePos(float2, Single, ScreenToWorldId)
Declaration
public float3 ScreenSpaceToWorldSpacePos(float2 screenPos, float distanceToCamera, ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float2 | screenPos | |
Single | distanceToCamera | |
ScreenToWorldId | id |
Returns
Type | Description |
---|---|
Unity.Mathematics.float3 |
ScreenSpaceToWorldSpaceRay(float2, out float3, out float3, ScreenToWorldId)
Declaration
public void ScreenSpaceToWorldSpaceRay(float2 screenPos, out float3 origin, out float3 direction, ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float2 | screenPos | |
Unity.Mathematics.float3 | origin | |
Unity.Mathematics.float3 | direction | |
ScreenToWorldId | id |
ViewPortTransform(float2, RenderPass)
Declaration
public static float2 ViewPortTransform(float2 p, RenderPass pass)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float2 | p | |
RenderPass | pass |
Returns
Type | Description |
---|---|
Unity.Mathematics.float2 |
WorldSpaceToScreenSpace(float3, ScreenToWorldId)
Declaration
public float3 WorldSpaceToScreenSpace(float3 worldPos, ScreenToWorldId id)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float3 | worldPos | |
ScreenToWorldId | id |
Returns
Type | Description |
---|---|
Unity.Mathematics.float3 |