Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here:
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Sub asset InstanceId will same relative to main asset's InstanceID?

Discussion in 'Editor & General Support' started by tinyant, Oct 18, 2018.

  1. tinyant


    Aug 28, 2015
    I want to use AssetDatabase.CopyAsset to copy my asset. I want to Identify it's sub asset when copy over.
    First time I use sub asset name to identify same sub asset in Main Asset.but when we have same sub asset name. I can't identify sub asset just use name.

    I wonder if the sub asset's relative instanceid is always same relative to Main Asset?

    MyAsset : 1000
    sub01: 1001
    sub02: 1002
    sub02: 1003


    If the sub asset instance id is same relative to main asset I can identify sub02(1003) in MyAsset and sub02(2003) will be the "same" sub asset when make a copy.