Task Attributes of child classes

abc123

Member
Hello, until this moment I used native icons for my custom tasks. Now I want to use custom icons. I downloaded some 512x512 png image, set import options to sprite, max res to 256, set path in attribute (following documentation). And it didn't work, are there any tricks to make custom icons work?

Edit: also, is there a way to inherit an icon attribute? Because now, if I have a parent class and 10 child classes from it, I have to add the same icon for each child class. Changing icon for parent doesn't do anything.
 
Last edited:
There shouldn't be any tricks, just make sure you are starting with the "Assets" path. The Movement Pack uses custom icons so you could take a look at that, but the format is:

[TaskIcon("Assets/MyIcon.png")]

You probably won't need this but {SkinColor} is replaced with Light or Dark depending on the theme.

Edit: also, is there a way to inherit an icon attribute? Because now, if I have a parent class and 10 child classes from it, I have to add the same icon for each child class. Changing icon for parent doesn't do anything.
No, you cannot inherit task icons though that is a good idea.
 
I tried with different images, not doing anything with import options, and this time it worked! Problem solved.

And another related question, not to create separate thread. Is there a way to add/override some visual features in editor? For example I want referenced tasks to be connected with dotted lines, I want some special tasks to flash red in some cases etc.. Any quick tips on that? not going to change any native files, I'm only writing extensions and custom classes.
 
Glad you got it! The next version has inherited task icons :)

And another related question, not to create separate thread. Is there a way to add/override some visual features in editor? For example I want referenced tasks to be connected with dotted lines, I want some special tasks to flash red in some cases etc.. Any quick tips on that? not going to change any native files, I'm only writing extensions and custom classes.
You can change the inspector using object drawers but there isn't much customization on the graph side of things. I will need to think of the proper way to do that.
 
Glad you got it! The next version has inherited task icons :)
Very nice! Also, deriving task categories will be great. Currently they work a little bit strange - they forcefully inherit native category from abstract parent, but ignore user defined category of the parent. For example, I have my class InitAction, derived from native Action. And then I have multiple child classes, derived from InitAction.

This doesn't do anything

111.PNG



This works, but instead of "Custom" it puts child class into "Actions/Custom", not exactly what I wanted..

222.PNG

And of course, the most annoying part is that you have to do it for every child class.
 
Last edited:
@Justin
For me it still doesn't work in 1.6.5. You can find the scene is in attachment, it contains a couple of inherited tasks, all have default icon/category, despite parent class attributes.
 

Attachments

  • SampleScene.zip
    7.7 KB · Views: 1
Top