Jump to content

Hertzole

Members
  • Content count

    9
  • Joined

  • Last visited

  • Days Won

    2

Hertzole last won the day on March 12 2017

Hertzole had the most liked content!

About Hertzole

  • Rank
    Newbie
  • Birthday July 6

Profile Information

  • Gender
    Male
  • Location
    Sweden
  1. Oh, so it was that easy. Thanks a ton, karl!
  2. Hello! I'm currently developing a level editor and I noticed whenever I duplicate a ProBuilder object, the mesh that gets created stays the same, which I believe causes some problems for me. If I delete any of the objects that have the same mesh, the mesh gets destroyed and all the other objects loose the reference to it and become blank. Currently, this is the code I use to duplicate objects (very stripped down): public void DuplicateObject(GameObject target) { if (target == null) return; GameObject go = Instantiate(target, target.transform.position, target.transform.rotation); } I know what the problem is: I instantiate a new object based on "target", which will have all the same properties. And unfortunately, I can't change this. So the main questions is, is there some way I can create a new instance of the mesh for newly created PB objects?
  3. Hertzole

    Runtime Level Editor Thread

    Hmm.. actually updating the pb object with my axis turned out really tricky for me. I've basically got 3 calls to do this in, OnBeginDrag (called when I click on one of the axis arrows), OnDrag(called every frame until I release the mouse button) and OnStopDrag(called when I release the button). According to my logic, I want to update it in OnDrag and from that, I get a new position (where the axis currently is), and everything I do here results in some very weird results (but all go into space). I don't really know the math for making the face vertices match up with the position of the axis. If you, or anyone else, would happen to know some way I could do this, it would be appreciated. But if not, I'll wait for you, bigd, to post your stuff and I'll take a good look on that.
  4. Hertzole

    Runtime Level Editor Thread

    Hey, bigd! I gotta say that your runtime ProBuilder looks pretty impressive so far and I'm interested to see your take on it! And I'm specifically interested in how you did the movement with the axis, like how the block extrudes with the axis. Are you using TranslateVertices or something else? I'm also in the process of making something like this for a game and I've just experienced it going off into space whenever I'm moving mine using TranslateVertices. Would you mind sharing some info on how you went about yours?
  5. Hertzole

    Probuilder Runtime editor

    Sorry to revive such an old thread, but have there ANY updates on a runtime editor? From what I can see, the only thing missing is the ability to save the PB objects/get the PB object's mesh data, and then you can make a simple editor for yourself. So just that would satisfy a lot of people.
  6. Hertzole

    How do you use SetFaceMaterial at runtime?

    Ah, I see. Thanks for the info, but I actually used: currentSelection.face.SetMaterial(testMaterial); Thanks for the extra lines "ToMesh();" and "Refresh();"! That was the thing I was missing when I tried to get SetMaterial to work.
  7. Hi, I'm playing around with some runtime editing and I am trying to set a material on a specific face but I can't really figure out how. I basically copied the code from the RuntimeEdit script and added a basic way to try and set the material for the selected face. This is currently my code for doing this. if (Input.GetKeyDown(KeyCode.Alpha1)) { if (currentSelection.IsValid()) { Debug.Log("Set material"); currentSelection.pb.SetFaceMaterial(currentSelection.pb.faces, testMaterial); RefreshSelectedFacePreview(); } } The most confusing part about the "SetFaceMaterial" function, to me at least, is that it was an array of pb_Face. How am I supposed to set the face I want to apply a material to?
  8. Hertzole

    Saving Runtime cubes

    Hi I've been playing around with the built in runtime edit API that comes with ProBuilder and with some editing I got it in a pretty good and fun-to-use state. But then the question remains. How do I actually save my cube(s)? I didn't manage to find anything about that. So any help regarding this is greatly appreciated!
  9. Hertzole

    Export object UV map

    Hi! I have been playing around a bit with ProBuilder and I love it! But when it comes to textureing some props in my scene it becomes pretty annoying. So why not add a "Export UV Map" option so you can export a UV map for your object that you can edit in your favourite image editing tool? This would save a lot of time when making special props. In the UV editor you would arrange the UVs to the correct positions and then you can export it. Simple as that. (Maybe not in code but for the user) I am so sorry if I've missed it (But I couldn't find anything about this feature) or if this already have been suggested!
×