docs.unity3d.com
Version: 

    XML File

    User Interface creation

    A plugin User InterfaceI is defined in an XML file. Here is a basic example:

    Image

    Image

    More about Types

    Parameter types

    Please refer to the API Reference to find all the parameter types available in the Python API, and to see a preview of the associated GUI widget:

    Image

    Here is an example for the FilePath type, which is a file browser:

    Image

    Structures

    Declare your own structured types using the decltype and struct keywords:

    <decltype name="Structure">
        <struct>
            <field name="BoolParameter" type="Bool" default="True"/>
            <field name="AngleParameter" type="Angle" default="0.1"/>
        </struct>
    </decltype>
    …
    <parameter name="Structure" type="Structure" description=""/>
    

    Image

    Lists

    Some types also exist as lists (e.g String and StringList). Declare your own lists of structured types using the decltype and list keywords:

    <decltype name="Structure">
        <struct>
            <field name="BoolParameter" type="Bool" default="True"/>
            <field name="AngleParameter" type="Angle" default="0.1"/>
        </struct>
    </decltype>
    …
    <decltype name="StructureList">
        <list type ="Structure"/>
    </decltype>
    …
    <parameter name="structureList" type="StructureList" description=""/>
    

    Image

    Enumerators

    Declare Enumerator types using the enum keyword. Enumerators take the form of dropdown menus:

    <decltype name="Enumerator">
        <enum type="Int">
          <value name="Enum_1" value="1"/>
          <value name="Enum_2" value="2"/>
        </enum>
     </decltype>
    …
    <parameter name="Enumerator" type="Enumerator" description=""/>
    

    Image

    Selectors

    Use the select keyword to create dropdown selection menus giving inputs choice:

    <decltype name="DropDownMenu">
        <select>
          <type name="FirstChoice" type="Structure"/>
          <type name="SecondChoice" type="ComponentType"/>
        </select>
    </decltype>
    …
    <parameter name="dropDownMenu" type="DropDown" description=""/>
    

    Image

    Image

    Advanced use cases

    • Optional parameters: optional="True"

      <parameter name="OptionalParameter" type="OutputDirectoryPath" optional="True" description=""/>
      
    • Disabled parameters: disableValue="-1"

      <parameter name="DisabledValue" type="Int" disableValue="-1" description=""/>
      

      ImageImage

    • Customize FilePath type so it browses only specified formats:

      <decltype name="InputFilePath" type="FilePath" attributes="extensions:*.pxz"/>
      
      …
      <parameter name="input" type="InputFilePath" description=""/>
      

      Image

    • Selectable OccurrenceList parameters (input filled with current scene selection): selection="true"

      <parameter name="occurrences" type="OccurrenceList" selection="true"/>
      

      Image

    Pixyz Studio 2024.1.0.44 based on SDK 2024.3.0.14
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX.