Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel4

...

Upgrading .unitypackage files is a little more difficult.  This quote from the Unity docs explains it:

"For the cleanest possible upgrade, it should be considered to remove the old package contents first, as some scripts, effects or prefabs might have become deprecated or unneeded and Unity packages don't have a way of deleting (unneeded) files (but make sure to have a security copy of the old version available)."

The easiest way I've found is to use the approach the SVN docs recommend for vendor branch upgrades.

...

Code Block
languagecsharp
vhmsg.SubscribeMessage("someMessage");

...

Subscribe to all vhmsgs

Code Block
vhmsg.SubscribeMessage("*");

 

Send a vhmsg

Code Block
vhmsg.SendVHMsg("someMessage someParam1");

...

Handle a message

Code Block
languagecsharp
vhmsg.AddMessageEventHandler(new VHMsgBase.MessageEventHandler(VHMsg_MessageEvent));

void VHMsg_MessageEvent(object sender, VHMsgBase.Message message)
{
     string [] splitargs = message.s.Split( " ".ToCharArray() );
     if (splitargs[0] == "someMessage")
          // Do Something
}

...