Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property value is not saved #91

Closed
jineqbrainenergy opened this issue Jun 15, 2016 · 3 comments
Closed

Property value is not saved #91

jineqbrainenergy opened this issue Jun 15, 2016 · 3 comments

Comments

@jineqbrainenergy
Copy link

jineqbrainenergy commented Jun 15, 2016

Hi Vexe
I have the code looks like this

IMonster.cs


    [Serializable]
public class IMonster {
    public virtual void startAction () {}

}

StraightMonsterBehavior.cs


[Serializable]
public class StraightMonsterBehavior : IMonster {
    public string crashEffectName;

    [Show]
    public override void startAction() {
        Debug.Log ("here " + this.crashEffectName);
    }

    public IEnumerator updateAction() {
        yield return new WaitForSeconds(1);
        Debug.Log("do nothign");
    }

    public void endAction() {
    }
}

MonsterController.cs


public class MonsterController : BaseBehaviour {
     public IMonster monsterBehavior;

    void Start() {
        this.monsterBehavior.startAction();
    }
}

In the inspector, I selected StraightMonsterBehavior as the value of monsterBehavior
then settled crashEffectName. it works well till here.
But when I played, the value became Monster

I would like to know What mistakes I did? or I missunderstood on how to use your plugins?

Thank you

@jineqbrainenergy
Copy link
Author

Hi Vexe

I made use of BaseScriptableObject, and solved my problems

Thank you for the great plugins

@vexe
Copy link
Owner

vexe commented Jun 16, 2016

Hey there, did you read #88 ? custom serialization is no longer supported.

@jineqbrainenergy
Copy link
Author

jineqbrainenergy commented Jun 30, 2016

Hi Vexe.

Ive created something like this...

https://www.youtube.com/watch?v=KYgcjuuw6ds

to manage my SKILL objects,
which contain a lot of actions(abstractions)
such as: "Move Toward Enemy" or "Spawn Attack Effect(Kamehameha :D )".
your helpers are surely handy for that.

By made use of ScriptableObject.
I can also drag my custom SKILL objects into the scene for easier to debug.
But seem like it is slow as u mentioned, during editing.

I've learned my lessons.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants