Search Unity

Runtime Spawner

Discussion in 'Assets and Asset Store' started by XGT08, Jul 12, 2019.

  1. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    EDIT: This package has been deprecated and is no longer supported.
    ------------------------------------------------------------------------------------------
     
    Last edited: Jun 12, 2023
    Mark_01 likes this.
  2. Ivam

    Ivam

    Joined:
    May 29, 2014
    Posts:
    11
    Hi,

    First of all, great work. I have a question. What is the difference between this and RLD?
     
  3. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Hi there,

    In a nutshell, RLD was designed withe level design in mind (e.g. in-game editors, modding tools and the like) and it achieves its purpose via a whole bunch of mechanisms such as transform gizmos, object selection and manipulation (e.g. object-to-object snapping, surface snapping). It's a powerful level design solution.

    Runtime Spawner is more generic. I didn't design it specifically for level editors. But it can be used for that purpose too. In fact, there is a simple script I wrote in Runtime Spawner that shows the steps that are required to be integrated with RLD.

    I think the best way to compare the 2 products is to take a look at some of the videos that are available or the feature list. RLD comes with a whole bunch of tools specific to level design, while Runtime Spawner allows you to control an object with the mouse cursor and spawn objects on click. Spawn effects are specific to Runtime Spawner and they are awesome :)

    Hope this helps, but let me know if you have any further questions.

    Cheers,
    Andrew
     
  4. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    @Ivam

    If you tell me what it is that you need to solve in you project, I might be able to tell you which one of the 2 packs is more suitable for you.
     
  5. Ivam

    Ivam

    Joined:
    May 29, 2014
    Posts:
    11
    Thank you for the explanation.
    I'm looking for similar Cities: Skylines - Move it mod mechanics, I think RLD will adapt better.
     
  6. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Just had a look at this vid and indeed, it seems like RLD is more aligned with what you need. Just please keep in mind that RLD does not provide the same interface for moving objects as in City Skylines :)
     
    Mark_01 likes this.
  7. marcaurelio74

    marcaurelio74

    Joined:
    Sep 2, 2012
    Posts:
    60
    Hello,
    first of all your asset is very good, so congratulation for your work:)

    Could you provide me an example of code to register to the event ObjectSpawnedHandler ?
    Thanks
    Gianluca.
     
  8. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Hello,

    Thanks for contacting me and welcome to the forum! I am happy to hear you like the asset :)

    Regarding the handler, I will assume that you have already created an instance of the RTSpawnGuide class. After you have done that you can register the handler like this:

    Code (CSharp):
    1.  
    2. // Put this somewhere inside a function (the Start function is a nice candidate)
    3. spawnGuide.ObjectSpawned += OnObjectSpawned;
    4.  
    5. // Your handler must have the following prototype
    6. void OnObjectSpawned(GameObject spawnedObject)
    7. {
    8.      // Do stuff
    9. }
    10.  
    Let me know if this helps.

    Cheers,
    Andrew
     
    Last edited: Nov 20, 2019
    marcaurelio74 likes this.
  9. marcaurelio74

    marcaurelio74

    Joined:
    Sep 2, 2012
    Posts:
    60
    Thanks for your reply,

    My code now is this :

    Code (CSharp):
    1.  private RTSpawnGuide _spawnGuide = new RTSpawnGuide();
    2.  
    3.    void Start()
    4.     {
    5. _spawnGuide.ObjectSpawned += OnObjectSpawned();
    6.          
    7. }
    8.  
    9.  
    10.     void OnObjectSpawned(GameObject spawnedObject)
    11.         {
    12.             Debug.Log(spawnedObject.name);
    13.         }
    At line 5 it throw an error :
    There is no argument given that corresponds to the required formal parameter 'spawnedObject' of 'FactoryModelBuilder.OnObjectSpawned(GameObject)'
     
  10. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    My mistake. You have to remove the () when you register the handler. I have updated my previous post.
     
  11. marcaurelio74

    marcaurelio74

    Joined:
    Sep 2, 2012
    Posts:
    60
    It works, Thanks:)

    Gianluca.
     
  12. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Happy to hear it works :)
     
  13. FallingRocketGames

    FallingRocketGames

    Joined:
    Nov 25, 2016
    Posts:
    7
    Hi there!
    Does Runtime Spawner contain a way to save the scene changes, objects positions or what's the approach to do so?
    Also once the object is placed is there a way to reposition it with the same asset?
    Thanks!
     
  14. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Hi there,

    No, these features are not implemented :)
     
  15. Kenneth_ION

    Kenneth_ION

    Joined:
    Jul 17, 2013
    Posts:
    4
    Wondering if this will work fine in a WebGL solution? No issue with saving I will store to SQL or Firebase but we're really hoping for a web-based solution and thought I should check before buying. It looks fantastic!
     
  16. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Hello,

    Thanks for reaching out!

    Just did a build with WebGL and it seem to work nicely :)

    Cheers,
    Andrew
     
    Kenneth_ION likes this.