Search Unity

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

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

  1. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi, This happens when I have a third person body, my set up is... using Inv Placer on player, rotate with player checked, ray origin is Mid Screen... on the body, Eye Offset seems to effect it, mine is set to 0, 0, 0, if you set so the camera goes backwards it seems to fix it, but then you see the body with no head in 1st person :D
     
    ElroyUnity likes this.
  2. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Oh I see, seems like its because there's some kind of sway that's effecting the camera. There's not really a way to fix it other than using a different origin that's not effected by the animations for the raycast on the building placer :)
     
    llJIMBOBll likes this.
  3. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    Hi,

    Did you by any chance had a look to the batching bug reported 4 months later ?!

    Is uConstruct batching compatible with Uber Shader ? Seems like batching also get broked when using Uber Shader...

    Can you please do a quick fix to all this annoying issues with batching ? We cant wait anymore ...
     
    ElroyUnity likes this.
  4. ElroyUnity

    ElroyUnity

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

    Sorry it completely slipped my mind but I remember fixing it just not sure if i tested it, I will take a look at it tomorrow (midnight atm)

    Regarding Uber - I don't think there should be any issues as its just combining meshes, but if there is and it will require an integration its not really an issue but more of an incompatibility. I can't ensure all shaders on the asset store work with my asset.

    But yea, I will take a look tomorrow at the batching issue you mentioned, thanks for the reminder!
     
  5. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    After many Hours and some more I finally came across some info on this and the reason is UFPS side and quite funny after crying for hours :D

    Turn out it's because the fps camera moves with the player body animations so raycasting from the main camera will cause jitter, I found these two forums posts that helped *solve* the issue :D http://www.opsive.com/assets/UFPS/forum/index.php?p=/discussion/comment/13452/#Comment_13452 and http://opsive.com/assets/UFPS/forum...remove-stuttering-on-controller-child-objects

    Something to do with the way ufps updates the camera position...
    All I did was change so BuildingPlacer scripts updates in LateUpdate instead of Update, and NO MORE JITTER :d :d :d

    Anyway this might help others in this situation :D
     
    ElroyUnity and hopeful like this.
  6. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Oh I see, makes sense!
    Happy it works! :)
     
    llJIMBOBll likes this.
  7. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Okay so it works pretty well with a few changes:

    First of all, go to your BaseBuilding.cs script and then go into the buildingGroup property and change it to https://hastebin.com/hocuqukavi.cs

    Then, go to BaseBuildingGroup.cs and then go to the "AddBuilding" method and change it to:
    https://hastebin.com/xizatubame.cs

    And then lastly, when you want to change someone's group you dont need to play with batch building. what I've done is:

    building.buildingGroup = newGroup;

    as simple as that :)


    Lmk if it fixes your problems!

    gif:https://gyazo.com/63b098e922f24b36a80b31d6eb41158d
     
    amynox likes this.
  8. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    Hi,

    Worked like a charme !

    BUT => Important note: if you have 2 differents materials with the same name the batch will be broken again ! (i geuss materials are referenced by names...)

    Will dig more about Uber Shader uncompatibility and let you know.

    Thank you very much

    Any plan for a next version of uConstruct ?
     
    Last edited: Sep 24, 2017
    ElroyUnity likes this.
  9. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    "BUT => Important note: if you have 2 differents materials with the same name the batch will be broken again ! (i geuss materials are referenced by names...)"

    Correct, that's a little annoying but will be fixed in the future, unfortunately its a limitation atm, not too major tho.

    "Any plan for a next version of uConstruct ?"

    Uhmm, honestly it was planned to be out soon but when it comes to the asset store my top priority atm is on the new version of uNature. But afterwards I will be coming back to a revamp of uConstruct :)
     
    amynox likes this.
  10. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    Ok i can confirm that Uber Shader work perfectly with uConstruct out of the box ! (it was something in my side that cause the incompatibility between both).

    Thank you Elroy for your support ;)
     
    ElroyUnity likes this.
  11. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Anytime, happy it works :)
     
    amynox likes this.
  12. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    I just got this to work with terrain. I've spent a lot of time, was easy to modify out of the box to work with VR controllers. However, with placement on terrain it was tricky. I found out it wasnt working because the socket on terrain was set to Everything and the placement type for Foundation was Everything. I needed Foundation to be Everything, but the socket on terrain to be Free Based. This now allows me to freely place Foundation pieces anywhere, but once one is down, the rest will snap.
     
    Last edited: Jan 4, 2018
    ElroyUnity likes this.
  13. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Ah yes of course... happy you got it fixed!!
     
  14. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    I cannot get BluePrints to work as well. Not sure what the secret missing step is but I followed the video and manual but it doesnt work. Specifically, the P and Ex buttons are grayed out. I can create a new set of BluePrints. I can Create a field and Select the type, Wall or Foundation for example. I set the gameobject in the first popup and then its listed as building: Floor_1A. I cannot double click on it like it says in the video, and I cannot use the P and ex buttons. I know how to manually setup new pieces but would rather use BluePrints.
     
    Last edited: Jan 9, 2018
    ElroyUnity likes this.
  15. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Did you try following the written documentation? afair its more updated :)


    Elroy
     
    Tethys likes this.
  16. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    I did. To be fair, have you tested this feature lately to make sure it still works with the recent versions of Unity? I see others posting the same problem. We're on Unity 5.6.3 over here.
     
    Last edited: Jan 9, 2018
    ElroyUnity likes this.
  17. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    I think I did last month. I will try to test it again today :)
     
    Tethys likes this.
  18. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    How easy would this be to set up with a static top down camera?
     
    twobob and ElroyUnity like this.
  19. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Super easy! in fact all you need to do is on the BuildingPlacer change the ray origin to Mouse Position and that's it!
     
    snowcult likes this.
  20. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Ooh, that was simple. Thanks!
    https://streamable.com/jz50i
    For some reason, the plane that I place on was losing it's material or something whenever I placed a foundation on it (used socket based rather than free), so I had to place a second one underneath. Gives it a cool effect, although unintentional. I might have to see why that is.
     
    Last edited: Jan 28, 2018
    ElroyUnity likes this.
  21. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Uhmm interesting! Not sure, but can you make sure that each of your materials has a different name?
     
  22. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Hello @ElroyUnity - I keep running into a small bug but its breaking a lot of stuff. :p Since Blueprints dont work, to make new pieces I select a current one, for example Wall Window 3, duplicate it in the Library, then hit Reset Prefab ID and then after that Add Prefab ID. This seemed to be working fine until I noticed as my library got bigger that its grabbing existing prefab id's and assigning them instead of making new prefab ids. For example, today I started adding new pieces after fixing it from this bug corrupting a bunch last time. The very first piece I duplicated and then reset and added assigned an existing prefab id, in this case, it assigned that last prefab ID I made, 160, to the newest piece I made, 160 - so once again I have 2 160's in my library. Now this has become a problem because no matter how many times I reset and then try to add the new prefab to the prefab DB, it will only assign it 160. So.... I'm stuck. :p I did find, however, that if I reset the prefab ID on the old one, the one that is supposed to have that id, it will give the old one a new ID. Then, when I go to the new prefabs, duplicate, reset and then add to prefab id db, the new ones work again. So the bug can be worked around but it does break stuff and can become confusing if you don't catch it. I had to redo about 20+ pieces the other night when this happened as it just kept assigning existing prefab ID's to the new prefabs.
     
  23. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Uhmmmmmmm will have a look!! Great catch :)
     
    Tethys likes this.
  24. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Hey guys, anyone have an example of the Roof and how the sockets should look? Ideal would be loading up the Blueprints screen as intended and just exporting the Roof from the preset to a GameObject, like it works in the video, but the Roof in Blueprints seems broken so I cannot use that option. I did get BluePrints working - problem was I kept trying to use a bugged piece. I can see that there is Roof and RoofTries but when I try to export the settings to the GO, it bugs somehow - the new Prefab does not display the mesh(even though before the save it does show the mesh) and has no sockets. Reading one of @ElroyUnity other suggestions about grabbing the 3dForge example and replicating it, I cannot find any 3dforge example pieces, just the uBluprint file referencing those pieces, which seems to maybe be the source of my issues heh. Thanks.
     
    Last edited: Feb 20, 2018
  25. Ivalobon

    Ivalobon

    Joined:
    Feb 20, 2017
    Posts:
    17
    Whenever I enable uconstruct my existing character falls through the terrain. Even if I remove the scripts from the character it still happens, I have to revert my project back to the last revision to get it working again. Is it doing something to the terrain to make this happen? I've looked at tutorials and browsed through the scripts and not seeing anything regarding this.
     
    ElroyUnity likes this.
  26. impi2

    impi2

    Joined:
    Jul 3, 2015
    Posts:
    43
    Hi,

    This was posted a year ago, but I've not seen mention of Remastered after. Hopefully it was in your big update.

    Can you please confirm uConstruct does support Forge Remastered now... as that's the only Forge available for a while.

    Thanks
     
  27. Ivalobon

    Ivalobon

    Joined:
    Feb 20, 2017
    Posts:
    17
    Figured it out. had to add my player and npc layer to building sockets in edit->project settings->physics
     
    twobob likes this.
  28. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Happy you got it fixed as it did seem really weird to me at first sight as uConstruct doesnt play with your terrain collision by any means.

    Not yet... dont really have time to add new integrations atm. The remastered is in fact a new asset and so I will update the asset store description to make it clearer that it's not supported as of now :)

    Elroy
     
  29. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Hi Elroy, I always see posts about fixes, but I do not see updates so just wondering are people just getting those builds?

    I haven't seen any issues, I was just wondering. /cheers
     
    ElroyUnity likes this.
  30. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    I always try to give code fixes as script changes, but definitely should submit a version with fixes. Although not sure which as most fixes are individual for each user (mostly just modifications for their use) so not sure really...

    I will work on getting them grouped up and submitted!
     
    recon0303 likes this.
  31. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    no worries then, just figured to ask if it wasn't.
     
    ElroyUnity likes this.
  32. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Elroy no need to send anything, if its not a true update :)
     
    ElroyUnity likes this.
  33. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    Hello, I am considering buying this asset I was wondering if it is possible to use it for a more RTS type of game where you place prefabs of buildings that then get constructed later.

    Has anyone done this before and can it be done using this asset?
     
    ElroyUnity likes this.
  34. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Yes, you could but it would require some coding depending on how you want the construction itself to work.. This is more design for RUST style building, but I also have used it for other types...but you would need to code a little to get what your after..out of the box it prolly wouldn't work but depends what you are after .
     
    ElroyUnity likes this.
  35. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    https://www.assetstore.unity3d.com/en/#!/content/108619
     
  36. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Last edited: Apr 18, 2018
    ElroyUnity likes this.
  37. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    He answered the guy, I don't see it as advertising , since no one else answered him.. but me. So I do not see it as such, people get tired of buying the wrong assets and being stuck with them, so its good to be fair and honest... giving someone the correct info, and advertising are two different things... maybe you should of answered him just saying. :)

    PS: PMing people does not always help other users looking for the same thing...This way its more clear. This is why I also answered this tool is NOT really meant for RTS style games but it can be done, but if there is a better tool for what this person is looking for, why not be fair to them and let them know. This way others know as well. If he was advertising, I would be the first to say something.
     
    Stormy102, ElroyUnity and Tethys like this.
  38. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yea don't worry about it. It's fine.
    I can confirm that uConstruct can work for RTS type games. Note that it takes a bit of coding but definitely can work and I have done it a few times for my projects.
     
    recon0303 likes this.
  39. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Yup same here, which is why I replied. :) but not everyone can code very well, or at all. So having the right tool could be important to them:)
     
    Last edited: Apr 19, 2018
    ElroyUnity likes this.
  40. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Okay so I didn't notice my question answered. How would one extend the default ray cast beyond it's current 14ish Unity units. I am hunting through the code but if it is somewhere obvious. I should ask

    never mind, it's the building placer on the demo character. Gotya


    [SerializeField]
    float _placingDistance = 20;
    public float placingDistance
    {
    get { return _placingDistance; }
    set { _placingDistance = value; }
    }
     
    hopeful and ElroyUnity like this.
  41. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Happy you found it :)
     
    twobob likes this.
  42. SFoxx28

    SFoxx28

    Joined:
    May 4, 2017
    Posts:
    4
    @ElroyUnity & Community

    I just watched all your tutorials on youtube, and from what I can tell it is easy to use, which is what I'm looking for. I purchased it today. I've run into my first problem. I opened the CubeDemo scene provided and tried to build a basic cube like building with 4 walls, a ceiling, a foundation, and a door. When I tried to place the walls the wall it would not let me. The walls turn red when I try to place them on the foundation and not green like another building piece like the stairs.

    Am I doing something wrong?

    I'm using Unity 2018.1 on MacOs

    EDIT: When I imported for the first time I told unity to update the API since some of the code was deprecated. I wasn't able to place the walls down so I started another empty project and imported again but this time without updating the API. I got the same results. Does it matter if I update or not?

    I really like this product because the learning curve appears to be minimal. So I'm hoping that with a little help from the publisher and community we can get this working.
     
    Last edited: May 25, 2018
    ElroyUnity likes this.
  43. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    The demos require you to place pillars between the wall first. You can remove this by going into the wall prefab -> conditions and remove check for building.

    Elroy
     
  44. drcfrx

    drcfrx

    Joined:
    Jan 26, 2013
    Posts:
    53
    Hello
    I bought uConstruct (full of hope...) but sadly there are problems. I use Unity 2017.2.0f3. In a blank new project, right after uConstruct installation I get 8 red warnings: Binary to YAML conversion: type UInt16 is unsupported.

    Which later must be responsible for some weird behaviors, in the demo the #3 key activate the Pillar instead of the Doorway. To get the Doorway I have to hit twice the #2 key (for Walls). The others keys are decremented by one.

    Also uConstructCallbacksManager send this red warining during play:
    SerializationException: serializationStream supports seeking, but its length is 0
    System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:155)
    System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:136)
    uConstruct.Core.Saving.UCSavingManager.DeserializeStream (System.IO.Stream stream) (at Assets/uConstruct/Scripts/Core/Saving/UCSavingManager.cs:127)
    uConstruct.Core.Saving.UCSavingManager.LoadExternalData (System.IO.Stream stream) (at Assets/uConstruct/Scripts/Core/Saving/UCSavingManager.cs:185)
    uConstruct.Core.Saving.UCSavingManager.Load () (at Assets/uConstruct/Scripts/Core/Saving/UCSavingManager.cs:147)
    uConstruct.Core.Manager.UCCallbacksManager.Start () (at Assets/uConstruct/Scripts/Core/Manager/UCCallbacksManager.cs:102)

    Also your contact and website info are dead links on the Asset Store, I thought the Asset was dead before I found this thread. I'm glad to see you're still around ^^

    I hope you can fix this or tell me how. Thanks in advance!
    Cheers
     
    ElroyUnity likes this.
  45. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Weird about the first errors, will check it but it shouldn't be the cause of the other problems.

    Regarding keys - i changed it in the latest version so each key holds several different structures to allow more buildings in the demo (if that makes sense)

    Regarding serialization error, thats indeed really really strange. I am in the army now, will try to check it through the phone but if I cant I will fix it next week when I am back in the office :)

    Elroy
     
    drcfrx likes this.
  46. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    When I try to add my prefab to the blueprint thing I get a greyed out box and no errors

    upload_2018-6-9_3-53-37.png

    Here is the prefab

    upload_2018-6-9_4-5-45.png

    There is no offer to export anything and none of the P or Ex buttons can be clicked.

    No prefabs are created that I can find.

    Am I doing something wrong?

    I try creating new blueprint, and add a building again to it, and observe the blueprint is created
    but with no prefabs or obvious way to get at any created data I am at a loss.

    upload_2018-6-9_4-10-15.png


    Finally:

    If I add something with a long name the editor resizes so I cant press the buttons anymore as the right hand column has a fixed insufficient maximum
    upload_2018-6-9_3-52-13.png

    And finally finally please could you provide another video, or further instructions on using the blueprints system to make prefabs, I watched the available videos and don't see this situation covered in any of them?



    Any clues?
    thanks
     
    Last edited: Jun 11, 2018
    ElroyUnity likes this.
  47. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Thanks for the feedback, i will be home this weekend and do my best to get you a solution :)
     
  48. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Checked the serialization but couldn't reproduce it, did you get any errors while placing the buildings that broke the serialization maybe? If it happens constantly, can you send me a reproduction project in a private message?


    Thanks,
    Elroy


    Hey,
    Took a look into it, seems like the blueprints were somehow deleted from the asset, not sure how but I will have to re add them... before I do that I will need to check why it originally happened. I will look into it and see if there's a deeper issue within the blueprint system. Will keep you updated with the progress. Will be back in the office this Thursday :)

    Elroy
     
  49. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Okay then thanks
     
  50. drcfrx

    drcfrx

    Joined:
    Jan 26, 2013
    Posts:
    53
    Well my test project is huge, can't really send it. However I tested again with Unity 2018.1.1 this time. It required an API update, and after that got the same errors: 8 red warnings : Binary to YAML conversion: type UInt16 is unsupported.

    Plus all the scripts have bad line endings, but easily fixed if a bit tedious. Also got a number of yellow warnings:

    Assets/uConstruct/Scripts/Core/Saving/UCSavingManager.cs(45,128): warning CS0618: `UnityEngine.Application.loadedLevelName' is obsolete: `Use SceneManager to determine what scenes have been loaded'

    Assets/uConstruct/Scripts/Editor/Buildings/BuildingEditor.cs(63,85): warning CS0618: `UnityEditor.EditorGUILayout.EnumMaskPopup(UnityEngine.GUIContent, System.Enum, params UnityEngine.GUILayoutOption[])' is obsolete: `EnumMaskPopup has been deprecated. Use EnumFlagsField instead.'

    Assets/uConstruct/Scripts/Editor/Buildings/BuildingEditor.cs(432,60): warning CS0618: `UnityEditor.EditorGUILayout.EnumMaskField(string, System.Enum, params UnityEngine.GUILayoutOption[])' is obsolete: `EnumMaskField has been deprecated. Use EnumFlagsField instead.'

    Assets/uConstruct/Scripts/Editor/Condition/CheckForBuildingsEditor.cs(25,58): warning CS0618: `UnityEditor.EditorGUILayout.EnumMaskField(string, System.Enum, params UnityEngine.GUILayoutOption[])' is obsolete: `EnumMaskField has been deprecated. Use EnumFlagsField instead.'

    Assets/uConstruct/Scripts/Editor/Core/PhysicsObjectEditor.cs(68,35): warning CS0618: `UnityEditor.EditorApplication.MarkSceneDirty()' is obsolete: `Use EditorSceneManager.MarkSceneDirty or EditorSceneManager.MarkAllScenesDirty'

    I cleared the warnings, and played the CubesDemo after adding the 2 needed layers, and it plays but I only have the white dot in the center of screen and nothing else, not even the onscreen commands. The FPS controls works properly but thats it, no uConstruct command at all.

    I didnt do anything besides adding the layers with uConstruct Manager, so you should have the same thing if you try Unity2018.
    Let me know if I can try something. Thanks =)

    Oh btw FYI it's also missing 10 out of 40 lightmap files according to unity so its possible that your package isn't full.