Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  create Obi handle on script at runtime
#11
(24-05-2019, 03:06 PM)josemendez Wrote: Hi,

In Unity, implementing things for the editor and for runtime (play mode) is often radically different. The editor uses immediate mode GUI, while at runtime you generally use Unity's UI system. Both work in completely different ways, so yes you can implement marquee selection for either purpose. You don't have to use the one implemented in edit particle mode. I already gave you two links with examples, both implement marquee selection tools in different ways and none of them needs Obi.

So you need to think about whether you want to implement this for an editor tool, or for a game/application. It is not entirely clear to me what you're after.
Hello.
It is for a game/application.
#12
(24-05-2019, 03:40 PM)Richard Wrote: Hello.
It is for a game/application.

Then, use Unity's UI. See:
https://unity3d.com/es/learn/tutorials/s...terface-ui
#13
(24-05-2019, 04:05 PM)josemendez Wrote: Then, use Unity's UI. See:
https://unity3d.com/es/learn/tutorials/s...terface-ui

How can I choose mesh to edit particle?
#14
(24-05-2019, 04:16 PM)Richard Wrote: How can I choose mesh to edit particle?

Hi,

Do you mean in-game? Well, it entirely depends on how you want to design your interface. You could have a list of all meshes and let the user select it from the list, or let him click on the scene and then raycast against all objects in your scene. There's many ways to do it.
#15
(24-05-2019, 04:32 PM)josemendez Wrote: Hi,

Do you mean in-game? Well, it entirely depends on how you want to design your interface. You could have a list of all meshes and let the user select it from the list, or let him click on the scene and then raycast against all objects in your scene. There's many ways to do it.

in-game means that I don't want to choose particle at runtime on edit particle of obi cloth/ obi tearable cloth, and "have a list of all meshes and let the user select it from the list" is ideal for me.
#16
(24-05-2019, 04:40 PM)Richard Wrote: in-game means that I don't want to choose particle at runtime on edit particle of obi cloth/ obi tearable cloth, and "have a list of all meshes and let the user select it from the list" is ideal for me.

Ok. This is something that isn't even remotely related to Obi, so I'm closing this thread.

There's tons of resources on how to create lists using Unity's UI, I encourage you to learn how to work with UI components.