Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411498 Posts in 69373 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 08:22:40 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)How to create custom inspector (for a scriptable object)
Pages: [1]
Print
Author Topic: How to create custom inspector (for a scriptable object)  (Read 589 times)
ggenije
Level 0
*



View Profile
« on: November 12, 2018, 04:07:00 AM »

https://imgur.com/a/is33cqT



alt text

This is what I'm trying to make in custom editor so it's like a wave of enemies data that I'm storing in next way: first int-> number of formations then select formation (one, pair, triple, shield...) and for each A FIXED NUMBER OF (1 for one ,two for pair , 3 for shield...) other enum (types) that way I can store many number of rounds without typing code, but I don't know how to make it to limit with fixed number...
---------
[PAIR]
-->[Type 1]
-->[Type 2]
[SHIELD]
-->[Type 3]
-->[Type 2]
-->[Type 2]
[One]
-->[Type 2]
Logged
bateleur
Level 10
*****



View Profile
« Reply #1 on: November 13, 2018, 12:02:11 AM »

Creating any kind of custom inspector is just a case of implementing an OnInspectorGUI() method for the object type in question. (Click the link, it shows you how to do it.)

All of the restrictions and capabilities you want are then just written as C# or JavaScript in the normal way. So, for example, you could use EditorGUI.EnumPopup to select a wave type.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic