Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Octave3D-Level Design - Snapping, Prop placement, Multi-Prefab painting

Discussion in 'Assets and Asset Store' started by XGT08, Aug 10, 2016.

  1. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    @Fuzzy_Slippers
    I mentioned rotation because in the previous post you said that the tool rotates the object when trying to snap. In any case, this is really weird. I have to admit that I haven't tried the tool with the latest version of Unity. I will download it tomorrow and start working on the problem.

    Some things that I can think of off at the moment. Object to Object Snapping works only in Point and Click, Path and Block. It does not work in Decor Paint mode. In Decor Paint no snapping is performed. It is only used to paint on meshes. That might be why you were able to place objects everywhere, you probably had Decor mode active.
     
  2. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    ... also, this is how I recommend that you set the snap settings for object to object snap:

    Settings.png

    So, using Point and Click in combination with these settings should give the desired results :)

    EDIT: I just remembered that the object may also become rotated because you might have the Align Axis toggle checked in the Inspector. This toggle is available for all placement modes. When using Point and Click, it will align the object axis to match the normal of the grid which resides on the hovered object's surface.
     
  3. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    491
    Snap to cursor point doesn't do any grid snapping for me but otherwise those settings work.

    I think a bug that was confusing me is it seems to roll back to decor paint mode sometimes, but if I tap 1 (to select decor) and then one of the other mode keys snapping turns back on. This isn't related to the scene window being focused like you mentioned in the hotkey doc so not sure what is causing it.

    Also, I have "Force Text" for serialization on all my projects could that be related? That can impact importing serialized objects from an asset (like commonly serialized strings end up as nonsense when I import assets from the store) but I don't see anything that could do that in yours.

    Anyway I think I have it working now and indeed your current modes work fine and I don't need anything added except offset grid.
     
  4. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Snap to cursor hit point essentially means that there is no snapping :) It just moves the object to the intersection between the grid and the mouse cursor. I know it can be a bit misleading.

    Regarding the mode keys. What you are describing is the correct behaviour. Tapping 1 activates decor mode, and 2, 3, 4 activate Point and Click, Path and Block and all these 3 use snapping. Not sure why it rolls back to decor paint.

    Great! If it is OK with you, I will send it to you tomorrow (it's almost 1 AM here) since I didn't start to work on it yet. Thanks for your patience ;)
     
  5. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,062
    @XGT08

    Sure! I'll draw something up over the next few days. Before I do, I'd like to first see what sort of GUI you have setup before I go into detailing anything myself so that I can keep from reinventing the wheel. You might have a good start on a system already in place that I can add onto.
     
  6. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    TileBrush.png

    Oh :) It's just the beginning of how the Inspector will look like. So there will be a new placement mode called TilePaint (5th button). And here I have only added a couple of controls for now:tile size , brush specific controls (active brush, name, brush size).

    Pressing the Edit button will open up a new window which will allow you to assign prefabs to the different tiles (Convex, Concave, Floor, etc).

    The green squares in the scene represent the brush. In this example I am using a brush with a size of 4.

    That's it for now. :) I have stopped working on it because I thought it would be better to see what you can come up with. specially in terms of how the brush edit window will look like (how prefabs are assigned to different tile types etc).

    Thanks! I will be able to talk again tomorrow.
     
  7. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,062
    I apologize at the visual-crappiness of the schematics I sent you in your PM, but I hope these are a good start. There are still some systems missing to bridge the gap to make it all make sense, but I hope my efforts will make your tool the best of its kind out there. All the others so far are just too half-assed to deliver the final punch of value to the user that they need, and I'm doing my best to make sure that's not the case here since you've got too much done right already for you to fall short now. :)
     
    XGT08 likes this.
  8. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    @Fuzzy_Slippers
    I have implemented the grid offset functionality. Please send me a private message or an e-mail so that I can send the package to you.
     
  9. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    @awesomedata
    Actually the schematic looks really cool! Thanks! We'll keep in touch ;)
     
  10. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,062
    Something I found interesting in the new 5.5 release that might, in theory, help with tile instancing:


    https://unity3d.com/unity/whats-new/unity-5.5.0

    Graphics: Added Graphics.DrawMeshInstanced and CommandBuffer.DrawMeshInstanced API, allowing instanced draws without the overhead of creating thousands of renderers.



    Never thought I'd see the day Unity would address this huge oversight. After all, who in their right mind would want to draw lots of objects onscreen without tons of overhead when making games?



    Even something as simple as a few UGUI elements would drag performance to a crawl on mobile for me unless I activated/deactivated the gameobjects first. This being absent pretty much necessitated a pooling system for all mobile projects, no matter how simple they were.

    I wonder if, with this new instanced drawing method, tile-drawing performance would improve enough to be able to rely solely on occlusion? I would totally love to not have to deal with activation/deactivation of gameobjects just so I can have decent performance in tile-based worlds.

    Does anyone know how effective this + occlusion would be for larger worlds in games that use tile systems? There are quite a lot of fish there.... Would pooling still be necessary?
     
  11. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi everyone,

    I know I promised a video tutorial regarding Object Groups, but I failed to deliver :D and I'm afraid it will take a bit more time :). At the moment, I am working on a new functionality called Volume Tiles suggested by @awesomedata which I believe would be a good addition to the toolset for tile-based game level design. The functionality is going along nicely, but still lots of work to do and the GUI is not in place yet.

    Meanwhile, if any of you have any questions or issues, please drop a message here and I will do my best to help.

    Best Regards,
    Andrew
     
  12. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    491
    Is this working in 5.5 for anyone else? Neither the asset store or the grid version you sent me is working at all in the scene view. No placement controls, hotkeys, etc. The grid displays but that's it.

    I threw in some debug statements and EditorUpdate is definitely being called in Octave3DWorldBuilder but never in ObjectPlacementGuide. I'm not sure when the ObjectPlacement object is supposed to get created but it seems like that never happens.
     
    Last edited: Dec 13, 2016
  13. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Thanks for letting me know. I am looking into it right now.
     
  14. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    @Fuzzy_Slippers
    I am using Unity 5.5.0f3 and everything is working well for me.
    Did you also send me an e-mail?
     
  15. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    @Fuzzy_Slippers
    Can you please try again? Maybe delete the whole Octav3D package (if possible) and reimport or at least delete the game object with the Octave3D script and recreate. It has to work because it works for me.
     
  16. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    491
    Yep also sent email. I started a whole empty project and it doesn't work either. 5.50f3 version. No hotkeys and no placement is created. I'll send an email with the mostly empty project to see if it is different on yours.

    Opened up another old project that was working fine in 5.4 but no go in 5.5. Downloaded/imported again and didn't help. Have you tried downloading from the store to make sure your version is the same?
     
    Last edited: Dec 13, 2016
  17. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Yes I downloaded from the store directly, empty project, works perfectly.

    I also tried converting a package with Octave3D that was created with an older version of Unity and it still worked. I will try using the zip file that you sent to me.
     
  18. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    I can not download the zip file that you sent me. Keeps giving me errors. Can you put it on a fileshare service?
     
  19. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    491
    PM'd link
     
  20. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    I got it and indeed, with this particular project it doesn't work. I'll be... :) I have started working on it and let you know when I have a solution.
     
  21. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    @Fuzzy_Slippers
    So I can see that the OnSceneGUI is not called. Never. Since with an empty project it works and with this one it doesn't, there must be a project settings issue. Do you remember what settings you modified in this project?
     
  22. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    @Fuzzy_Slippers
    This is weird. I decided to arrange the workspace to fit my own needs, and now suddenly the placement guide appears in the scene and I can move it. Input is blocked though.

    I made it look like this:
    Octave3D Issue.png

    I understand that you would like to use your own workspace, so I will dig deeper into the issue to see what is causing it, but this smells like a Unity bug to me. Essentially, it seems that for some window arrangements/ configs, the OnSceneGUi method is not called.
     
  23. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Ok, so I got it to work.

    Can you please try to rearrange the windows in the workspace. Maybe try to reproduce the same workspace I got in the image I posted previously. Then, it should start to work and then you can come back to the same workspace again. Closing and opening Unity again should also work so there shouldn't be any problems.

    For the moment, this is the only solution I could find. It's porbably related to all the events and stuff that Unity handles to draw those windows and they might have somehow disabled the OnSceneGUI for Octave3D.
     
  24. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    491
    Weird. Yep I changed to another layout and then changed back to mine and immediately Octave started working. It doesn't matter what the layout is as long as it gets changed that wakes up OnSceneGUI.

    This definitely seems like some kinda Unity 5.5 bug but not sure if we have enough to log it.

    Dunno if related but I got this error when I opened the project today: http://pastebin.com/TBkE0kkP.
    Most relevant bit: UnityException: EnsureRunningOnMainThread can only be called from the main thread

    I also got it when hitting play if Octave is in the scene along with this error message: http://pastebin.com/htz0XQtD
    ArgumentException: An element with the same key already exists in the dictionary.

    Those errors continued even after I changed the layout around. I also deleted / cleared all prefab categories / reimported Octave and the errors are persisting.

    Also: a small usability suggestion. You have great OnHover text for all your controls but maybe have the keyboard hotkeys in them? e.g. "Object Placement ("A")"

    edit; Changed SphereTree.cs GetDataToTerminaNode.. line 605 to
    Code (csharp):
    1.  
    2.             if (parentNode.IsTerminal) {
    3.                 if (!dictionary.ContainsKey(parentNode.Data)) {
    4.                     dictionary.Add(parentNode.Data, parentNode);
    5.                 }
    6.             }
    7.             else {
    8.                 List<SphereTreeNode<T>> children = parentNode.Children;
    9.                 foreach (var child in children) GetDataToTerminalNodeDictionaryRecurse(child, dictionary);
    10.             }
    11.  
    which stopped the errors
     
    Last edited: Dec 14, 2016
  25. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    @Fuzzy_Slippers
    The bug with the dictionary entry has happened before with a couple of other users so I have known about it for quite some time, but unfortunately I haven't been able o track down the real cause :). For that reason I implemented a Refresh Scene button inside the Inspector. If this error ever pops-up again, pressing this button should fix it.

    Checking if the entry already exists inside the dictionary will prevent the error from being thrown in the console, but it does not remove the actual cause of it because the system should never get into the state of having 2 entries in the dictionary (I may be wrong :))

    My suggestion is to remove the error checking out since the error (as far as I know) happens on extremely rare cases. This is why it was also hard for me to find the cause. Because the check will only hide from you that there is in fact an issue. So let the tool complain, and when it does, press the Refresh Scene button and then it should work.

    The main thread thing is probably related to this error. It happened to me before during development when I had to deal with ScriptableObjects which were created inside constructors. Those have all been taken care of so I guess it's somehow related to the dictionary thing.

    The tooltips... Yes :D My favorite subject... I will keep that in mind and it will be done. For the moment, I am currently working on a different package due to some negative feedback that I have recieved :)D it happens) so it's a little urgent for me. I have also promised @awesomedata to implement the Volume Tiles system which will also take some time, so for the moment, it's quite a bit of traffic. So I will take care of it when things will calm down a tad.

    Of course feel free to report any issues that you are having and I will do my best to help.

    Thanks for understanding! :)
     
  26. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    Hello @XGT08 and Happy New Year! Happy New Year to fellow Octave3D users as well!

    I purchased Octave3D two nights ago after watching some of your videos. This seems like the perfect time saving tool to more quickly build levels from prefabs. I had actually been using Village Interiors to create some simple test levels, and thought to myself that there has to be a faster way to do this. After searching through the asset store for something designed to work with prefab placement in fully 3D levels, I came across Octave3D. I will start using it today and let you know if I need help with how to do anything.

    When you come out with the next update, will it be swappable in my project without removing anything, or what are the upgrade steps you recommend? Doesn't hurt to ask up front as sometimes with other assets the developer requires removal of the asset first before upgrading. As long as there is a clear path to develop levels and not lose any progress :).

    I'm a professional software developer by trade and if I hadn't found Octave3D I was considering spending time to create something myself, so you have saved me lots of time :).
     
  27. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,062
    @hoodoo

    As far as I'm aware, with the next version so far, the new VolumeTiles functionality will be a separate mode and probably will most-likely only require updating a few old scripts, then adding a number of new ones w/some additional prefabs.

    Really though, in general, it's always a good idea to completely remove an older version of an asset before installing a new one (if you can) -- and this is especially true after a major update. The only exception to this is generally when you've modified some of the asset's source code or files. In that case, you should just copy those modified files to an external directory, then delete the old asset and install the new version, then copy/paste the modified files from the old asset version back to the directories where they go (just check the filesize, creation/modified dates, etc. in Windows upon pasting to tell whether they've been modified between the updates -- if so, then simply find the differences in the old code and paste in your new stuff).

    That's the way I generally go about it, and any auto-update functionality would still require some of this if you've modified the files or source-code.
     
  28. EricMuyser

    EricMuyser

    Joined:
    Sep 24, 2016
    Posts:
    38
    Hi,
    Where is the tag database stored?
    Thanks in advance!
     
  29. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi there hoodoo!

    And Happy New Year to you too! :)

    Thanks for purchasing Octave3D!

    It seems that @awesomedata has beat me to it :D The volume tiles functionality is planned for the next update which will be a new placement mode specifically designed for tile based game level design. It's still in its early stages of development, so it will take a bit more time to finish it. To be honest, starting from Christmas till now, I haven't really done much :), but I will resume work somewhere around the 10th of January.

    Indeed, I think it's best to just remove the old package and install the new one when it will be available. In terms of loosing work, you don't need to worrya bout that since starting with version 2.0.9, you can save prefabs configurations and settings in config files and load them when needed. Just make sure you keep the same prefabs in your project. Let me know if you need help with that. Prefab configs can be saved from the prefab management window. Other settings can be saved by pressing the Save Config button in the Inspector (below the main toolbar). Again, please let me know if you need any help with this.

    Thanks again and enjoy using Octave3D!

    Best regards,
    Andrew
     
  30. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    Hi @XGT08 and thanks for the welcome!

    I spent a bit of time placing some prefabs and seem to be not lining them up exactly right. The randomization feature is really cool when making a big floor! That part works well, but then when I added more floor tiles they didn't quite line up. Same with the wall prefabs. So I suspect I need to cycle through the pivot points with the J key when placing objects. Is the J key not functional when moving prefabs in Object Selection mode?

    Also, it is hard for me to see the color difference when the pivot point is colored differently as I cycle through with the J key. Can you make it stand out a bit more? I do use f.lux to change the color scheme at night so that might be making it worse.

    One more quick observation: it seems that if a prefab is in one category, then it is not allowed to be put in another category. Is there a reason for this? I wanted to create another category with a subset of what's in the first category. The use case is I have a bunch of floor tiles but some are different sizes, so I want to take the tiles of uniform size and type and copy them into another category and then use the randomize feature to place these over a large area.

    Thanks for your time and I know you're busy on some of your other assets! :)
     
  31. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    Also, I notice on the randomly placed floor prefabs (using block mode) from the Cathedral floor prefabs in village interiors, they don't all line up vertically. I understand that there is a lot of variation in these tiles, but is there a way to make these line up correctly?
    upload_2017-1-2_23-43-23.png
     
  32. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi @hoodoo ,

    Lining up tiles using the pivot points can be indeed difficult in case you are using objects of different sizes. The pivot points work well when you are working with objects of regular sizes. By regular I mean that bigger objects are exact multiples of smaller ones (e.g. 2x2, 4x4, 2x4 etc).

    For this reason, there is another snap mode available which attempts to solve this issue. It is called object to object snap and I recommend that you watch this short video intro. Please let me know if it helps.

    You can change the color of the pivot points inside the Look and Feel section of the Snap Settings GUI. It allows you to specify the color for the active and inactive pivot points.

    Yes indeed. That was done on purpose, but to be perfectly honest, I can not remember the exact reason. I do remember that I shot myself in the foot for not implementing that restriction. It happened 2 times: when V 1.0 was developed and a second time when I rebuilt the tool from scratch. So both times, I had to implement that restriction, but I don't remember why :) I will look over this and see if it can be removed, but I can not make any guarantees. I remember it can break things.

    Hm... Yeah.. Unfortunately there is no way to do that using the Block placement mode which is a pitty because it allows for fast floor placement. The problem resides in the fact that these tiles have bumps (i.e. some times have one of the square tiles lower than others for variation). I believe the block placement mode uses the center of the wire blocks for position calculations. I will check to see if some sort of alignment an be made so that the tops of the objects are aligned. This would probably be an option available when randomization is turned on.

    Thanks for reporting these to me. As I said, it will be some more time until I resume work on this package, but I will keep these issues in my mind. Most likely work on the package will be resumed somewhere around the 10 of January.

    Thanks!,
    Andrew
     
  33. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    Thanks @XGT08! This helps a lot and don't spend time changing the restriction on prefabs not being in more than one category as I can definitely work with it the way it is now. I will try out your other suggestions.
     
  34. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    I'm using object to object snapping (trying both box and vertex) and sometimes have trouble getting the floor tiles to line up vertically. Sometimes just moving the mouse slightly to the side or up/down makes the tiles nudge down into the correct vertical position, but other times this doesn't seem to work. I can usually rotate about the Y axis and then get it to work, but not sure what's going on exactly.

    So now I'm trying to build a ceiling with the barrel vault prefabs, and having trouble placing the roof tile prefab between the two corner prefabs. It doesn't want to snap to the corner prefabs, and as I move it around the pivot point seems to keep changing. Is this because of object to object snapping? Not sure why the pivot point doesn't stay set to the one I picked. Any advice is appreciated! Screenshot below showing the tile I am trying to place between "fi_vil_combs_vault_corner01" and "fi_vil_combs_vault_corner02". Thanks.

    upload_2017-1-3_23-34-40.png
     
  35. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi there @hoodoo,

    The pivot point should not change when using object to object snap mode. It is a bit hard to figure out what the problem might using the screenshot. Do you think you could record a small video?

    EDIT: Keeping the snap settings GUI visible would help also.

    Thanks.
     
  36. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi @hoodoo, hi everyone!

    A fellow user reported 2 nasty bugs related to the loading of prefab configs and settings configs. If anybody would like to have access to the package that contains the fix, please PM me or send me an e-mail.

    All the best,
    Andrew
     
  37. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    Hi Andrew. Video is here - pick the HD quality setting -


    I only changed the pivot point once in the video. Maybe it's happening because the corner piece on the left has the missing square blocked out as part of the prefab?
     
  38. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi there @hoodoo,

    Thanks for the video. Unfortunately, I can't seem to be able to access it. First it asked me to sign in and then it tells me that the video is not available. Maybe you forgot to make it public? :) Private also works, but I believe you have to give me access to it and I don't know how that's done. My user is octamodius.
     
  39. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    Apologies - I clicked publish after uploading but apparently it didn't happen. Should be there now. Thanks.
     
  40. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Ok. I looked at the video and indeed I can see that after you place an object, the pivot point changes. That is strange. I will try to reproduce this and get back to you when I fix it. Thanks for reporting this.
     
  41. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    Thanks Andrew. Can you see also that I was not able to correctly snap the piece into the correct spot? I couldn't get it to snap to the inside vertices on either corner piece where the gap in the ceiling is, and when I try to snap to the closest vertices on the left or right, the whole prefab I am placing seems to rotate around 180 degrees. If I'm doing something wrong let me know. I appreciate the help. If you're too busy on the other assets I can wait.
     
  42. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    AA... I didn't quite catch that. But that I believe can happen when dealing with thin pieces of geometry. Don't worry, I'll be more than glad to take a look at this for you. I'll keep you posted. Thanks for taking the time to report these.
     
  43. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi @hoodoo ,

    I have sent you an e-mail with some explanations. We'll talk again soon!
     
  44. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi @hoodoo,

    I have sent you an e-mail with a link to a video in which I provide an explanation and possible solution for what is happening. Please let me know if it helps.
     
  45. Thickshake

    Thickshake

    Joined:
    Dec 31, 2014
    Posts:
    6
    The snapping, the grid and fast interface is incredible in this tool and beats most professional 3d applications I have used. One question, has the Orbit camera been disabled (Alt + LMB)? This is the main way I would usually navigate Unity because its the fastest for me. If there was a way to focus the last prefab you placed with F, then orbit it, while still being in placement mode, that would be amazing.
     
  46. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi there @Thickshake ,

    Thanks! I'm glad you like the tool!

    Regarding, camera orbit, it should work as usual. If it doesn't it means it's a bug. I will investigate this and fix it ASAP. Regarding camera focus, that's bit more complicated. Pressing F will no longer work because F focuses on Unity's selection, but Octave has its own. Secondly, if I were to implement a custom focus mechanism, I would run into trouble. I can't seem to control the scene view camera the way I want (inside the editor scene view). The focus functionality was requested by somebody else some time ago, but it could not be implemented. However, I think I can give it another try and see if it works out.

    So you would like to focus on the last placed prefab only?
     
  47. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi @Thickshake ,

    I wanted to let you know that I fixed the camera orbit bug, so you can send me a PM with your purchase number and I will send you the updated package.

    Regarding focus, it is just not possible. If this were a runtime (app that runs in build or game view) app, I would have no problem to do it, but because it runs inside the Editor, there are certain limitations that I can't seem to overcome. So a custom/manual solution does not work. I tried using some of the more undocumented features of the UnityEditor.SceneView class and I did manage to semi-make it work, but I am not satisfied with the results.

    There is one more thing that I can try. Would you accept a focus solution which focuses the camera instantly? The standard Unity focus take a bit of time to complete (smooth focus). I think I may be able to implement an instant focus. Would that be OK?
     
  48. Thickshake

    Thickshake

    Joined:
    Dec 31, 2014
    Posts:
    6
    That was quick! Thanks for your explanation and i'm so happy orbit works with this tool. I'm not fussed about a smooth focus. For me, part of the reason to focus an object is not just to move the camera quickly to look at it, but also to give the camera a useful orbit point. Any sort of focus would be amazing though.

    This tool set speeds things up so much and actually makes world building in Unity fun. The prefab library and tags, the grid snap and all the useful hotkeys!
     
  49. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,427
    Hi there @Thickshake ,

    Thanks so much! And thank you for the wonderful review! I have sent you a PM with the updated package.
    I feel bad to say this, but I am afraid that the focus functionality will not be available, because I simply can not figure out how to do it. It is not the actual focus algorithm that is causing trouble, but modifying the scene view camera details (position and ortho size) in a stable/reliable way. I gave more details in the PM.

    For all developers reading this :). Have any of you managed to manipulate the scene view camera in a reliable way? Setting the camera position via the transform component just doesn't work. I could use SceneView.lastActiveSceneView.pivot to set the camera position and then let's say I manage to make it focus. But then is there a way to tell unity that it should orbit the camera around that new focus point? Can I disable Unity's default orbit functionality and implement my own? Thanks!
     
  50. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    150
    Thank you Andrew! The video was great as it showed me exactly how to solve the ceiling placement problem. Specifically, holding the T key down and clicking or double clicking on the other ceiling piece I was trying to snap to, and then using the N to sink the piece down correctly. I submitted a review also, thanks to @Thickshake doing the same and your comment above about the review. It's easy to forget to review good assets but very important to reward the best!

    Here's a screenshot after successfully completing the ceiling:
    upload_2017-1-10_22-20-43.png
     
    XGT08 likes this.
unityunity