add support for android

This commit is contained in:
cqarthur
2013-06-02 14:08:38 +08:00
parent 4f4b27baba
commit c0224c77c3
1288 changed files with 4682 additions and 349 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ Temp/
*.pidb
*.sln
*.userprefs
obj/
.DS_Store
build
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 8b91d80507de2ed40ad172d53a794053
NativeFormatImporter:
userData:
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 123802fca6172aa47b5912cce9261a62
NativeFormatImporter:
userData:
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 6209e607ae6aa7c4893a9d4b127161d1
NativeFormatImporter:
userData:
Binary file not shown.
-7
View File
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: bb0563889a0b8b849b0e0e6ee82d5bb9
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
Binary file not shown.
-7
View File
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 502fc75f4ed83ab438df2742e48f9a05
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
Binary file not shown.
-7
View File
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 47b3efd7d12758c43afec3d6a96d4d2d
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
Binary file not shown.
-7
View File
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 0c838acf0293e61479a6bdbb29adc0e2
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
Binary file not shown.
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: ea3da258fbe548d409cd28f34bcf8681
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
Binary file not shown.
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 069ce17854431444f9b33b5ad95e2f04
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
Binary file not shown.
-7
View File
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 897bdd45df3315f4389e81f5d805e5fb
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
Binary file not shown.
-7
View File
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 68379aac2a76c11459fec2559cf65d85
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
Binary file not shown.
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 834bec4d5f5fe12428755c20f9ffbb26
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
userData:
@@ -1,4 +1,4 @@
fileFormatVersion: 2
guid: 98b8350a5e3eac642b50e5aa07b01bc4
guid: 73415dcdd571dd5429df5a27195a2a7c
DefaultImporter:
userData:
Binary file not shown.
@@ -1,4 +1,4 @@
fileFormatVersion: 2
guid: 5dd33bc5cab230c46b76d3db26429793
guid: aecb913296807d44a84494eeebbb51cd
DefaultImporter:
userData:
Binary file not shown.
@@ -1,4 +1,4 @@
fileFormatVersion: 2
guid: 5dac84963904d8749b7d99c3bac8ea5d
guid: 668fdb3210e63ac45a9f88fbbc2fd166
DefaultImporter:
userData:
Binary file not shown.
Binary file not shown.
@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 5de0e161914291847a180afb648cb959
DefaultImporter:
userData:
-4
View File
@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 1669161240056074ca0257dc0cb4fa67
DefaultImporter:
userData:
@@ -1,4 +1,4 @@
fileFormatVersion: 2
guid: b1f3091543e19c744b0b02bfca00eedf
guid: 0b6c50f29bb45f442a3436cf9c0c6f0b
DefaultImporter:
userData:
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: a1f4b1ea0f5d26648a2733adc9c59785
DefaultImporter:
userData:
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: e7b9f754b619c0948b367d16d99b975c
NativeFormatImporter:
userData:
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 58638f0275b76f146b2a014cb9ebd121
DefaultImporter:
userData:
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: f3a2681a615c2164e9b93de409a1d5e1
DefaultImporter:
userData:
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 9fa44c7138d0e3b4982981d6865e0761
NativeFormatImporter:
userData:
Binary file not shown.
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: c08b8167680c07848bc1d76c1696bc32
NativeFormatImporter:
userData:
Binary file not shown.
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 11c89e4963bdb884da01dd80d76ac69c
NativeFormatImporter:
userData:
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 7957ef58a5ac112498164db132fe836d
DefaultImporter:
userData:
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: cfb8c30acc133fd48a886afdddcd11e4
NativeFormatImporter:
userData:
Binary file not shown.
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: f9c730890c3d4a342b0aa820e10fefed
NativeFormatImporter:
userData:
Binary file not shown.
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: f196b3fb500def444a06fdbe8af2d9c4
NativeFormatImporter:
userData:
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 1885e3e528dd41244b86eeda0a92681b
NativeFormatImporter:
userData:
Binary file not shown.
+39 -9
View File
@@ -546,12 +546,30 @@ namespace Radegast.Rendering
attachment_points.Clear();
string basedir = Directory.GetCurrentDirectory() + System.IO.Path.DirectorySeparatorChar + "character" + System.IO.Path.DirectorySeparatorChar;
XmlDocument lad = new XmlDocument();
lad.Load(basedir + LODfilename);
//on android, Directory.GetCurrentDirectory() returns "/" which means root folder of the system. no folder or file can be added into "/"
//I change character folder path as follow
string basedir = Utility.GetCharacterDir();
UnityEngine.Debug.Log("avatar_lad.xml is in " + basedir);
XmlDocument lad = new XmlDocument();
string path = basedir + LODfilename;
if (!File.Exists(path))
{
UnityEngine.Debug.Log(path + " doesn't exist! So we quit");
UnityEngine.Application.Quit();
}
if (path.Contains("://"))
{
UnityEngine.WWW www = new UnityEngine.WWW(path);
while(!www.isDone)
;
lad.LoadXml(www.text);
}
else
lad.Load(path);
UnityEngine.Debug.Log("Successfully loaded avatar_lad.xml");
//Firstly read the skeleton section this contains attachment point info and the bone deform info for visual params
// And load the skeleton file in to the bones class
@@ -1671,10 +1689,22 @@ namespace Radegast.Rendering
public static void loadbones(string skeletonfilename)
{
lock (Bone.mBones) mBones.Clear();
string basedir = Directory.GetCurrentDirectory() + System.IO.Path.DirectorySeparatorChar + "character" + System.IO.Path.DirectorySeparatorChar;
lock (Bone.mBones) mBones.Clear();
string basedir = Utility.GetCharacterDir();
//string basedir = Directory.GetCurrentDirectory() + System.IO.Path.DirectorySeparatorChar + "character" + System.IO.Path.DirectorySeparatorChar;
XmlDocument skeleton = new XmlDocument();
skeleton.Load(basedir + skeletonfilename);
string path = basedir + skeletonfilename;
if (path.Contains("://"))
{
UnityEngine.WWW www = new UnityEngine.WWW(path);
while(!www.isDone)
;
skeleton.LoadXml(www.text);
}
else
skeleton.Load(path);
UnityEngine.Debug.Log ("Successfully loaded bones " + path);
XmlNode boneslist = skeleton.GetElementsByTagName("linden_skeleton")[0];
addbone(boneslist.ChildNodes[0], null);
}
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 35aaaecb7d0215d4aa613a4bed6c41b1
DefaultImporter:
userData:
+4
View File
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: c649ba503463704449f81b379767808f
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 9c14e9677487da04182a6e1bdf844ba8
TextScriptImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 0b4d7574d4ba9a54fbad5f67fa7fe421
TextScriptImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 9ccf2d328927e2f40a9cc1c42d292d69
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 8ef581c7f288ef146a13fecae1c108df
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 994e18a1419568f4e9cf51e47cacb01b
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 88a3a77f39294d74189438de926fdbf4
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 99f03faf68d40084a9ceb3d1c7bc6b36
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 452231ac26b9b7f4a999a4576ffd7401
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 22b1e8dc734a4f440aac0731d70dab37
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: faabcce6ea52964429ef40f8ec8517af
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 271b4e2075b238441b446540a854b3cb
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 8e6db705f4d98c34ab36ae621ef5e9ba
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: c3db28bda50d1a144aece2520f329a60
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 8f5ae4ae873f2cf468f8fac6051b30a4
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 9e0848398335d71448773d0ac38b13ba
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: ba38bca874e45714890ab7c653c61c6a
DefaultImporter:
userData:
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 5f6f7602afba0484f832e68d43158f04
TextScriptImporter:
userData:

Some files were not shown because too many files have changed in this diff Show More