Revision: 220
Author:
connec...@gmail.com
Date: Fri Jul 12 15:00:14 2013
Log: no longer requires messing with the syphon manager script. Simply
add a SyphonClientTexture script to an object, type its appName/name, and
it will work.
http://code.google.com/p/syphon-implementations/source/detail?r=220
Modified:
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Editor/SyphonEditor.cs
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/Syphon.cs
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonObject/SyphonClientObject.cs
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonClientTexture.cs
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/syphonSupportedShaderCloth.mat
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/SyphonServerAndClient.unity
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonClientUnity.m
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonUnity.mm
/trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonUnityPlugin.xcodeproj/project.pbxproj
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Editor/SyphonEditor.cs
Sun Mar 25 11:50:20 2012
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Editor/SyphonEditor.cs
Fri Jul 12 15:00:14 2013
@@ -29,27 +29,27 @@
using System.Collections.Generic;
[CustomEditor(typeof(Syphon))]
public class SyphonEditor : Editor {
- private int GUIServerSelectionIndex = 0;
+// private int GUIServerSelectionIndex = 0;
private const string SERVERS_LABEL = "SERVERS: ";
private const string SERVERS_LABEL_NONE = "No Syphon servers detected.";
- private string serverConfirmKey;
- private string serverConfirmValue;
- private bool showServerConfirmState = false;
+// private string serverConfirmKey;
+// private string serverConfirmValue;
+// private bool showServerConfirmState = false;
- [SerializeField]
- private int GUIClientSelectionIndex = 0;
+// [SerializeField]
+// private int GUIClientSelectionIndex = 0;
private const string CLIENTS_LABEL = "CLIENTS: ";
private const string CLIENTS_LABEL_NONE = "No Syphon clients detected.";
private string clientConfirmKey;
private string clientConfirmValue;
- [SerializeField]
- private bool showClientConfirmState = false;
- [SerializeField]
- SyphonClientObject selectedClientObj = null;
+// [SerializeField]
+// private bool showClientConfirmState = false;
+// [SerializeField]
+// SyphonClientObject selectedClientObj = null;
private bool repaintGUI = false;
Syphon syphon;
- private int foldoutState = -1;
+// private int foldoutState = -1;
private bool addedSyphonDelegates = false;
private Syphon syphonTarget;
public Syphon SyphonTarget{
@@ -103,107 +103,108 @@
GUILayout.Space(5);
GUILayout.Label(CLIENTS_LABEL);
- if(SyphonTarget.clientAppNames.Count == 0)
- GUILayout.Label(CLIENTS_LABEL_NONE);
+// if(SyphonTarget.clientAppNames.Count == 0)
+// GUILayout.Label(CLIENTS_LABEL_NONE);
- drawGUIClientEditor();
+// drawGUIClientEditor();
if(GUILayout.Button("clear clients list")){
- foreach(SyphonClientObject obj in SyphonTarget.unsortedClients){
+ foreach(SyphonClientObject obj in Syphon.SyphonClients){
DestroyImmediate(obj);
}
- SyphonTarget.unsortedClients.Clear();
- SyphonTarget.UpdateClientNames();
+ Syphon.SyphonClients.Clear();
+// SyphonTarget.UpdateClientNames();
}
// DrawDefaultInspector();
}
- public void drawGUIClientEditor(){
- foreach(KeyValuePair<string,string[]> kvp in
SyphonTarget.clientAppNames){
- GUI.changed = false;
- int selectIndex = 0;
-
- //if you're not drawing the one you've selected, the index is 0.
- if(kvp.Key != clientConfirmKey){
- selectIndex = 0;
- }
- //otherwise, the index is whatever the selected index is.
- else
- selectIndex = GUIClientSelectionIndex;
-
- selectIndex = EditorGUILayout.Popup(kvp.Key, selectIndex, kvp.Value);
- if(GUI.changed){
- //Debug.Log("Selected: " + kvp.Key + " : " +
kvp.Value[GUIClientSelectionIndex] + "!");
- GUIClientSelectionIndex = selectIndex;
- showClientConfirmState = true;
- clientConfirmKey = kvp.Key;
- clientConfirmValue = kvp.Value[GUIClientSelectionIndex];
- selectedClientObj = Syphon.GetSyphonClient(clientConfirmKey,
clientConfirmValue);
- }
- }
-
- if(showClientConfirmState && selectedClientObj != null){
-
- SyphonClientObject destroyObj = null;
-
- GUILayout.BeginHorizontal();
- GUILayout.BeginVertical();
- GUILayout.Label("App: "+
selectedClientObj.AttachedServer.SyphonServerDescriptionAppName
+ "\nName: " +
- selectedClientObj.AttachedServer.SyphonServerDescriptionName);
- if(GUILayout.Button("remove client")){
- destroyObj = selectedClientObj;
- }
- GUILayout.EndVertical();
- GUILayout.Label(new GUIContent("",
selectedClientObj.AttachedTexture,"App: "+
- selectedClientObj.AttachedServer.SyphonServerDescriptionAppName
+ "\nName: "
- + selectedClientObj.AttachedServer.SyphonServerDescriptionName),
GUILayout.MaxWidth(150), GUILayout.MaxHeight(128));
- GUILayout.EndHorizontal();
-
- if(destroyObj != null){
- Syphon.DestroyClient(destroyObj);
- showClientConfirmState = false;
- GUIClientSelectionIndex = 0;
- }
- }
- }
-
+// public void drawGUIClientEditor(){
+// foreach(KeyValuePair<string,string[]> kvp in
SyphonTarget.clientAppNames){
+// GUI.changed = false;
+// int selectIndex = 0;
+//
+// //if you're not drawing the one you've selected, the index is 0.
+// if(kvp.Key != clientConfirmKey){
+// selectIndex = 0;
+// }
+// //otherwise, the index is whatever the selected index is.
+// else
+// selectIndex = GUIClientSelectionIndex;
+//
+// selectIndex = EditorGUILayout.Popup(kvp.Key, selectIndex, kvp.Value);
+// if(GUI.changed){
+// //Debug.Log("Selected: " + kvp.Key + " : " +
kvp.Value[GUIClientSelectionIndex] + "!");
+// GUIClientSelectionIndex = selectIndex;
+// showClientConfirmState = true;
+// clientConfirmKey = kvp.Key;
+// clientConfirmValue = kvp.Value[GUIClientSelectionIndex];
+// selectedClientObj = Syphon.GetSyphonClient(clientConfirmKey,
clientConfirmValue);
+// }
+// }
+//
+//// if(showClientConfirmState && selectedClientObj != null){
+////
+//// SyphonClientObject destroyObj = null;
+////
+//// GUILayout.BeginHorizontal();
+//// GUILayout.BeginVertical();
+//// GUILayout.Label("App: "+
selectedClientObj.AttachedServer.SyphonServerDescriptionAppName
+ "\nName: " +
+//// selectedClientObj.AttachedServer.SyphonServerDescriptionName);
+//// if(GUILayout.Button("remove client")){
+//// destroyObj = selectedClientObj;
+//// }
+//// GUILayout.EndVertical();
+//// GUILayout.Label(new GUIContent("",
selectedClientObj.AttachedTexture,"App: "+
+//// selectedClientObj.AttachedServer.SyphonServerDescriptionAppName
+ "\nName: "
+//// + selectedClientObj.AttachedServer.SyphonServerDescriptionName),
GUILayout.MaxWidth(150), GUILayout.MaxHeight(128));
+//// GUILayout.EndHorizontal();
+////
+//// if(destroyObj != null){
+//// Syphon.DestroyClient(destroyObj);
+//// showClientConfirmState = false;
+//// GUIClientSelectionIndex = 0;
+//// }
+//// }
+// }
+//
public void drawGUIServerEditor(){
foreach(KeyValuePair<string,string[]> kvp in
SyphonTarget.serverAppNames){
GUI.changed = false;
int selectIndex = 0;
- if(kvp.Key != serverConfirmKey){
- selectIndex = 0;
- }
- else
- selectIndex = GUIServerSelectionIndex;
+// if(kvp.Key != serverConfirmKey){
+// selectIndex = 0;
+// }
+// else
+// selectIndex = GUIServerSelectionIndex;
+
selectIndex = EditorGUILayout.Popup(kvp.Key, selectIndex, kvp.Value);
- if(GUI.changed){
- //Debug.Log("Selected: " + kvp.Key + " : " +
kvp.Value[GUIServerSelectionIndex] + "!");
- GUIServerSelectionIndex = selectIndex;
- showServerConfirmState = true;
- serverConfirmKey = kvp.Key;
- serverConfirmValue = kvp.Value[selectIndex];
- }
+// if(GUI.changed){
+// //Debug.Log("Selected: " + kvp.Key + " : " +
kvp.Value[GUIServerSelectionIndex] + "!");
+// GUIServerSelectionIndex = selectIndex;
+// showServerConfirmState = true;
+// serverConfirmKey = kvp.Key;
+// serverConfirmValue = kvp.Value[selectIndex];
+// }
}
- if(showServerConfirmState &&
SyphonTarget.servers.ContainsKey(serverConfirmKey) &&
SyphonTarget.servers[serverConfirmKey].ContainsKey(serverConfirmValue) ){
- GUILayout.BeginHorizontal();
- GUILayout.Label("ADD CLIENT:\nAPP: " + serverConfirmKey + "\nNAME: " +
serverConfirmValue);
- if(GUILayout.Button("YES")){
- Syphon.CreateClient(serverConfirmKey, serverConfirmValue);
- showServerConfirmState = false;
- }
- else if(GUILayout.Button("NO")){
- showServerConfirmState = false;
- }
-
- GUILayout.EndHorizontal();
- }
+// if(showServerConfirmState &&
SyphonTarget.servers.ContainsKey(serverConfirmKey) &&
SyphonTarget.servers[serverConfirmKey].ContainsKey(serverConfirmValue) ){
+// GUILayout.BeginHorizontal();
+// GUILayout.Label("ADD CLIENT:\nAPP: " + serverConfirmKey + "\nNAME: "
+ serverConfirmValue);
+// if(GUILayout.Button("YES")){
+// Syphon.CreateClient(serverConfirmKey, serverConfirmValue);
+// showServerConfirmState = false;
+// }
+// else if(GUILayout.Button("NO")){
+// showServerConfirmState = false;
+// }
+//
+// GUILayout.EndHorizontal();
+// }
}
//this is a nifty way to trigger inspector updates- only triggered by
Syphon.cs as needed.
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/Syphon.cs
Tue Jul 2 19:22:30 2013
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/Syphon.cs
Fri Jul 12 15:00:14 2013
@@ -70,35 +70,38 @@
[SerializeField]
- public Dictionary<string, Dictionary<string, SyphonServerObject>> servers
= new Dictionary<string, Dictionary<string, SyphonServerObject>>();
+ private Dictionary<string, Dictionary<string, SyphonServerObject>>
servers = new Dictionary<string, Dictionary<string, SyphonServerObject>>();
+
[SerializeField]
- public List<SyphonClientObject> unsortedClients = new
List<SyphonClientObject>();
- public static List<SyphonClientObject> UnsortedClients {
+ private Dictionary<SyphonClientTexture, SyphonClientObject>
clientInstances = new Dictionary<SyphonClientTexture, SyphonClientObject>();
+ public static Dictionary<SyphonClientTexture, SyphonClientObject>
ClientInstances{ get{ return Syphon.Instance.clientInstances; }}
+
+
+ [SerializeField]
+ private static List<int[]> textureUpdateRequests = new List<int[]>();
+
+ [SerializeField]
+ public List<SyphonClientObject> syphonClients = new
List<SyphonClientObject>();
+ public static List<SyphonClientObject> SyphonClients {
get{
- return Syphon.Instance.unsortedClients;
+ return Syphon.Instance.syphonClients;
}
set{
- Syphon.Instance.unsortedClients = value;
+ Syphon.Instance.syphonClients = value;
}
}
[SerializeField]
public Dictionary<string, string[]> serverAppNames = new
Dictionary<string, string[]>();
- [SerializeField]
- public Dictionary<string, string[]> clientAppNames = new
Dictionary<string, string[]>();
//getters for Client/Server dictionaries and app-sorted arrays.
public static Dictionary<string, Dictionary<string, SyphonServerObject>>
Servers{ get{ return Syphon.Instance.servers; }}
- public static Dictionary<string, string[]> ClientAppNames{ get{ return
Syphon.Instance.clientAppNames; }}
+
public static Dictionary<string, string[]> ServerAppNames{ get{ return
Syphon.Instance.serverAppNames;}}
-
- //public List<SyphonClientTexture> clientTextures = new
List<SyphonClientTexture>();
-
private static int updateContext = 1;
private static bool updatedAssembly = false;
-
//if you don't have a name, name its dictionary hash unnamed.
private const string unnamed = "unnamed";
public static string UNNAMED_STRING{ get{ return unnamed; }}
@@ -174,9 +177,6 @@
public delegate void RepaintServerListGUIHandler();
public event RepaintServerListGUIHandler RepaintServerListGUI;
-
-
-
[AttributeUsage (AttributeTargets.Method)]
public sealed class MonoPInvokeCallbackAttribute : Attribute {
public MonoPInvokeCallbackAttribute (Type t) {}
@@ -201,11 +201,45 @@
public delegate void UpdateServerHandler(string appName, string name);
public static event UpdateServerHandler UpdateServer;
- //prototype delegate for updating client textures
- public delegate void UpdateClientTexturesHandler();
- public static event UpdateClientTexturesHandler UpdateClientTextures;
+ //prototype delegate for updating client textures - unneeded now that
we're using direct callbacks.
+// public delegate void UpdateClientTexturesHandler();
+// public static event UpdateClientTexturesHandler UpdateClientTextures;
-
+ private void registerClientInstance(SyphonClientTexture tex,
SyphonClientObject obj){
+ if(!clientInstances.ContainsKey(tex)){
+ clientInstances.Add(tex, obj);
+ }
+ }
+
+ private void unregisterClientInstance(SyphonClientTexture tex){
+ if(clientInstances.ContainsKey(tex)){
+ SyphonClientObject obj = clientInstances[tex];
+ clientInstances.Remove(tex);
+ //iterate through all the syphonClients.
+ //if there are no more objects that match the object listed, destroy
the bitch.
+ bool found = false;
+ foreach(KeyValuePair<SyphonClientTexture,SyphonClientObject> kvp in
clientInstances)
+ {
+ //if you find an object registered that matches the syphon client
list, dont destroy it yet.
+ if(kvp.Value == obj && kvp.Key != tex)
+ found = true;
+ }
+ if(!found)
+ {
+ DestroyClient(obj);
+ }
+ }
+ }
+
+ public static void RegisterClientInstance(SyphonClientTexture tex,
SyphonClientObject obj){
+ if(Syphon.instance != null)
+ Syphon.Instance.registerClientInstance(tex, obj);
+ }
+
+ public static void UnregisterClientInstance(SyphonClientTexture tex){
+ if(Syphon.instance != null)
+ Syphon.Instance.unregisterClientInstance(tex);
+ }
public void initSyphonServers(){
// StackTrace stackTrace = new StackTrace();
// UnityEngine.Debug.Log("init'd syphon servers "+
stackTrace.GetFrame(1).GetMethod().Name);
@@ -224,20 +258,20 @@
System.GC.Collect();
}
- public void initSyphonClients(){
-
- foreach(SyphonClientObject obj in unsortedClients){
- //if the server exists and is valid, you may update it with the latest
infos about the attached server, and initialize.
- if(Syphon.Servers.ContainsKey(obj.BoundAppName) &&
Syphon.Servers[obj.BoundAppName].ContainsKey(obj.BoundName)){
- //making the assumption here that the client is not initialized when
this method is called.
-
obj.DefineSyphonClient(Syphon.Servers[obj.BoundAppName][obj.BoundName]);
- obj.InitSyphonClient();
- }
- }
-
- Instance.UpdateClientNames();
-
- }
+// public void initSyphonClients(){
+//
+// foreach(SyphonClientObject obj in SyphonClients){
+// //if the server exists and is valid, you may update it with the
latest infos about the attached server, and initialize.
+// if(Syphon.Servers.ContainsKey(obj.BoundAppName) &&
Syphon.Servers[obj.BoundAppName].ContainsKey(obj.BoundName)){
+// //making the assumption here that the client is not initialized when
this method is called.
+//
obj.DefineSyphonClient(Syphon.Servers[obj.BoundAppName][obj.BoundName]);
+// obj.InitSyphonClient();
+// }
+// }
+//
+// Instance.UpdateClientNames();
+//
+// }
public static void cacheAssembly(){
@@ -253,27 +287,36 @@
if(!updatedAssembly){
cacheAssembly();
}
- foreach(SyphonClientObject obj in unsortedClients)
- obj.Render();
+
+ for(int i = 0; i < SyphonClients.Count; i++)
+ SyphonClients[i].Render();
}
public void LateUpdate(){
- Syphon.UpdateTextureSizes();
-
- if(UpdateClientTextures != null){
- UpdateClientTextures();
+// Syphon.UpdateTextureSizes();
+// if(UpdateClientTextures != null){
+// UpdateClientTextures();
+// }
+//
+ //execute any queued texture update requests here
+ if(textureUpdateRequests.Count != 0){
+ for(int i = 0; i < textureUpdateRequests.Count; i++){
+ foreach(SyphonClientObject obj in Syphon.SyphonClients){
+ if(obj.SyphonClientPointer == textureUpdateRequests[i][0]){
+ obj.UpdateTextureSize(textureUpdateRequests[i][1],
textureUpdateRequests[i][2]);
+ }
+ }
+ }
+ textureUpdateRequests.Clear();
}
-
}
+
public void Awake() {
+ //first thing you do is make sure callbacks are registered. that's what
this method does.
cacheAssembly();
-// DontDestroyOnLoad(this.gameObject);
-
-
-
//if there is an extra instance of Syphon that exists, destroy it.
//Syphon is supposed to act like a singleton, so force it to behave like
one.
@@ -284,22 +327,29 @@
//force the instance references to be valid each time you play the game.
instance = this;
-
+
+ //init the syphon servers. this will effectively call OnServerAnnounce
for every client object that exists.
Instance.initSyphonServers();
- Instance.initSyphonClients();
+ //update the server names to be shown in the gui. this is kinda dumb,
but...
+ UpdateServerNames();
+
+//so it's really not correct to call this.
+// Instance.initSyphonClients();
+
//print(serverAppNames.Count +" " + Syphon.ServerAppNames.Count);
initialized = true;
}
[MonoPInvokeCallback (typeof (OnTextureSizeChangedDelegate))]
public static void OnTextureSizeChanged(int ptr, int width, int height){
-// Debug.Log("Syphon Texture size changed! ptr: " + ptr + " w/h: " +
width + " " + height);
+ if(width == 0 || height == 0){
+// UnityEngine.Debug.Log ("h or w is zero! exiting.");
+ return;
+ }
- foreach(SyphonClientObject obj in Syphon.UnsortedClients){
- if(obj.SyphonClientPointer == ptr){
- obj.UpdateTextureSize(width, height);
- }
- }
+ textureUpdateRequests.Add (new int[]{ptr, width, height});
+
+// UnityEngine.Debug.Log("Syphon Texture size changed! ptr: " + ptr + "
w/h: " + width + " " + height);
}
[MonoPInvokeCallback (typeof (OnAnnounceServerDelegate))]
@@ -307,20 +357,27 @@
// UnityEngine.Debug.Log("Announcing the server with the appName: "
// + appName + ", name: " + name + ", uuid: " + uuid + " server
Pointer: "+ (int)serverPtr);
+
+ //if we don't yet have a key for that app, create a new dictionary entry.
if(!Syphon.Servers.ContainsKey(appName)){
Syphon.Servers.Add(appName, new Dictionary<string,
SyphonServerObject>());
}
+
+ //now if the server name is empty, add an UNNAMED_STRING entry to the
app's dictionary list
if(name == ""){
if(!Syphon.Servers[appName].ContainsKey(Syphon.UNNAMED_STRING)){
Syphon.Servers[appName].Add(Syphon.UNNAMED_STRING, new
SyphonServerObject(appName, name, uuid, serverPtr));
}
}
+ //if it's not empty, just create a normal entry and SyphonServerObject.
else if(!Syphon.Servers[appName].ContainsKey(name)){
Syphon.Servers[appName].Add(name, new SyphonServerObject(appName,
name, uuid, serverPtr));
}
-
+
+ //TODO: this is dumb, remove this.
Instance.UpdateServerNames();
+ //callback to the client textures to let them know a new server came
online
if(AnnounceServer != null)
AnnounceServer(appName, name);
}
@@ -333,42 +390,61 @@
// //should now check all clients to see if any were using this
SyphonClient. if so, respond appropriately.
//
myself.myClientObjects[i].handleServerUpdate(myself.myServers[myIndex]);
// }
-
+
+ //TODO: remove this
Instance.UpdateServerNames();
+
+ //TODO: handle 'update server' events, whatever that means?
if(UpdateServer != null)
UpdateServer(appName, name);
}
- [MonoPInvokeCallback (typeof (OnRetireServerDelegate))]
- public static void OnRetireServer(string appName, string name, string
uuid){
+ [MonoPInvokeCallback (typeof (OnRetireServerDelegate))]
+ public static void OnRetireServer(string appName, string name, string
uuid){
// UnityEngine.Debug.Log(appName + " "+ name + " " + uuid + " are leaving
now.");
- if(Syphon.Servers.ContainsKey(appName)){
- if(name == ""){
- if(Syphon.Servers[appName].ContainsKey(Syphon.UNNAMED_STRING)){
- Syphon.Servers[appName].Remove(Syphon.UNNAMED_STRING);
- if(Syphon.Servers[appName].Count == 0){
- Syphon.Servers.Remove(appName);
- }
- }
- }
- else if(Syphon.Servers[appName].ContainsKey(name)){
- Syphon.Servers[appName].Remove(name);
-
+ //if there are any ACTIVE client singleton objects in use,
+ //destroy them immediately.
+ //destroy their texture and destroy the pointer to them, and remove them
from the SyphonClients list.
+ SyphonClientObject result = Syphon.GetSyphonClient(appName, name);
+ if(result){
+ DestroyClient (result);
+ }
+ //-----------------------------
+
+ //now remove the server name
+ //if it doesn't contain the appName key, you shouldn't have to do
anything.
+ if(Syphon.Servers.ContainsKey(appName)){
+ if(name == ""){
+ //if the name is UNNAMED_STRING and it contains the unnamed string,
remove the server from the list.
+ if(Syphon.Servers[appName].ContainsKey(Syphon.UNNAMED_STRING)){
+ Syphon.Servers[appName].Remove(Syphon.UNNAMED_STRING);
+
+ //if there are no more objects in the dictionary list for that app,
remove the associated appName entry
if(Syphon.Servers[appName].Count == 0){
Syphon.Servers.Remove(appName);
}
}
-
- Instance.UpdateServerNames();
}
+ //if the name is valid and the server's app dictionary contains the
name string, remove the server from the list.
+ else if(Syphon.Servers[appName].ContainsKey(name)){
+ Syphon.Servers[appName].Remove(name);
- RemoveClient(appName, name);
-
- if(RetireServer != null)
- RetireServer(appName, name);
+ //if there are no more entries in the dictionary list for that app,
remove the associated appName entry
+ if(Syphon.Servers[appName].Count == 0){
+ Syphon.Servers.Remove(appName);
+ }
+ }
+ //TODO: remove this.
+ Instance.UpdateServerNames();
}
+
+ if(RetireServer != null)
+ RetireServer(appName, name);
+
+
+ }
public void UpdateServerNames(){
serverAppNames.Clear();
@@ -399,7 +475,7 @@
public static SyphonClientObject GetSyphonClient(string appName, string
name){
- return Syphon.UnsortedClients.Find( delegate (SyphonClientObject obj) {
+ return Syphon.SyphonClients.Find( delegate (SyphonClientObject obj) {
return obj.MatchesDescription(appName, name);
});
@@ -420,124 +496,54 @@
return null;
}
- public static void AddClientToUnsortedList(string appName, string name,
SyphonServerObject server){
+ public static SyphonClientObject AddClientToSyphonClientsList(string
appName, string name, SyphonServerObject server){
SyphonClientObject result = GetSyphonClient(appName, name);
// Debug.Log(result.BoundAppName + " " + result.BoundName + " was the
result");
+ //if it doesn't exist, create an instance of a SyphonClientObject, and
init it.
+ //when we init it, we tell all our other syphonclienttextures that have
registered to
if(result == null){
-// Debug.Log("DIDNT EXIST: " + appName + "/" +name);
+// UnityEngine.Debug.Log("DIDNT EXIST: " + appName + "/" +name);
//if it was null when trying to add a new client, just add a new one
and init.
-
Syphon.UnsortedClients.Add(ScriptableObject.CreateInstance<SyphonClientObject>()
);
- Syphon.UnsortedClients[Syphon.UnsortedClients.Count -1
].DefineSyphonClient(server);
- Syphon.UnsortedClients[Syphon.UnsortedClients.Count -1
].InitSyphonClient();
+ result = ScriptableObject.CreateInstance<SyphonClientObject>();
+ result.DefineSyphonClient(server);
+ result.InitSyphonClient();
+ Syphon.SyphonClients.Add(result);
}
else{
-// Debug.Log("EXISTED: " + appName + "/" +name);
- result.DestroySyphonClient();
- result.DefineSyphonClient(server);
- result.InitSyphonClient();
+
+// UnityEngine.Debug.Log("EXISTED: " + appName + "/" +name + ". doing
nothing.");
+// result.DestroySyphonClient();
+// result.DefineSyphonClient(server);
+// result.InitSyphonClient();
}
+ return result;
}
//CLIENT METHODS
- public static void CreateClient(string appName, string name){
- //make sure the server exists..
- if(name == Syphon.UNNAMED_STRING && Syphon.Servers.ContainsKey(appName)
&& Syphon.Servers[appName].ContainsKey(Syphon.UNNAMED_STRING)){
- AddClientToUnsortedList(appName, Syphon.UNNAMED_STRING,
Syphon.Servers[appName][Syphon.UNNAMED_STRING]);
+ public static SyphonClientObject CreateClient(string appName, string
name){
+ //make sure the server exists in the Syphon.Servers array before trying
to add it.
+ if( (name == Syphon.UNNAMED_STRING || name == "") &&
Syphon.Servers.ContainsKey(appName) &&
Syphon.Servers[appName].ContainsKey(Syphon.UNNAMED_STRING)){
+ return AddClientToSyphonClientsList(appName, Syphon.UNNAMED_STRING,
Syphon.Servers[appName][Syphon.UNNAMED_STRING]);
}
else if(Syphon.Servers.ContainsKey(appName) &&
Syphon.Servers[appName].ContainsKey(name)){
- AddClientToUnsortedList(appName, name, Syphon.Servers[appName][name]);
+ return AddClientToSyphonClientsList(appName, name,
Syphon.Servers[appName][name]);
}
- //update the client names array (for gui display)
- Instance.UpdateClientNames();
+ return null;
}
//removes the client from the clients list and destroys it.
- public static void DestroyClient(SyphonClientObject destroyObj){
- if(destroyObj != null){
- Syphon.UnsortedClients.Remove(destroyObj);
- DestroyImmediate(destroyObj);
- destroyObj = null;
- Syphon.Instance.UpdateClientNames();
- }
- }
-
- public static void RemoveClient(string appName, string name){
- //make sure the server exists...
-// SyphonServerObject match = null;
-// if(name == ""){
-// if(match = GetServerObject(appName, Syphon.UNNAMED_STRING)){
-// Syphon.ServersList.Remove(match );
-// Debug.Log("REMOVED " + appName + " " + Syphon.UNNAMED_STRING);
-// }
-// }
-// else if(match = GetServerObject(appName, name)){
-// Syphon.ServersList.Remove(match );
-// Debug.Log("REMOVED " + appName + " " + name);
-// }
-//
-// if(Syphon.Clients.ContainsKey(appName) &&
Syphon.Clients[appName].ContainsKey(name)){
-// //make sure you destroy to remove the texture and clean up plugin
references
-// // Syphon.Clients[appName][name].DestroySyphonClient();
-//
-// Syphon.Clients[appName].Remove(name);
-//
-//
-// if(Syphon.Clients[appName].Count == 0){
-// Syphon.Clients.Remove(appName);
-// }
-// }
-
- Instance.UpdateClientNames();
- }
-
-
- public void UpdateClientNames(){
- clientAppNames.Clear();
-
- foreach(SyphonClientObject obj in Syphon.UnsortedClients){
- //if it doesn't contain the appName key yet...
- if(!clientAppNames.ContainsKey(obj.BoundAppName)){
- //add it and create the name key.
- clientAppNames.Add(obj.BoundAppName, new string[1]);
- clientAppNames[obj.BoundAppName][0] = obj.BoundName;
- }
- else{ //if it DID contain the key already, add 1 to the array and
append the boundName to the array.
- bool found = false;
- foreach(string foundString in clientAppNames[obj.BoundAppName]){
- if(foundString == obj.BoundName)
- found = true;
- }
- //if the object doesnt exist in the array yet,
- if(!found){
- //append the appName to the BoundAppName array
- string[] newArr = new
string[clientAppNames[obj.BoundAppName].Length+1];
- for(int i = 0; i < newArr.Length; i++){
- if( i < newArr.Length-1){
- newArr[i] = clientAppNames[obj.BoundAppName][i];
- }
- else{
- newArr[i] = obj.BoundName;
- }
- }
- clientAppNames[obj.BoundAppName] = newArr;
- }
- }
- }
- Instance.OnRepaintServerListGUI();
- }
-
+public static void DestroyClient(SyphonClientObject destroyObj){
+ if(destroyObj != null){
+ Syphon.SyphonClients.Remove(destroyObj);
+ DestroyImmediate(destroyObj);
+ destroyObj = null;
+ }
+}
- public void OnPreRender(){
+public void OnPreRender(){
//call 1 to cache context.
-// print("client count: " + Instance.clientAppNames.Count );
GL.IssuePluginEvent(updateContext);
- }
-
-
-
-
-
-
+}
}
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonObject/SyphonClientObject.cs
Tue Jul 2 19:22:30 2013
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonObject/SyphonClientObject.cs
Fri Jul 12 15:00:14 2013
@@ -61,16 +61,10 @@
[NonSerialized]
private bool initialized = false;
public bool Initialized{ get {return initialized; }}
- [NonSerialized]
- private float lastTime = -1;
- [NonSerialized]
- private bool announceServerQueue = false;
- [NonSerialized]
- private SyphonServerObject announceServerQueueServer = null;
- [NonSerialized]
- private bool retireServerQueue = false;
-
+// [NonSerialized]
+// public bool retireSyphonClientQueue = false;
+
public delegate void AnnounceClientHandler(SyphonClientObject obj);
public static event AnnounceClientHandler AnnounceClient;
@@ -92,34 +86,34 @@
boundName = server.SyphonServerDescriptionName;
//initialize the texture
if(attachedTexture == null){
- attachedTexture = new RenderTexture(128, 128, 0,
RenderTextureFormat.ARGB32);
- attachedTexture.filterMode = FilterMode.Bilinear;
- attachedTexture.wrapMode = TextureWrapMode.Clamp;
+ attachedTexture = new RenderTexture(128, 128, 0,
RenderTextureFormat.ARGB32);
+ attachedTexture.filterMode = FilterMode.Bilinear;
+ attachedTexture.wrapMode = TextureWrapMode.Clamp;
}
// Debug.Log("created syphon client: " + boundName + " " +boundAppName);
//TODO: create the syphon client in plugin
}
- public void DefineSyphonClient(SyphonClientObject client){
-
- // UnityEngine.Debug.Log("created syphon client: " + boundName + " "
+boundAppName);
- //hold on to object reference
- attachedServer = client.attachedServer;
- boundAppName = client.AttachedServer.SyphonServerDescriptionAppName;
- if(client.AttachedServer.SyphonServerDescriptionName == "")
- boundName = Syphon.UNNAMED_STRING;
- else
- boundName = client.AttachedServer.SyphonServerDescriptionName;
-
- //initialize the texture
- if(attachedTexture == null){
- attachedTexture = new RenderTexture(128, 128, 0,
RenderTextureFormat.ARGB32);
- attachedTexture.filterMode = FilterMode.Bilinear;
- attachedTexture.wrapMode = TextureWrapMode.Clamp;
- }
- //TODO: create the syphon client in plugin
- }
+// public void DefineSyphonClient(SyphonClientObject client){
+//
+// // UnityEngine.Debug.Log("created syphon client: " + boundName + " "
+boundAppName);
+// //hold on to object reference
+// attachedServer = client.attachedServer;
+// boundAppName = client.AttachedServer.SyphonServerDescriptionAppName;
+// if(client.AttachedServer.SyphonServerDescriptionName == "")
+// boundName = Syphon.UNNAMED_STRING;
+// else
+// boundName = client.AttachedServer.SyphonServerDescriptionName;
+//
+// //initialize the texture
+// if(attachedTexture == null){
+// attachedTexture = new RenderTexture(128, 128, 0,
RenderTextureFormat.ARGB32);
+// attachedTexture.filterMode = FilterMode.Bilinear;
+// attachedTexture.wrapMode = TextureWrapMode.Clamp;
+// }
+// //TODO: create the syphon client in plugin
+// }
public void UpdateTextureSize(int w, int h){
@@ -132,6 +126,8 @@
attachedTexture.height = height;
Graphics.Blit( Syphon.NullTexture,attachedTexture);
+
+ //every GameObject that is using this syphon server might want to know
that the size changed.
if(UpdateClientTextureSize != null){
UpdateClientTextureSize(this);
}
@@ -145,10 +141,13 @@
if(Application.isPlaying && attachedServer.SyphonServerPointer != 0
&& !initialized){
// Debug.Log("EXECUTING syphon client: " + boundAppName + " " +
boundName);
attachedTexture.Create();
+ Syphon.SafeMaterial.SetPass(0);
RenderTexture.active = attachedTexture;
Graphics.Blit( Syphon.NullTexture,attachedTexture);
RenderTexture.active = null;
- //RenderTexture.active = attachedTexture;
+
+ //this does not allocate GL resources- it simply creates a
SyphonCacheData object on the heap
+ //and saves the pointer in Unity here
syphonClientPointer =
Syphon.CreateClientTexture(attachedServer.SyphonServerPointer);
Syphon.CacheClientTextureValues(attachedTexture.GetNativeTextureID(),
attachedTexture.width, attachedTexture.height, syphonClientPointer);
initialized = true;
@@ -173,37 +172,17 @@
}
return false;
}
-
- public void AnnounceServer(string appName, string name){
- if(!initialized && MatchesDescription(appName, name)){
- announceServerQueueServer = Syphon.GetSyphonServer(appName, name);
- if(announceServerQueueServer != null){
- announceServerQueue = true;
- // // DestroySyphonClient();
- // DefineSyphonClient(server);
- // InitSyphonClient();
- // Debug.Log("announced app:" + appName + " name: " + name );
- }
- }
+
+ public void UpdateServer(string appName, string name){
+ if(MatchesDescription(appName, name)){
+ //TODO: handle this? how?
+ // Debug.Log("updated app:" + appName + " name: " + name );
}
- public void RetireServer(string appName, string name){
- if(initialized && MatchesDescription(appName, name)){
- retireServerQueue = true;
-// DestroySyphonClient();
- // Debug.Log("retired app:" + appName + " name: " + name );
- }
- }
- public void UpdateServer(string appName, string name){
- if(MatchesDescription(appName, name)){
- // Debug.Log("updated app:" + appName + " name: " + name );
- }
- }
+ }
-
-
public void DestroySyphonClient(){
-// UnityEngine.Debug.Log("destroying syphon client");
+// UnityEngine.Debug.Log("destroying syphon client" + syphonClientPointer
+ " " + BoundAppName + " " + boundName);
if(attachedTexture != null){
RenderTexture.active = null;
attachedTexture.Release();
@@ -213,23 +192,19 @@
}
if(syphonClientPointer != 0 && initialized){
-
-// StackTrace stackTrace = new StackTrace();
-// UnityEngine.Debug.Log("DESTROY plugin syphon client destroy method,
from : " + stackTrace.GetFrame(1).GetMethod().Name);
-
Syphon.QueueToKillTexture(syphonClientPointer);
GL.IssuePluginEvent(syphonClientPointer);
syphonClientPointer = 0;
- initialized = false;
+ initialized = false;
+
+ //let anySyphonClientTextures who's registered for updates know that
we've retired.
if(RetireClient != null){
RetireClient(this);
}
}
else{
// Debug.Log("syphon client: " + boundAppName + " " + boundName + " was
not initialized, so not cleaning up the plugin on exit.");
- }
-
-
+ }
}
public static bool Match(SyphonClientObject a, SyphonClientObject b){
@@ -245,44 +220,24 @@
Syphon.SafeMaterial.SetPass(0);
RenderTexture.active = attachedTexture;
GL.IssuePluginEvent(syphonClientPointer);
- // RenderTexture.active = null;
+ RenderTexture.active = null;
}
}
-
-
- //make sure that announce/retire are performed on the main thread by
putting commands in a queue
- public void Update(){
- if(announceServerQueue){
- DefineSyphonClient(announceServerQueueServer);
- InitSyphonClient();
- // StackTrace stackTrace = new StackTrace();
- // UnityEngine.Debug.Log("init'd syphon client " + boundAppName + " "
+ boundName + stackTrace.GetFrame(1).GetMethod().Name);
-// Debug.Log("announced app:" +
announceServerQueueServer.SyphonServerDescriptionAppName + " name: " +
announceServerQueueServer.SyphonServerDescriptionName );
- announceServerQueue = false;
- announceServerQueueServer = null;
- }
- if(retireServerQueue){
- DestroySyphonClient();
- retireServerQueue = false;
-// Debug.Log("retired app:" + appName + " name: " + name );
- }
-
- }
+// public void Update(){
+// if(retireSyphonClientQueue){
+// DestroySyphonClient();
+// retireSyphonClientQueue = false;
+// }
+// }
public void OnDestroy(){
- DestroySyphonClient();
- Syphon.AnnounceServer -= new
Syphon.AnnounceServerHandler(AnnounceServer);
- Syphon.RetireServer -= new Syphon.RetireServerHandler(RetireServer);
- Syphon.UpdateServer -= new Syphon.UpdateServerHandler(UpdateServer);
- Syphon.UpdateClientTextures -= new
Syphon.UpdateClientTexturesHandler(Update);
-
+ //when you destroy the client object, destroy the client.
+ DestroySyphonClient();
+ Syphon.UpdateServer -= new Syphon.UpdateServerHandler(UpdateServer);
}
public void OnEnable(){
- Syphon.AnnounceServer += new
Syphon.AnnounceServerHandler(AnnounceServer);
- Syphon.RetireServer += new Syphon.RetireServerHandler(RetireServer);
Syphon.UpdateServer += new Syphon.UpdateServerHandler(UpdateServer);
- Syphon.UpdateClientTextures += new
Syphon.UpdateClientTexturesHandler(Update);
}
}
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonClientTexture.cs
Tue Jul 2 19:22:30 2013
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonClientTexture.cs
Fri Jul 12 15:00:14 2013
@@ -36,40 +36,46 @@
public string clientName = "";
private SyphonClientObject clientObject;
void Start () {
- clientObject = Syphon.GetSyphonClient(clientAppName, clientName);
- //if the client object exists,
+ setupTexture();
+ }
+
+ void OnDestroy(){
+ Syphon.UnregisterClientInstance(this);
+ }
+
+ void setupTexture(){
+ //when you initialize the client texture, you should TRY to create the
syphon client object.
+ //if it needs to exist because the server is available, it will create
it. if the server is offline,
+ //nothing will happen. this basically initializes a singleton for that
particular server appName/name.
+ clientObject = Syphon.CreateClient (clientAppName, clientName);
+// if the client object exists
if(clientObject != null){
- //if the texture has been initialized, apply its texture to something.
+ //and if the texture has been initialized, apply its texture to
something.
ApplyTexture();
+ //only registers it if it doesn't already exist.
+ Syphon.RegisterClientInstance(this, clientObject);
+ }
+ }
+
+ //this class has to watch for when servers come online, so that it knows
when to create the client.
+ public void AnnounceServer(string appName, string name){
+ if(appName == clientAppName && name == clientName){
+ setupTexture();
}
+ }
- }
-
//handle applying the client texture to your object whichever way you
please.
public void ApplyTexture(){
- if(clientObject.Initialized){
- renderer.sharedMaterial.mainTexture = clientObject.AttachedTexture;
- renderer.sharedMaterial.mainTexture.wrapMode = TextureWrapMode.Repeat;
+ if(clientObject != null && clientObject.Initialized){
+ renderer.sharedMaterial.mainTexture = clientObject.AttachedTexture;
+ renderer.sharedMaterial.mainTexture.wrapMode = TextureWrapMode.Repeat;
}
}
- public void handleAnnounceClient(SyphonClientObject client){
- if(!client.MatchesDescription(clientAppName, clientName)){
- return; //if the announced client was not this client, ignore it.
- }
-
- if(clientObject == null){
- //if the client had been previously destroyed or not initialized,
re-init now.
- Start();
- }
- else if(clientObject != null){
- ApplyTexture();
- }
- }
public void handleRetireClient(SyphonClientObject client){
if(client == clientObject){
- //your syphonClient may soon go null as it is either 1) being destroyed
from the clients list or 2) the server has disappeared
+ //your syphonClient may soon go null as it is either 1) being destroyed
from the clients list as there is no more reason to keep it alive or 2) the
server has disappeared
}
}
@@ -90,16 +96,19 @@
}
private void EnableCallbacks(){
- SyphonClientObject.AnnounceClient += new
SyphonClientObject.AnnounceClientHandler(handleAnnounceClient);
+ Syphon.AnnounceServer += new
Syphon.AnnounceServerHandler(AnnounceServer);
+
SyphonClientObject.RetireClient += new
SyphonClientObject.RetireClientHandler(handleRetireClient);
SyphonClientObject.UpdateClientTextureSize += new
SyphonClientObject.UpdateClientTextureSizeHandler(handleUpdateClientTextureSize);
}
private void DisableCallbacks(){
- SyphonClientObject.AnnounceClient -= new
SyphonClientObject.AnnounceClientHandler(handleAnnounceClient);
+ Syphon.AnnounceServer -= new
Syphon.AnnounceServerHandler(AnnounceServer);
+
SyphonClientObject.RetireClient -= new
SyphonClientObject.RetireClientHandler(handleRetireClient);
SyphonClientObject.UpdateClientTextureSize -= new
SyphonClientObject.UpdateClientTextureSizeHandler(handleUpdateClientTextureSize);
}
+
}
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/syphonSupportedShaderCloth.mat
Tue Jul 2 19:25:51 2013
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/syphonSupportedShaderCloth.mat
Fri Jul 12 15:00:14 2013
Binary file, no diff available.
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/SyphonServerAndClient.unity
Tue Jul 2 19:25:51 2013
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/SyphonServerAndClient.unity
Fri Jul 12 15:00:14 2013
Binary file, no diff available.
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonClientUnity.m
Tue Jul 2 19:22:30 2013
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonClientUnity.m
Fri Jul 12 15:00:14 2013
@@ -144,7 +144,25 @@
ptr->textureWidth = (int)surfaceSize.width;
ptr->textureHeight = (int)surfaceSize.height;
NSLog(@"w/h: %i, %i", ptr->textureWidth, ptr->textureHeight);
- ptr->updateTextureSizeFlag = true;
+// ptr->updateTextureSizeFlag = true;
+ handleTextureSizeChanged(ptr);
+
+ if(ptr->textureWidth == 0 || ptr->textureHeight == 0){
+
+ glBindTexture(GL_TEXTURE_RECTANGLE_EXT, 0);
+ glDisable(GL_TEXTURE_RECTANGLE_EXT);
+
+ glPopClientAttrib();
+ glPopAttrib();
+
+ glBindFramebufferEXT(GL_FRAMEBUFFER, previousFBO);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER, previousReadFBO);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, previousDrawFBO);
+
+ [image release];
+ return;
+ }
+
}
//okay, draw the shit
@@ -190,10 +208,7 @@
glPopClientAttrib();
glPopAttrib();
-
-
- [image release];
-
+
glBindFramebufferEXT(GL_FRAMEBUFFER, previousFBO);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER, previousReadFBO);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, previousDrawFBO);
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonUnity.mm Tue
Jul 2 19:22:30 2013
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonUnity.mm Fri
Jul 12 15:00:14 2013
@@ -97,6 +97,14 @@
//add it to a list
syphonClients.push_back(clientPtr);
NSLog(@"CREATED CLIENT TEXTURE AT %i, and added it to the list.
count is now %i", (int)clientPtr, (int)syphonClients.size());
+// int idx = 0;
+//
+// for(std::list<SyphonCacheData*>::iterator list_iter
=syphonClients.begin();
+// list_iter != syphonClients.end(); list_iter++){
+// NSLog(@"%i, list iter: %@", idx, [(*list_iter)->syphonClient
serverDescription]);
+// idx++;
+// }
+
return clientPtr;
}
@@ -107,7 +115,7 @@
}
void KillClientTexture(SyphonCacheData* killMe){
- NSLog(@"DESTROYED A CLIENT TEXTURE AT %i", (int)killMe);
+
if(killMe != NULL && (int)killMe != 0){
// //if the cache data says it's not a server, then
it's a client.
if(!killMe->isAServer && killMe->syphonClient != nil){
@@ -124,10 +132,20 @@
// NSLog(@"removed one, count is now %i",
(int)syphonClients.size());
}
//delete the cache data associated with it
+ NSLog(@"DESTROYED A CLIENT TEXTURE AT %i, count is now %i",
(int)killMe, (int)syphonClients.size());
+
delete killMe;
killMe->destroyMe = false;
killMe = NULL;
}
+
+// int idx = 0;
+
+// for(std::list<SyphonCacheData*>::iterator list_iter
=syphonClients.begin();
+// list_iter != syphonClients.end(); list_iter++){
+// NSLog(@"remaining: %i, list iter: %@", idx,
[(*list_iter)->syphonClient serverDescription]);
+// idx++;
+// }
}
=======================================
--- /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonUnityPlugin.xcodeproj/project.pbxproj
Tue Feb 26 08:50:06 2013
+++ /trunk/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityPlugin/SyphonUnityPlugin.xcodeproj/project.pbxproj
Fri Jul 12 15:00:14 2013
@@ -249,7 +249,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\n#rm -r -f
\"/Users/bc/Desktop/_EXPERIMENTS/Syphon3.5/Syphon
Implementations/Unity3D/SyphonUnityExample/Assets/Plugins/$PRODUCT_NAME.bundle\"\n#cp
-r -f \"$TARGET_BUILD_DIR/$PRODUCT_NAME.bundle\"
\"/Users/bc/Desktop/_EXPERIMENTS/Syphon3.5/Syphon
Implementations/Unity3D/SyphonUnityExample/Assets/Plugins/$PRODUCT_NAME.bundle\"\n";
+ shellScript = "\nrm -r -f
\"/Users/bc/syphon-implementations-proper/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/$PRODUCT_NAME.bundle\"\ncp
-r -f \"$TARGET_BUILD_DIR/$PRODUCT_NAME.bundle\"
\"/Users/bc/syphon-implementations-proper/Syphon
Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/$PRODUCT_NAME.bundle\"\n";
};
BD48069C1239AFCA00DFB19E /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;