[RESOLVED] Issue with AddCallback and other methods do not exist on State object in Unity

Stack
Stack
edited May 2019 in Photon Bolt
[RESOLVED] Lesson leant, Do not prefix states with the letter I, eg: "IPlayerState" causes weird issues, PlayerState works
correctly.

Hi,

I have used Bolt once before, and am trying to use it again in my latest project, using the latest Unity and latest Bolt versions, and have run into some trouble straight away and am really not sure what's wrong.

the method state.AddCallback, doesn't exist, in fact, no methods exist on my state object, all of my properties configured on my Bolt Object do exist, but no methods. I do not understand why, I haven't been able to find anything helpful in the documentation so far. I have recompiled several times but still do not get these methods appearing.

Maybe I've forgotten something but if so, it isn't obvious what that thing is.
Any idea's? Thanks!

Screenshot of my Bolt settings and behaviour code.





Comments

  • I tried also using a "State" type in Bolt for IPlayer instead of "Object" but when I did that, the entire class was inaccessible (ie: I get the compiler error that IPlayer is inaccessible due to its protection level)
  • Troubleshooting page suggests this
    Try: Edit -> Bolt Install -> Yes

    But this menu option doesn't exist in Unity at all. Even though the Bolt menu, does exist
  • Exact versions are

    Unity 2019.1.0f2
    Bolt 1.2.8
  • So it seems I am supposed to be using a "State" but again, doing so also has a compiler error which I seem unable to resolve.

    Which is ,that the class is inaccessible due to its protection level



    This all seems very very wrong. There has to be something fundamentally broken with my Bolt installation.. yet setting everything up again has not fixed anything for me.
  • I would close the project and delete the Visual Studio related files present. If that doesn't fix the issue I would try with a new project, perhaps using a stable Unity version like 2018.2
  • I've resolved it, and it was me doing something stupid it turns out.

    I reset everything, and started adding my states back in (leaving the demo ones there) when I got an error on compile that IPlayerState already exists... because there's already a sample one called PlayerState.

    Yes, stupid me, DO NOT start your state names with the letter I, as that gets added in automatically, putting the I in there screws that up.