docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SceneConverter

    Converts a scene hierarchy from Unity to Pixyz and vice versa.

    Inheritance
    object
    SceneConverter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Pixyz.UnitySDK
    Assembly: Unity.Pixyz.UnitySDK.Runtime.dll
    Syntax
    public class SceneConverter

    Fields

    api

    Pixyz instance to which api calls are made

    Declaration
    public PiXYZAPI api
    Field Value
    Type Description
    PiXYZAPI

    customMaterialSetup

    Specify how Pixyz custom material should be translated to Unity (eg.VRED)

    Declaration
    public CustomMaterialSetup customMaterialSetup
    Field Value
    Type Description
    CustomMaterialSetup

    enableUndo

    Use Unity undo API when converting from Pixyz to Unity.

    Declaration
    public bool enableUndo
    Field Value
    Type Description
    bool

    fetcherResolution

    GBuffer render texture resolution used to convert unsupported materials (supported materials: Builtin/Standard, URP/Lit)

    Declaration
    public int fetcherResolution
    Field Value
    Type Description
    int

    hierarchyLoadType

    Specify how the hierarchy should be synced between the engines

    Declaration
    public HierarchyLoadType hierarchyLoadType
    Field Value
    Type Description
    HierarchyLoadType

    overrideShader

    Shader that can override the shader used to convert Pixyz material to Unity material

    Declaration
    public Shader overrideShader
    Field Value
    Type Description
    Shader

    scaleFactor

    Scale applied to Unity transform matrices and vertices when converting a Pixyz mesh to a Unity mesh

    Declaration
    public float scaleFactor
    Field Value
    Type Description
    float

    specularWorkflow

    Set this parameter to true when converting materials from a Unity builtin project to Pixyz and vice versa.

    Declaration
    public SceneConverter.SpecularWorkflow specularWorkflow
    Field Value
    Type Description
    SceneConverter.SpecularWorkflow

    syncComponents

    Specify wich Pixyz component type should be translated to Unity

    Declaration
    public ComponentType[] syncComponents
    Field Value
    Type Description
    ComponentType[]

    syncInactive

    Sync inactive GameObjects/Occurrences

    Declaration
    public bool syncInactive
    Field Value
    Type Description
    bool

    Properties

    LineMaterialDefault

    Default line material to render lines

    Declaration
    public Material LineMaterialDefault { get; set; }
    Property Value
    Type Description
    Material

    PointMaterialDefault

    Default Point material to render point cloud

    Declaration
    public Material PointMaterialDefault { get; set; }
    Property Value
    Type Description
    Material

    Methods

    Reset()

    Declaration
    public void Reset()

    ToPixyz(IList<GameObject>, MaterialSyncType, uint, Dictionary<GameObject, uint>)

    Use this function if you want to convert a set of GameObjects without their sub-hierarchy. In Pixyz, each corresponding Occurrence will have no parent, no children (flattened hierarchy).

    Declaration
    public uint[] ToPixyz(IList<GameObject> gameObjects, MaterialSyncType materialSyncType = MaterialSyncType.SyncNone, uint parent = 0, Dictionary<GameObject, uint> gameObjectToOccurrence = null)
    Parameters
    Type Name Description
    IList<GameObject> gameObjects

    List of GameObjects used as flatten hierarchy

    MaterialSyncType materialSyncType

    How to sync materials.

    uint parent
    Dictionary<GameObject, uint> gameObjectToOccurrence
    Returns
    Type Description
    uint[]

    All id of occurrences created as a flatten hierarchy

    ToPixyz(GameObject, bool, MaterialSyncType, uint, Dictionary<GameObject, uint>)

    Convert a Transform and its subtree to Pixyz.

    Declaration
    public uint ToPixyz(GameObject gameObject, bool recursive = true, MaterialSyncType materialSyncType = MaterialSyncType.SyncNone, uint parent = 0, Dictionary<GameObject, uint> gameObjectToOccurrence = null)
    Parameters
    Type Name Description
    GameObject gameObject

    Transform to convert.

    bool recursive

    Convert root subtree.

    MaterialSyncType materialSyncType

    How to sync materials.

    uint parent
    Dictionary<GameObject, uint> gameObjectToOccurrence
    Returns
    Type Description
    uint

    Id of root occurrence.

    ToUnity(uint, MeshSyncType, Dictionary<uint, Object>, Dictionary<uint, GameObject>, List<Object>)

    Declaration
    public GameObject ToUnity(uint root, MeshSyncType meshSyncType = MeshSyncType.SyncFullAndDuplicate, Dictionary<uint, Object> entityToObject = null, Dictionary<uint, GameObject> occurrenceToGameObject = null, List<Object> newAssets = null)
    Parameters
    Type Name Description
    uint root
    MeshSyncType meshSyncType
    Dictionary<uint, Object> entityToObject
    Dictionary<uint, GameObject> occurrenceToGameObject
    List<Object> newAssets
    Returns
    Type Description
    GameObject
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)