add image, clarification it must be a value type |
m cats |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[File:Inspector With ValueField And ReferenceField.webp|thumb|right|alt=An inspector containing a ValueField<int> and ReferenceField<Slot>.|All "fields" in an inspector are themselves an IField. In this image, the <code>persistent</code>, <code>UpdateOrder</code>, <code>Enabled</code>, and <code>Value</code> fields are of type [[Type:Sync`1|Sync<T>]], which implements IField. <code>Reference</code> is a [[Type:SyncRef`1|SyncRef<Slot>]], which is an IField<RefID>.]] | [[File:Inspector With ValueField And ReferenceField.webp|thumb|right|alt=An inspector containing a ValueField<int> and ReferenceField<Slot>.|All "fields" in an inspector are themselves an IField. In this image, the <code>persistent</code>, <code>UpdateOrder</code>, <code>Enabled</code>, and <code>Value</code> fields are of type [[Type:Sync`1|Sync<T>]], which implements IField. <code>Reference</code> is a [[Type:SyncRef`1|SyncRef<Slot>]], which is an IField<RefID>.]] | ||
The '''IField | The '''IField<T>''' type is an [[Interface Type|Interface Type]] that designates the object it is applied to as something that is a field of type <code>T</code>. This includes anything that is exposed within the [[Scene Inspector]] UI. | ||
In addition to every feature that [[Type:IValue|IValue]] implements, this | As with IValue<T>, IField<T> can in theory hold any type, but is only useful with [[value types]] in the FrooxEngine data model. | ||
In addition to every feature that [[Type:IValue|IValue<T>]] implements, this interface makes things implementing it: | |||
* Have the ability to be [[Drive|driven]]. | * Have the ability to be [[Drive|driven]]. | ||
* Synced by default, requiring a drive to become local. | * Synced by default, requiring a drive to become local. | ||
== Interfaces Implemented == | |||
* [[Type:ISyncMember|ISyncMember]] | |||
** [[Type:IWorldElement|IWorldElement]] | |||
** [[Type:ILinkable|ILinkable]] | |||
* [[Type:IValue`1|IValue<T>]] | |||
** [[Type:IChangeable|IChangeable]] | |||
** [[Type:IInitializable|IInitializable]] | |||
== | == Types Implementing IField<T> == | ||
* [[Type:SyncField`1|SyncField<T>]] | |||
* [[Type:SyncField`1]] | * [[Type:RawOutput`1|RawOutput<T>]] | ||
* | |||
[[Category:Type]] | [[Category:Type]] | ||
[[Category:Reference Types]] |
Latest revision as of 03:36, 10 December 2024
The IField<T> type is an Interface Type that designates the object it is applied to as something that is a field of type T
. This includes anything that is exposed within the Scene Inspector UI.
As with IValue<T>, IField<T> can in theory hold any type, but is only useful with value types in the FrooxEngine data model.
In addition to every feature that IValue<T> implements, this interface makes things implementing it:
- Have the ability to be driven.
- Synced by default, requiring a drive to become local.