Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Platform Specific Models

Discussion in 'General Graphics' started by Deibu, Nov 20, 2018.

  1. Deibu

    Deibu

    Joined:
    Feb 24, 2013
    Posts:
    34
    Are there any existing methods to have different models be rendered depending on the target platform?

    Thanks!
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,227
    What is it you are trying to do?
    Just have a different 3D model based on the platform?
    There are many ways you could do it but it would help to have more context.

    You could do this with a script and a list of models to choose from.
    You could use asset bundles and name them per platform so so they load the correct one for each platform, also see AddressableAssets for a nice way to do this.
     
  3. Deibu

    Deibu

    Joined:
    Feb 24, 2013
    Posts:
    34
    Yes, I just want to have a different 3D model based on the platform, or none if so desired. I currently am using the script method and spawning a model based on the platform, but I feel like this method is too clunky.

    Is there a good tutorial for setting up addressable assets for this?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,227
    https://docs.unity3d.com/Packages/com.unity.addressables@0.4/manual/index.html

    So what you could do is name the models after the platform.
    e.g
    "gun-windows"
    "gun-ps4"
    etc
    Then if the name does not exist fallback to a default.