Jump to content
Aveyond Studios Community
Duffer123

If (String Contains) HeroAction

Recommended Posts

@Ant,

Here goes nothing.  My first attempt at a Custom Action.  I've just (I hope) attached the relevant folders and two c# files.

I'm not sure what to do with the comparison variable.

Basically designed to return a bool true if value1 string contains value2 string.

Can you review and let me have some feedback?  If possible, heavily comment my code...?

thanks...

 

p.s. - I'd add a Tag for posts relating to 'Custom Action'.... ;)

[edit - 6-10-17]     version 1.1

I have attached a revised Unity Package including the new custom Hero Action "If (String Contains)" but taking in to account Ant's amendments...

[edit - 7-10-17]     version 1.2

I have attached a revised Unity Package including the new custom HeroAction "If (String Contains)" taking into account Ant's amendments but also attempting to introduce a bool field where if set to true the search is case insensitive and if set to false the  search is case sensitive.

 

HeroKit Action - If (String Contains) - v1.2.unitypackage

Share this post


Link to post
Share on other sites

@Ant,

Thanks.  May try and create some further Actions now.  Could you post the c# code for the same Hero Action but with also a bool defaulted to false re whether you want the string search to be case sensitive (true) or not.  I can add in the code for the case insensitive bit if you like.  Will really help.  Pls comment it as much as poss thx.

Share this post


Link to post
Share on other sites

@Ant,

Looking forward to you sample code for the above and the guidance / commenting in general on Custom Hero Actions.  In the meantime, in the first post above and here I attach the custom HeroAction 'If (String Contains)' now with all the right things included in the Unity Package - including there HeroAction - and taking in to account your existing amendments.

 

HeroKit Action - If (String Contains) - v1.1.unitypackage

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×