Skip to content

Component list

The components you can write on a GameObject in MoCHI. Attribute names and default values are taken from components added with AddComponent in Unity 2022.3.22f1.

There are 147 components, in 7 categories.

CategoryNumberComponent
Physics components14BoxCollider・CapsuleCollider・CharacterJoint・Cloth・ConfigurableJoint・ConstantForce・FixedJoint・HingeJoint・MeshCollider・Rigidbody・SphereCollider・SpringJoint・TerrainCollider・WheelCollider
Rendering components33BillboardRenderer・Camera・FlareLayer・Halo・LODGroup・LensFlare・Light・LightProbeGroup・LightProbeProxyVolume・LineRenderer・MeshFilter・MeshRenderer・OcclusionArea・OcclusionPortal・ParticleSystem・ParticleSystemForceField・ParticleSystemRenderer・PostProcessDebug・PostProcessLayer・PostProcessVolume・Projector・ReflectionProbe・SkinnedMeshRenderer・Skybox・SortingGroup・SpriteMask・SpriteRenderer・Terrain・TextMesh・Tilemap・TilemapRenderer・TrailRenderer・Tree
Audio components9AudioChorusFilter・AudioDistortionFilter・AudioEchoFilter・AudioHighPassFilter・AudioListener・AudioLowPassFilter・AudioReverbFilter・AudioReverbZone・AudioSource
UI components34AspectRatioFitter・BaseInput・Button・Canvas・CanvasGroup・CanvasRenderer・CanvasScaler・ContentSizeFitter・Dropdown・EventSystem・EventTrigger・GraphicRaycaster・GridLayoutGroup・HorizontalLayoutGroup・Image・InputField・LayoutElement・Mask・Outline・PhysicsRaycaster・PositionAsUV1・RawImage・RectMask2D・ScrollRect・Scrollbar・Selectable・Shadow・Slider・StandaloneInputModule・Text・Toggle・ToggleGroup・TouchInputModule・VerticalLayoutGroup
TextMeshPro components8TMP_Dropdown・TMP_InputField・TMP_ScrollbarEventHandler・TMP_SelectionCaret・TMP_SpriteAnimator・TextContainer・TextMeshPro・TextMeshProUGUI
VRChat components36ONSPAudioSource・VRCAVProVideoPlayer・VRCAVProVideoScreen・VRCAVProVideoSpeaker・VRCAimConstraint・VRCAvatarPedestal・VRCCameraDollyAnimation・VRCCameraDollyPath・VRCCameraDollyPathPoint・VRCContactReceiver・VRCContactSender・VRCEnablePersistence・VRCInputFieldKeyboardOverride・VRCLookAtConstraint・VRCMidiListener・VRCMidiPlayer・VRCMirrorReflection・VRCObjectPool・VRCObjectSync・VRCParentConstraint・VRCPhysBone・VRCPhysBoneCollider・VRCPhysBoneRoot・VRCPickup・VRCPlayerObject・VRCPortalMarker・VRCPositionConstraint・VRCRotationConstraint・VRCScaleConstraint・VRCSceneDescriptor・VRCSpatialAudioSource・VRCStation・VRCUiShape・VRCUnityVideoPlayer・VRCUrlInputField・VRCVisualDamage
Other components13AimConstraint・Animator・LookAtConstraint・NavMeshAgent・NavMeshObstacle・OffMeshLink・ParentConstraint・PlayableDirector・PositionConstraint・RotationConstraint・ScaleConstraint・VideoPlayer・WindZone

Write a component as a tag directly inside an element that makes a GameObject (Component tags).

Assets/Example/Kiosk.mochi.xml
<Kiosk prefab="true">
<Object name="Counter" position="0 0.5 0" static="batching lighting">
<MeshFilter mesh="builtin:Cube"/>
<MeshRenderer material="builtin:Default-Material" shadowCastingMode="TwoSided" receiveShadows="false"/>
<BoxCollider size="1 1 1" center="0 0 0" isTrigger="false"/>
</Object>
<Object name="Lamp" position="0 2 0">
<Light type="Spot" color="#FFE6CC" intensity="2.5" range="6" spotAngle="45" shadows="Soft" lightmapBakeType="Baked"/>
</Object>
<Object name="Speaker">
<AudioSource playOnAwake="false" volume="0.5" loop="true" spatialBlend="1" minDistance="1" maxDistance="20"/>
</Object>
</Kiosk>
Attribute nameThe C# property name. A value with no matching property uses the name of the field Unity saves, without m_
An attribute you don’t writeKeeps the value it has when added with Unity’s AddComponent
fontAsset of TextMeshProUnless fontSharedMaterial is written, the material becomes that font asset’s own material too
Components added automaticallyComponents that Unity adds along with it through RequireComponent are added even if you don’t write them. If you write one, that one is used
Values that change togetherMoCHI changes the values Unity changes together. For example, writing centerOfMass on a Rigidbody sets automaticCenterOfMass to false, and writing a reverb value sets reverbPreset to User
Values out of rangeA value Unity would move into its range when loading gives MOCHI1009 (if AudioSource’s volume were 1.5, Unity would make it 1). The ranges are in the values column of each attribute table. A range that depends on another attribute (Slider’s value between minValue and maxValue) is not checked
UI componentsThe GameObject you write it on gets a RectTransform (GameObjects with a RectTransform)
SyntaxInside the component element, list child elements named after the C# struct. Attributes are the C# field names, and the order written is the array order
When not writtenThe default array stays. Writing even one replaces it with what is written
Attributes that point to objectsA path to an object in the same prefab (References inside the same prefab). Separate renderers with ;
ParentConstraint offsetsWrite as many translationOffsets and rotationOffsets as <ConstraintSource>. If not written, they are that many 0 0 0
weight of <ConstraintSource>1 if not written (the same as adding one in the Inspector)
<LOD>At most 8. Make screenRelativeHeight smaller in each later <LOD>
The count of <Burst>Write either count, or minCount and maxCount together. MoCHI writes emissionModule.burstCount, so don’t write it
Components inside a placed prefabAlso works when changing an existing component (directly under <Prefab> or <At>). An array you write replaces the placed prefab’s own array as a whole
Value that changes at runtimeNot supported yet (MOCHI9001)
ComponentChild elementAttributes
AimConstraint<ConstraintSource>sourceTransform・weight
LookAtConstraint<ConstraintSource>sourceTransform・weight
ParentConstraint<ConstraintSource>sourceTransform・weight
PositionConstraint<ConstraintSource>sourceTransform・weight
RotationConstraint<ConstraintSource>sourceTransform・weight
ScaleConstraint<ConstraintSource>sourceTransform・weight
LODGroup<LOD>screenRelativeHeight・fadeTransitionWidth・renderers
Dropdown<OptionData>text・image
TMP_Dropdown<OptionData>text・image
ParticleSystem<Burst>time・count・minCount・maxCount・cycleCount・repeatInterval・probability
Assets/Example/Lamp.mochi.xml
<Lamp prefab="true">
<Object name="Anchor" position="0 2 0"/>
<Object name="Shade">
<ParentConstraint>
<ConstraintSource sourceTransform="/Anchor"/>
</ParentConstraint>
<LODGroup>
<LOD screenRelativeHeight="0.5" renderers="Near"/>
<LOD screenRelativeHeight="0.1" renderers="Far"/>
</LODGroup>
<Object name="Near"><MeshFilter mesh="builtin:Sphere"/><MeshRenderer/></Object>
<Object name="Far"><MeshFilter mesh="builtin:Cube"/><MeshRenderer/></Object>
<ParticleSystem>
<Burst time="0" count="20"/>
<Burst time="1" minCount="5" maxCount="10" cycleCount="3" repeatInterval="0.5"/>
</ParticleSystem>
</Object>
</Lamp>
TypesSyntax
floatA number (1.5). Infinity and -Infinity can be written too
intA whole number (3)
booltrue・false
stringStrings
Vector2Two numbers separated by a space (0.5 1)
Vector3Three numbers separated by spaces (0 1.5 0)
Vector4Four numbers separated by spaces
QuaternionFour numbers separated by spaces (x y z w)
Color#RRGGBB・#RRGGBBAA
RectFour numbers separated by spaces (x y width height, 0 0 1 1)
EnumerationsOne enum name. Case-sensitive
Enum (combinable)One or more enum names separated by spaces
LayerMaskEverything, Nothing, layer names separated by ; (Default; Water), or a whole number giving the layer bits. The names are the project’s layers (Tags and Layers in Project Settings); an unknown name gives MOCHI1009
UnityEventOne or more path:EventName separated by ; (calls SendCustomEvent on a part with a T# script)
ArraysEvery item, separated by ; (Red.mat; Blue.mat). An empty value is an empty list. Each item is written as its own type
An asset type (such as Material)A path to an asset in the project (Asset references)
A type (in the same prefab)A path to a GameObject in the same prefab (References within the prefab)
Relative pathFrom the GameObject the component is on: a child is Bg, a sibling is ../Bg, and the object itself is .
Absolute pathStarts with / (/Panel/Bg). The root is the root of the file it is written in (inside a part, the GameObject where the part is used)
NameA GameObject is found by its key (its name if it has none). Two siblings with the same name give an error (MOCHI4001)
What it points toThe component of the attribute’s type on the GameObject at the path. A Graphic attribute can also point to an Image (a type that derives from it). If there is none, MOCHI2016; if there is nothing at the path, MOCHI2015
UnityEventWrite path:EventName separated by ;, as in onClick="../Door:Open; /Sound:Play". It points to a part with a T# script and calls SendCustomEvent on its UdonBehaviour
Inside a placed prefabA path can go through a <Prefab> and follow the names of the GameObjects inside the prefab (../Frame/Mount). A path that ends at the <Prefab>’s name is the prefab’s root. A UnityEvent can also point to an UdonBehaviour inside the prefab
Passing to a partA part’s Object prop passes an object from where the part is used. Written inside the part as targetGraphic="{face}" or onClick="{target}:Open", the path is counted from where the part is used (prop values). If the object isn’t there, the error points to where the path is written
From a change inside a prefabA component change inside <Prefab> or <At> can point too. A relative path starts at the object inside the prefab whose component is changed. A UnityEvent replaces the calls the prefab had
Assets/Example/Menu.mochi.xml
<Menu prefab="true">
<Object name="Panel" position="0 1.5 2" scale="0.001 0.001 0.001" sizeDelta="400 500">
<Canvas renderMode="WorldSpace"/>
<ScrollRect content="Content" viewport="."/>
<Object name="Content" anchorMin="0 1" anchorMax="1 1" pivot="0.5 1" sizeDelta="0 400">
<VerticalLayoutGroup spacing="8"/>
<Object name="Close" sizeDelta="160 40">
<Image color="#FF6060"/>
<Button targetGraphic="."/>
</Object>
<Object name="Label" sizeDelta="160 40">
<TextMeshProUGUI text="Menu"/>
</Object>
</Object>
</Object>
</Menu>

Lists, references into a placed prefab, layer names and Infinity are written like this.

Assets/Example/Arcade.mochi.xml
<Arcade prefab="true">
<Prefab src="../Kit/KitFrame.prefab" name="Frame"/>
<Object name="Sign">
<MeshFilter mesh="builtin:Quad"/>
<MeshRenderer materials="../Art/Frame.mat; builtin:Default-Material"/>
</Object>
<Object name="Balls">
<VRCObjectPool Pool="Ball1; Ball2; ../Frame/Plate"/>
<Object name="Ball1"/>
<Object name="Ball2"/>
</Object>
<Object name="Seat">
<VRCStation stationEnterPlayerLocation="../Frame/Mount"/>
</Object>
<Object name="Camera">
<Camera cullingMask="Default; Water; Pickup"/>
</Object>
<Object name="Hinge">
<Rigidbody/>
<HingeJoint breakForce="Infinity"/>
</Object>
</Arcade>

The kind of asset is checked from the file’s .meta. The wrong kind gives MOCHI2008, and a missing .meta gives MOCHI2009.

TypesFiles it can point to
Material.mat
AudioClipAn audio file Unity imported as an AudioClip
TextureAn image Unity imported as a Texture (such as .png), a Texture2D .asset, or a .renderTexture
Texture2DAn image Unity imported as a Texture (such as .png), or a Texture2D .asset
SpriteAn image whose Texture Type is Sprite and Sprite Mode is Single
RenderTexture.renderTexture
FontA font file Unity imported as a Font (such as .ttf)
RuntimeAnimatorController.controller
AnimationClip.anim
PhysicMaterial.physicMaterial
VideoClipA video file Unity imported as a VideoClip
ShaderA shader file Unity imported as a Shader
TextAssetA file Unity imported as a TextAsset (.txt, .bytes, .json, .csv and others)
TMP_FontAssetA TextMeshPro font asset (.asset)
TMP_ColorGradientA TextMeshPro color gradient asset (.asset)
TMP_SpriteAssetA TextMeshPro sprite asset (.asset)
TMP_StyleSheetA TextMeshPro style sheet asset (.asset)
MeshA Mesh .asset, or a Mesh inside a model file (such as .fbx): write its name after #, like Chair.fbx#Seat (not needed when the model has one mesh)
Built-in assetsTypes
builtin:Cube・builtin:Cylinder・builtin:Sphere・builtin:Capsule・builtin:Plane・builtin:QuadMesh
builtin:Default-MaterialMaterial
What you wroteHandling
A component that is not on VRChat’s list of components allowed in worldsIt gives MOCHI1010. AudioListener is not on the list, but it has been confirmed to work in an uploaded world, so it can be written
An Audio Filter on a GameObject without an AudioSourceGives MOCHI1011, because Unity does not add it
A tag whose name is not in the listRead as a part name. If there is no part with that name, it gives MOCHI3001
SyntaxNumberExample
<CharacterController>MOCHI1010component-not-allowed
<AudioLowPassFilter> without an AudioSourceMOCHI1011audio-filter-alone
1.5 for AudioSource’s volumeMOCHI1009value-out-of-range
A layer name the project does not haveMOCHI1009layer-name-unknown

The 53 Unity components VRChat does not allow in worlds are:

Name
Animation・AreaEffector2D・ArmModel・ArticulationBody・BoxCollider2D・BuoyancyEffector2D・CapsuleCollider2D・CharacterController・CircleCollider2D・CompositeCollider2D・ConstantForce2D・CustomCollider2D・DistanceJoint2D・EdgeCollider2D・FixedJoint2D・FrictionJoint2D・HingeJoint2D・InputSystemUIInputModule・MultiplayerEventSystem・NavMeshLink・NavMeshModifier・NavMeshModifierVolume・NavMeshSurface・NetworkView・OnScreenButton・OnScreenStick・PanelEventHandler・PanelRaycaster・Physics2DRaycaster・PlatformEffector2D・PlayerInput・PlayerInputManager・PointEffector2D・PolygonCollider2D・RelativeJoint2D・Rigidbody2D・SignalReceiver・SliderJoint2D・SpringJoint2D・SpriteShapeRenderer・StreamingController・SurfaceEffector2D・SwingArmModel・TargetJoint2D・TilemapCollider2D・TouchSimulation・TrackedDeviceRaycaster・TrackedPoseDriver・TransitionArmModel・UIDocument・VirtualMouseInput・VisualEffect・WheelJoint2D