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

[RELEASED] uConstruct - Fully generic, socket based runtime construction system

Discussion in 'Assets and Asset Store' started by ElroyUnity, Oct 17, 2015.

  1. keifyb

    keifyb

    Joined:
    Feb 12, 2016
    Posts:
    62
    aye photon is a right pain, you just seem to have a few libraries under your belt so i wonder if u could shed some insight? Raknet sounds good, im sure i tried something out in the past with that. i haven't had chance to try many others, only been on with photon cause assets use it. i have been checking out others but its hard to figure out what would be best in the long run. i mean does that bolt thing make life any easier? i heard forge is good but a resource hog. i seen other open source stuff that looks interesting but not tried out yet.
     
    ElroyUnity likes this.
  2. Wulfklaue

    Wulfklaue

    Joined:
    May 9, 2016
    Posts:
    15
    Personally i rather stick with uNet because its a standard unity asset. Lets say you use small store assets in your project, if the developers stop updating you can still fix things yourself. But its a different matter when it comes down to the larger network libraries.

    For me that simple thing made me simply focus on uNet. You do not need matchmaking or any of the other features. They are not that hard to implement if you need to do so. So simply run it stand alone & manage your own servers. Its way better. Several of those 3th party network solutions, if you host with them, you run the risk of getting your server artificially limited or placed on overbooked servers.
     
    ElroyUnity likes this.
  3. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    To be honest, if i were to choose a networking library it will probably be either bolt or unet.

    I would choose bolt just because it's a lot more modern than anything out there at the moment and it also has a lot of helpful features. on the other hand, the development slowed down a lot since photon purchased it.

    UNet doesn't have as much as features and isn't as good, but just like anything unity creates, its bad when its released and then it gets a lot better (for example mecanim) and well, it will not be abandoned like all of the other networking libraries.


    So if i were to start a new project now, i would probably go with bolt, but if you would ask me the same question next month it might be UNET instead.



    Also,
    Wulfklaue i started to work on your feature request.
    Should be done soon :)
     
  4. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey guys,

    The version is coming along very well.
    Just yesterday i finished most of the features i wanted to implement, and one of them is the multiple blueprint fields "childs". (As requested by Wulfklaue).

    A little example :


    As you can see, you can have many childs for each field - for example in the wall field i have both wall and doorway.

    I also fixed many issues with the blueprints so now they will fit models A LOT better :).
     
    llJIMBOBll, John-G and Wulfklaue like this.
  5. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Sorry for the amount of messages today guys!

    So i went back in the thread and looked for suggestions and this one ^^ looked like a really good one.

    So i added the ability to modify textures on the terrain modification system.

    For example (No restore):
    https://i.gyazo.com/a4836eb2af22ff8dbed2e174fc04c065.mp4

    With restore :
    https://i.gyazo.com/90dc2ba4f5ee9525e5912bcb9d8ea9cb.mp4

    As you can see its pretty slick and i like it a lot, i think it's a nice addition to the modifcation system :)


    Lots of new stuff coming in 1.4!
    Good night for now :)
     
    buronix, zeb33, Teila and 5 others like this.
  6. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Excellent addition, Elroy!!
     
  7. zeb33

    zeb33

    Joined:
    Nov 17, 2014
    Posts:
    95
    He sleeps?
     
    llJIMBOBll likes this.
  8. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Will it supports RTP ?

    Also, I think it would be awesome improve the Prefab Database, to allow add it manually, edit, delete, etc.

    Awesome work btw !!
     
  9. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Thank you Teila!,
    And sorry lol, was very busy with tests so i didn't have any time to check the forums.

    Sorry :).
    Uhm, i dont use RTP but i know that it uses the normal unity terrain so yes it will work out of the box :).

    And i will do that, it's actually on my milestones, it might even be included in this version!
     
  10. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    UFPS Photon is now supported!

    I need some testers to test it. If you have uConstruct & UFPS Photon Addon, make sure to message me privately with your inovice and i will send you a test version :)
     
    keifyb and llJIMBOBll like this.
  11. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    @ElroyUnity I have all mentioned, but don't really have that much free time.
     
    ElroyUnity likes this.
  12. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hehe its okay man!
    Thanks for the help either way :) (The feature that you requested where the terrain modifcation will also modify the splat map is very helpful!)
     
    99thmonkey likes this.
  13. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Yes, and that's very exciting. My next plan is to test all of this out in game to see how easy it is to start with a raw GAIA "world" (multiple scenes of course), make all the uConstruct stuff, quit the game, come back and see it all still there. Yes, I plan to test the Multiplayer stuff too but haven't gotten that far yet.
     
    siblingrivalry and ElroyUnity like this.
  14. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Happy to hear that!
    Let me know how it goes :)
     
  15. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Hi Elroy, please could you check uConstruct with newer versions of Unity e.g. 5.3.4 as there have been a few support emails coming my way when they relate to the new level editor code :)
     
    ElroyUnity likes this.
  16. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Same here - checking it out :)
     
    tapticc likes this.
  17. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Can we use this with assets built from ProBuilder?
     
    ElroyUnity likes this.
  18. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yes,
    It should work with any kind of a model :)
     
    tapticc likes this.
  19. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Awesome! Are you planning on doing any tutorials using UNET for multiplayer functionality?
     
    ElroyUnity likes this.
  20. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    At the moment its as simple as enabling 1 option in the extensions menu and following a short document that explains how to set it up :).

    No need for any video tutorial as it's a process of 5 mins at most :)
     
  21. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Great! I haven't done any networking yet, so I'd thought I would ask...
     
    ElroyUnity likes this.
  22. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Dont worry about it lol,
    Just wanted to show you how simple that is :).

    If you encounter any kind of an issue i will be sure to assist you :)
     
  23. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Thanks!
     
    ElroyUnity likes this.
  24. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    My pleasure :)
     
  25. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Nice one :)
     
  26. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Preview to V1.4 change log!!

    Add unique saving files for each scenes (can be triggered from the settings) - Done

    Add saving file name to the settings menu - Done

    Add the ability to have many fields for a blueprint - Done

    new AABB calculations - Done

    Add placing offsets to the building placer - Done

    Fix the issue with the current anchors of the blueprints being broken in some situations. - Done

    Add CheckForTerrain condition - Done.

    Fix a bug with some "UnDestroyable" objects.- Done

    Fix a bug in the remove building method of the BaseBuildingGroup where the "un-parenting" would be called before the events are sent which caused a lot of issues - Done.

    Add the option to fill an area that was flatten by the flattening condition with splatmap. - Done

    Look into UFPS-PhotonCloud integration. - Not full tested yet

    .Add custom properties that allow to get a custom input for destroy & place & rotate inputs. - Done

    Make sure that changing the group property on the building actually applies the changes globally - Done.

    Extend the prefab database. - Done.

    Fix standard assets being overwritten in some projects. - Done

    Fix errors with simpleLOD - done.

    Add reset buildings in scene to base building - done

    Add an ability to for more than 9 buildings on the building placer. - Done.

    Rewrite the saving system, to be a lot more accurate and slick. - Work in progress

    Look into errors in 5.4.x -
    Work in progress.



    I am sorry it took so long, i've been SO busy lately with school, uNature and so many other stuff, if you have any more feature-requests in mind now is the time! i will try to add as many as i can before i submit this version :).


    Sorry once again and hopefully next version will be faster!
    Elroi.
     
    Tinjaw, llJIMBOBll and Wulfklaue like this.
  27. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Testing for UFPS MP, everything works perfect! :D This Guy deserves a Medal Honestly.
     
    hopeful and ElroyUnity like this.
  28. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    My pleasure !!

    Will be submitting 1.4 today :)
     
  29. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
    @ElroyUnity Hi, I own Uconstruct and Ice creature control. How does Uconstruct integrate with Ice?
     
    ElroyUnity likes this.
  30. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    As of now the integration is very simple, it makes it so the layers of the buildings & sockets from the layers manager will act as obstacles so you dont need to mess with those stuff yourself.

    More stuff will be added soon, as its still work in progress.
     
  31. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    uConstruct 1.4 submitted!!

    Added unique saving files for each scenes (can be triggered from the settings).

    Added saving file name to the settings menu.

    Added the ability to have many fields for a blueprint.

    added new AABB calculations.

    Added placing offsets to the building placer.

    Fixed the issue with the current anchors of the blueprints being broken in some situations.

    Added CheckForTerrain condition.

    Fixed a bug with some "UnDestroyable" objects.

    Fixed a bug in the remove building method of the BaseBuildingGroup where the "un-parenting" would be called before the events are sent which caused a lot of issues.

    Added the option to fill an area that was flatten by the flattening condition with splatmap.

    Added UFPS_PhotonAddon integration.

    Added custom properties that allow to get a custom input for destroy & place & rotate inputs.

    Made sure that changing the group on the building actually applies the changes globally.

    Extended the prefab database.

    Fixed standard assets being overwritten.

    Fixed errors with simpleLOD.

    Added "clean buildings in scene" method to base building.

    Added an ability to for more than 9 buildings on the building placer.

    Rewrote the saving system, its a lot more accurate and slick now.

    Fix errors with web player.

    Made the saving task on BaseBuildingGroup virtual so you can inherit from it and use some custom saving for that.

    Added buildingGroupType to the base building which you can inherit from and use a custom BaseBuildingGroup class for custom group stuff.

    Made uConstruct mobile-ready.

    Fixed gaia's extension errors.

    Fixed save getting corrupted and possibly throw errors on load when using an custom save type.

    Fixed where any change of the socket's variables wont save.


    Sorry for the late release, i have been so busy lately both with school and life in general.
    But its alright now :).
     
    Tinjaw, Wulfklaue, zeb33 and 3 others like this.
  32. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    uConstruct 1.4 has been approved!
     
    Tinjaw, buronix and llJIMBOBll like this.
  33. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
    ElroyUnity likes this.
  34. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    My pleasure :).

    Will be applying 1.4.1 soon with some cool improvements like uNature integration and offset on the buildings themselves and not just building placer, and also some fixing to the z-fighting you guys were noticing :)
     
    llJIMBOBll likes this.
  35. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Great update!!

    1 thing, I have a file called "BuidlingGroupSaveData" lot of errors, delete it solve all.
     
    Last edited: Jun 16, 2016
    ElroyUnity likes this.
  36. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yes i switched it's name so the old file probably remained if you didnt delete uConstruct before importing the new version :).
     
  37. mrdl2010

    mrdl2010

    Joined:
    Jun 1, 2016
    Posts:
    23
    Have just bought this great asset. Are you going to have integration to some pathfinding like apex path? since the building will create dynamic obstacle.
     
    ElroyUnity likes this.
  38. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey !
    I will definitely look into that in the next release :)
     
  39. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Placing Offset is good, but it really needs to be assigned at the individual piece. For instance, I'd like my foundation to be offset, but I really don't want my pillars and walls to be offset.
     
    ElroyUnity likes this.
  40. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yep i got an report about it,
    An issue on my side.

    I fixed it already, should be releasing V1.4.1 soon with those fixes :).


    Sorry!
     
    99thmonkey likes this.
  41. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Sounds good. I went ahead and fixed it on my side until you make the fix. I just inherited your class and made my own updated editor window while I wait.

    It works really well actually. As an FYI, you only need to override/update the HandleFreePlace method in the script.
    Code (CSharp):
    1. public override void HandleFreePlace(UCPhysicsHit hit, BaseSocket socket, Vector3 offset){
    2.         base.HandleFreePlace(hit,socket,myOffset);
    3.     }
     
    ElroyUnity likes this.
  42. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yep the code source is pretty easy to extend ;)
    Happy you got a temporary fix though!

    Will let you know when i submit the new version :)
     
  43. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    llJIMBOBll likes this.
  44. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    *bump* cannot recommend this highly enough
     
    ElroyUnity and llJIMBOBll like this.
  45. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    I approve this message. -jimbob 2016
     
    siblingrivalry and ElroyUnity like this.
  46. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Haha thank you guys!
     
  47. riquid

    riquid

    Joined:
    Mar 18, 2015
    Posts:
    20
    I'm trying to integrate uconstruct into a dynamic terrain loading system that isn't world streamer. How should I call the loading of buildings and such within my own code?
     
  48. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    If your loading system handles float percision (the player always snaps back to 0,0,0) then you will have to move the buildings with your loading system (just add the moving offset to the buildings, so buildingsPos + offsetPos).

    Other than that, in order to handle the streaming and show the buildings only when their terrain is loaded you could most likely just check if the current buildings are in the bounds of any of the other terrains, so for instance.

    min = terrain.transform.position;
    max = terrain.transform.position + terrain.terrainData.size;

    and then you just do that :
    bool contained = (building.transform.position.x > min.x && building.transform.position.z > min.z) && (building.transform.position.x < max.x && building.transform.position.z < max.z)

    On each one of the terrains and if its not contained of any of the loaded terrains then you just disable that certain building (you can just do building.transform.SetActive(contained))


    I hope that helped! :)
     
  49. riquid

    riquid

    Joined:
    Mar 18, 2015
    Posts:
    20
    After some testing, I've found that my game world is simply too large to use a method that loads everything and then disables some which are too far. There are simply too many buildings.

    I think that I will need to create a custom UCBuildingGroup which includes a string to record which terrain tile it corresponds to. When I create a new UCBuildingGroup, the first building in the group should raycast down to find which terrain tile it is currently on and save that to the string.

    When I unload a terrain tile, I will go through all the buildings in the scene and find all of the ones which correspond to that particular terrain tile. I will then save those buildings into a file dedicated to just that terrain tile. maybe named something like UC_x12_y13 if I was unloading tile 12,13.

    When I need to load in a new tile, I would also load in all the buildings that are saved to the file associated with that terrain tile.

    In order to do this, I would need a few functions that I can't seem to find within the UConstruct code.
    I would need a function to load a given file. Something like UCSavingManager.Load(string filename)

    I would also need a function where I could pass in a list of buildingGroups and a filename in order to save them. Maybe something like UCSavingManager.Save(List<BuildingGroupSaveData> _buildingGroups, string filename)

    Do you think you could point me in the right direction when it comes to creating these functions?
     
    ElroyUnity likes this.
  50. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Good idea :)

    First of all, if you want to load the data you can use :

    UCSavingManager.LoadExternalData(stream);

    And for saving, contact me privately, i will give you a code that handles that, which is included in the new upcoming version :)