Skip to content

Instantly share code, notes, and snippets.

Peter Cardwell-Gardner thefuntastic

View GitHub Profile
@thefuntastic
thefuntastic / StateEngine.cs
Created Feb 9, 2016
Modifications to State Engine in order to enable OnCollisionEnter State calls
View StateEngine.cs
//Line ~138
//Bind the State Methods
case "OnCollisionEnter":
targetState.OnCollisionEnter = CreateDelegate<Action<Collision>>(methods[i], entity);
break;
//Line ~308
//Make sure state engine recieves collision events.
void OnCollisionEnter(Collision collision)
{
@thefuntastic
thefuntastic / gist:5b57c0ab540d6738f3ee2e518dd46652
Last active Jan 19, 2020
LibPDIntergration iOS static library build instructions
View gist:5b57c0ab540d6738f3ee2e518dd46652
# LibPd Binaries
LibPDIntegration relies on 64bit multi-user Libpd (https://github.com/libpd/libpd), which we now have to build ourselves. For an inexperienced user this can be black magic! It is also confusing because the libpd notes on iOS (https://github.com/libpd/pd-for-ios) tend to point towards using a wrapper for a native AU (Audio Unit) plugin. However as we're using Unity's native sound layer we don't need to worry about this.
It is also possible to embed a xcode project as a subproject of parent xcode Project. Eg the libpd xcode project would live under the Unity xcode project. The advantage of this scheme is that you will always build a valid libpd version for your Unity Project. However this is less portable as the Unity xcode project gets regenerated and one would have to set it up again each time.
Instead we choose to build a static library `*.a` file which is a native iOS plugin (aka a `*.dll`) and can be embedded inside Unity. (As `libpd/libpd.xcodeproj` already exists the following is onl
You can’t perform that action at this time.