docs.unity3d.com
    Show / Hide Table of Contents

    Class TargetObjectWithPath

    Set target object and it's path. Enable to get target object from path even if a target would be lost while reloading scene Especially when it has different prefab or different scene

    Inheritance
    Object
    TargetObjectWithPath
    Namespace: Unity.Industrial.Forma.Staging
    Syntax
    [Serializable]
    public class TargetObjectWithPath

    Methods

    GetTarget(in GameObject)

    Get Target object. If it is empty, retrieve it from path

    Declaration
    public GameObject GetTarget(in GameObject source)
    Parameters
    Type Name Description
    GameObject source
    Returns
    Type Description
    GameObject

    Target Object

    SetTarget(in GameObject, in GameObject)

    Set Target object (and set target path in Editor)

    Declaration
    public void SetTarget(in GameObject source, in GameObject target)
    Parameters
    Type Name Description
    GameObject source
    GameObject target
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • 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 on 18 October 2023