Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

How to use GameObjectConversionUtility.ConvertGameObjectHierarchy in Tiny?

Discussion in 'Project Tiny' started by meanfox, May 24, 2020.

  1. meanfox

    meanfox

    Joined:
    Apr 9, 2020
    Posts:
    25
    Any sample that shows this?
    I am trying to convert a Unity DOTS game I wrote to Tiny.
    I want to dynamically spawn stuff.
     
  2. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    As far as I know, there is no do use that in runtime, it needs to be used in conversion to work in Tiny, you can't reference GameObject stuff in runtime in Tiny.
     
  3. meanfox

    meanfox

    Joined:
    Apr 9, 2020
    Posts:
    25
    If Tiny won't support the conversion pipeline and prefabs, it would be severely limiting.
     
  4. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    It does support prefabs, but their conversion needs to happen at conversion time with IDeclareReferencedPrefabs.
     
  5. meanfox

    meanfox

    Joined:
    Apr 9, 2020
    Posts:
    25
    Many thanks Bruno!
    First I'd heard of IDeclareReferencedPrefabs.
    I found some DOTS sample code using it.
    Is anything different for Tiny? Know of any sample Tiny code that uses it?
    Cheers.
     
  6. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
  7. meanfox

    meanfox

    Joined:
    Apr 9, 2020
    Posts:
    25
    Thanks again.
     
    brunocoimbra likes this.
  8. gwenaelle_unity

    gwenaelle_unity

    Unity Technologies

    Joined:
    Jul 24, 2018
    Posts:
    16
    Tiny supports conversion, the AsteroidSpawnerComponent.cs is a good example on how to convert monobehaviours and prefabs. We only convert gameobjects inside subscenes right now, but we are working on converting the root scene as well.