- Home /
How do i create an field in inspector which I could drag and drop others components in it?
ok i know about EditorGUILayout.ObjectField(...) but i dunno about what kind of type i need to specify so it can receive components.
I have an shader in which i have and component to pre calc things for it, this shader tracks info from a given component, today iam building this component to pass this info to the shader, but i want decouple these 2 (the shader controller and the object the shader is tracking) to do it i will open an slot on the inspector of the shader controller, and in this slot will receive one component from the object, once this component is loaded i'll get an reflection of the script who build that component and create a popup showing all floats fields and methods that return float, with that info i will make the controller to send this info into the shader, so the game designer could simply chose what data he will track with the shader, with no need of re-programing the object to send the info to the shader controller
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Renderer on object disabled after level reload 1 Answer
How can I make a tool bar show in the game view window using editor scripting? 0 Answers
Is possible to use EditorStyle on Unity in-game to do Horizontal Groups of Buttons? 0 Answers