ProtoFlux:Unbox: Difference between revisions

From Resonite Wiki
Added visuals and descriptors, slightly updated description of node.
rework
Line 12: Line 12:
|}}
|}}


The <code>Unbox</code> node allows casting an input [[Type:Object|Object (Type)]] to a certain [[Type:Value|ValueType]]. Only works if the input Object is actually storing an instance of ValueType.
The '''Unbox&lt;T&gt;''' node converts a boxed [[Type:object|object]] back into its underlying [[value type]].


== Inputs ==
== Inputs ==
Line 18: Line 18:
=== Input ([[Type:Object|Object (Type)]]) ===
=== Input ([[Type:Object|Object (Type)]]) ===


The object we want to unbox.
The object to unbox.


== Outputs ==
== Outputs ==
Line 24: Line 24:
=== * (Generic) ===
=== * (Generic) ===


The unboxed object value of some value type.
The unboxed value of the object.
{{Stub}}
 
== See also ==
 
* [[ProtoFlux:Box]] for boxing value types into objects
* [https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/types/boxing-and-unboxing Microsoft documentation on C# boxing and unboxing]


[[Category:ProtoFlux:Core]]
[[Category:ProtoFlux:Core]]

Revision as of 16:23, 18 April 2025

Unbox
Input
*
Core

The Unbox<T> node converts a boxed object back into its underlying value type.

Inputs

Input (Object (Type))

The object to unbox.

Outputs

* (Generic)

The unboxed value of the object.

See also