This commit is contained in:
2020-07-04 14:41:25 +08:00
parent 70c346d2c1
commit a8f02e4da5
3748 changed files with 587372 additions and 0 deletions

108
Assets/3rd/Contacts/Contact.cs Executable file
View File

@@ -0,0 +1,108 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class PhoneContact
{
public string Number ;
public string Type ;
}
public class EmailContact
{
public string Address;
public string Type ;
}
//holder of person details
public class Contact
{
public string Id ;
public string Name ;
public List<PhoneContact> Phones = new List<PhoneContact>();
public List<EmailContact> Emails = new List<EmailContact>();
public List<string> Connections = new List<string>();//for android only. example(google,whatsup,...)
public Texture2D PhotoTexture ;
public void FromBytes( byte[] bytes )
{
System.IO.BinaryReader reader = new System.IO.BinaryReader( new System.IO.MemoryStream( bytes ));
Id = readString( reader );
Name = readString( reader );
short size = reader.ReadInt16();
log( "Photo size == " + size );
if( size > 0 )
{
byte[] photo = reader.ReadBytes( (int)size);
PhotoTexture = new Texture2D(2,2);
PhotoTexture.LoadImage( photo );
}
size = reader.ReadInt16();
log( "Phones size == " + size );
if( size > 0 )
{
for( int i = 0 ; i < size ; i++ )
{
PhoneContact pc = new PhoneContact();
pc.Number = readString( reader );
pc.Type = readString( reader );
Phones.Add( pc );
}
}
size = reader.ReadInt16();
log( "Emails size == " + size );
if( size > 0 )
{
for( int i = 0 ; i < size ; i++ )
{
EmailContact ec = new EmailContact();
ec.Address = readString( reader );
ec.Type = readString( reader );
Emails.Add( ec );
}
}
size = reader.ReadInt16();
log( "Connections size == " + size );
if( size > 0 )
{
for( int i = 0 ; i < size ; i++ )
{
string connection = readString( reader );
Connections.Add( connection );
}
}
}
string readString( System.IO.BinaryReader reader )
{
string res = "";
short size = reader.ReadInt16();
log( "read string of size " + size );
if( size == 0 )
return res;
byte[] data = reader.ReadBytes( size);
res = System.Text.Encoding.UTF8.GetString( data );
log( "string " + res + " is " + res);
return res;
}
void log( string message )
{
//Debug.Log( message );
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: efbcdd631fdecbd41a1105a215b099e2
timeCreated: 1452248160
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

109
Assets/3rd/Contacts/Contacts.cs Executable file
View File

@@ -0,0 +1,109 @@
using UnityEngine;
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Threading;
//holder for all contacts information of your mobile
//use this class to acces all mobile contacts information
//this is the core of this asset, you have to know only how this class work
// first call LoadContactList();
// then loop throught all of ContactsList and acces data you like name name phones
// Contact c = Contacts.ContactsList[i];
// that is it, so easy, have fun
public class Contacts{
//looks likee these four fields down doesnot working for all mobiles
public static String MyPhoneNumber ;
public static String SimSerialNumber ;
public static String NetworkOperator ;
public static String NetworkCountryIso ;
//
public static List<Contact> ContactsList = new List<Contact>();
#if UNITY_ANDROID
static AndroidJavaObject activity;
static AndroidJavaClass ojc = null ;
#elif UNITY_IOS
[DllImport("__Internal")]
private static extern void loadIOSContacts();
[DllImport("__Internal")]
private static extern string getContact( int index );
#endif
static System.Action<string> onFailed;
static System.Action onDone;
public static void LoadContactList( )
{
LoadContactList( null , null);
}
public static void LoadContactList( System.Action _onDone, System.Action<string> _onFailed )
{
Debug.Log ( "LoadContactList at " + Time.realtimeSinceStartup );
onFailed = _onFailed;
onDone = _onDone;
GameObject helper = new GameObject ();
GameObject.DontDestroyOnLoad( helper);
helper.name = "ContactsListMessageReceiver";
helper.AddComponent<MssageReceiver> ();
#if UNITY_ANDROID
ojc = new AndroidJavaClass("com.aliessmael.contactslist.ContactList");
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
activity = jc.GetStatic<AndroidJavaObject>("currentActivity");
ojc.CallStatic("LoadInformation" , activity , true, true,true,true);
#elif UNITY_IOS
loadIOSContacts();
#endif
}
public static void GetContact( int index )
{
byte[] data = null;
#if UNITY_ANDROID
data = ojc.CallStatic<byte[]>("getContact" , index);
#elif UNITY_IOS
string str = getContact( index);
data = System.Convert.FromBase64String( str );
#endif
Contact c = new Contact();
debug( "Data length for " + index + " is " + data.Length );
c.FromBytes( data );
Contacts.ContactsList.Add( c );
}
public static void OnInitializeDone()
{
Debug.Log ( "done at " + Time.realtimeSinceStartup );
if (onDone != null)
{
onDone();
}
}
public static void OnInitializeFail( string message )
{
Debug.Log ( "fail at " + Time.realtimeSinceStartup );
if (onFailed != null)
{
onFailed( message );
}
}
static void debug( string message)
{
//Debug.Log ( message );
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2933fffb2c43e7247a0ab16722abe1e0
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,262 @@
using UnityEngine;
using System.Collections;
//this is test class, it use Contacts class to access your mobile contacts and draw it on screen
//it is just viewer , you may create your own GUI for that
public class ContactsListGUI : MonoBehaviour {
public Font font ;
public Texture2D even_contactTexture;
public Texture2D odd_contactTexture;
public Texture2D contact_faceTexture;
GUIStyle style ;
GUIStyle evenContactStyle ;
GUIStyle oddContactStyle ;
GUIStyle contactFaceStyle ;
GUIStyle nonStyle2 ;
Vector2 size ;
float dragTime ;
float dragSpeed ;
string failString;
// Use this for initialization
void Start () {
Contacts.LoadContactList( onDone, onLoadFailed );
style = new GUIStyle();
style.font = font ;
style.fontSize = (int)(size.y / 2) ;
size.x = Screen.width ;
size.y = Screen.height / 6 ;
evenContactStyle = new GUIStyle();
evenContactStyle.normal.background = even_contactTexture ;
//evenContactStyle.fixedWidth= size.x ;
evenContactStyle.fixedHeight = size.y ;
evenContactStyle.clipping = TextClipping.Clip ;
evenContactStyle.alignment = TextAnchor.UpperLeft ;
evenContactStyle.imagePosition = ImagePosition.ImageLeft ;
evenContactStyle.fontSize = (int)(size.y /2 );
//evenLogStyle.wordWrap = true;
oddContactStyle = new GUIStyle();
oddContactStyle.normal.background = odd_contactTexture;
//oddContactStyle.fixedWidth= size.x ;
oddContactStyle.fixedHeight = size.y ;
oddContactStyle.clipping = TextClipping.Clip ;
oddContactStyle.alignment = TextAnchor.UpperLeft ;
oddContactStyle.imagePosition = ImagePosition.ImageLeft ;
oddContactStyle.fontSize = (int)(size.y /2 );
contactFaceStyle = new GUIStyle();
contactFaceStyle.fixedHeight = size.y ;
contactFaceStyle.fixedWidth = size.y ;
//contactFaceStyle.normal.background = contact_faceTexture;
nonStyle2 = new GUIStyle();
nonStyle2.clipping = TextClipping.Clip;
nonStyle2.border = new RectOffset(0,0,0,0);
nonStyle2.normal.background = null ;
nonStyle2.fontSize = 1;
nonStyle2.alignment = TextAnchor.MiddleCenter ;
}
Vector2 downPos ;
Vector2 getDownPos()
{
if( Application.platform == RuntimePlatform.Android ||
Application.platform == RuntimePlatform.IPhonePlayer )
{
if( Input.touches.Length == 1 && Input.touches[0].phase == TouchPhase.Began )
{
dragSpeed = 0;
downPos = Input.touches[0].position ;
return downPos ;
}
}
else
{
if( Input.GetMouseButtonDown(0) )
{
dragSpeed = 0;
downPos.x = Input.mousePosition.x ;
downPos.y = Input.mousePosition.y ;
return downPos ;
}
}
return Vector2.zero ;
}
Vector2 mousePosition ;
Vector2 getDrag()
{
if( Application.platform == RuntimePlatform.Android ||
Application.platform == RuntimePlatform.IPhonePlayer )
{
if( Input.touches.Length != 1 )
{
return Vector2.zero ;
}
return Input.touches[0].position - downPos ;
}
else
{
if( Input.GetMouseButton(0) )
{
mousePosition = Input.mousePosition ;
return mousePosition - downPos ;
}
else
{
return Vector2.zero;
}
}
}
int calculateStartIndex()
{
int totalCout = Contacts.ContactsList.Count ;
int totalVisibleCount = 6 ;
int startIndex = (int)(contactsScrollPos.y /size.y) ;
if( startIndex < 0 ) startIndex = 0 ;
if( totalCout < totalVisibleCount ) startIndex = 0 ;
else if( startIndex > totalCout - totalVisibleCount )
startIndex = totalCout - totalVisibleCount ;
return startIndex ;
}
Vector2 contactsScrollPos ;
Vector2 oldContactsDrag ;
void OnGUI()
{
if (!string.IsNullOrEmpty (failString))
{
GUILayout.Label( "failed : " + failString );
if( GUILayout.Button("Retry"))
{
Contacts.LoadContactList( onDone, onLoadFailed );
failString = null;
}
}
//return;
getDownPos();
Vector2 drag = getDrag();
if( (drag.x != 0) && (downPos != Vector2.zero) )
{
//contactsScrollPos.x -= (drag.x - oldContactsDrag.x) ;
}
if( (drag.y != 0) && (downPos != Vector2.zero) )
{
contactsScrollPos.y += (drag.y - oldContactsDrag.y) ;
dragTime += Time.deltaTime ;
//dragSpeed = drag.y / dragTime ;
}
else if( dragSpeed > 1f){
dragTime = 0 ;
contactsScrollPos.y += dragSpeed * Time.deltaTime ;
dragSpeed -= (dragSpeed*0.01f);
}
oldContactsDrag = drag;
//GUILayout.Label("My Phone Number = " + Contacts.MyPhoneNumber );
/*GUILayout.Label("simSerialNumber " + Contacts.SimSerialNumber );
GUILayout.Label("networkOperator " + Contacts.NetworkOperator );
GUILayout.Label("networkCountryIso " + Contacts.NetworkCountryIso );
GUILayout.Label("Contacts Count are " + Contacts.ContactsList.Count );*/
contactsScrollPos = GUILayout.BeginScrollView( contactsScrollPos );
int startIndex = calculateStartIndex();
int endIndex = startIndex + 7 ;
if( endIndex > Contacts.ContactsList.Count )
endIndex = Contacts.ContactsList.Count ;
int beforeHeight = (int)(startIndex*size.y) ;
if( beforeHeight > 0 )
{
//fill invisible gap befor scroller to make proper scroller pos
GUILayout.BeginHorizontal( GUILayout.Width(size.x*2) , GUILayout.Height( beforeHeight ) );
GUILayout.Box(" " ,nonStyle2 );
GUILayout.EndHorizontal();
}
else
{
GUILayout.BeginHorizontal( GUILayout.Width(size.x*2) , GUILayout.Height( 1f ) );
GUILayout.Box(" " , nonStyle2 );
GUILayout.EndHorizontal();
}
for( int i = startIndex ; i < endIndex ; i++ )
{
if( i%2 == 0 )
GUILayout.BeginHorizontal( evenContactStyle ,GUILayout.Width( size.x) , GUILayout.Height( size.y ));
else
GUILayout.BeginHorizontal( oddContactStyle ,GUILayout.Width( size.x) , GUILayout.Height( size.y ));
GUILayout.Label( i.ToString() , style );
Contact c = Contacts.ContactsList[i];
if( c.PhotoTexture != null )
{
GUILayout.Box( new GUIContent(c.PhotoTexture) , GUILayout.Width(size.y), GUILayout.Height(size.y));
}
else
{
GUILayout.Box( new GUIContent(contactFaceStyle.normal.background) , GUILayout.Width(size.y), GUILayout.Height(size.y));
}
string text = "Native Id : " + c.Id + "\n";
text += "Name : " + c.Name + "\n";
for(int p = 0 ; p < c.Phones.Count ; p++)
{
text += "Number : " + c.Phones[p].Number + " , Type " + c.Phones[p].Type + " \n";
}
for(int e = 0 ; e < c.Emails.Count ; e++)
text += "Email : " + c.Emails[e].Address + " : Type " + c.Emails[e].Type + "\n";
for(int e = 0 ; e < c.Connections.Count ; e++)
text += "Connection : " + c.Connections[e] + "\n";
text += "------------------";
GUILayout.Label( text , style , GUILayout.Width(size.x - size.y - 40 ) );
GUILayout.Space(50);
GUILayout.EndHorizontal();
}
int afterHeight = (int)((Contacts.ContactsList.Count - ( startIndex + 6 ))*size.y) ;
if( afterHeight > 0 )
{
//fill invisible gap after scroller to make proper scroller pos
GUILayout.BeginHorizontal( GUILayout.Width(size.x*2) , GUILayout.Height(afterHeight ) );
GUILayout.Box(" ",nonStyle2);
GUILayout.EndHorizontal();
}
else
{
GUILayout.BeginHorizontal( GUILayout.Width(size.x*2) , GUILayout.Height(1f) );
GUILayout.Box(" ",nonStyle2);
GUILayout.EndHorizontal();
}
GUILayout.EndScrollView();
}
void onLoadFailed( string reason )
{
failString = reason;
}
void onDone()
{
failString = null;
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 596da6aa7e8936543a9c85c2c325edbc
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 50
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,8 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ContactsLoader {
public List<Contact> ToLoad = new List<Contact>();
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 22461e2f9d28ed645b8809d355f5e8d0
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 5f5a7190285e58249b41c394efaf7a77
DefaultImporter:
userData:

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -0,0 +1,35 @@
fileFormatVersion: 2
guid: 5f3c2b3d580b95245a2ef98596938fb3
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
textureType: -1
buildTargetSettings: []
userData:

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

View File

@@ -0,0 +1,35 @@
fileFormatVersion: 2
guid: 9d0759e09dd78de44958df316736cd99
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
textureType: -1
buildTargetSettings: []
userData:

View File

@@ -0,0 +1,102 @@
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" lang="en-US">
<![endif]-->
<!--[if IE 7]>
<html id="ie7" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html id="ie8" lang="en-US">
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
<html lang="en-US">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Contacts List | </title>
<link rel="profile" href="../../../gmpg.org/xfn/11/index.htm" />
<link rel="stylesheet" type="text/css" media="all" href="style.css" />
<link rel="pingback" href="../../xmlrpc.php.htm" />
<!--[if lt IE 9]>
<script src="../../wp-content/themes/twentyeleven/js/html5.js" type="text/javascript"></script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title=" &raquo; Feed" href="../../feed/index.htm" />
<link rel="alternate" type="application/rss+xml" title=" &raquo; Comments Feed" href="../../comments/feed/index.htm" />
<link rel="alternate" type="application/rss+xml" title=" &raquo; Contacts List Comments Feed" href="feed/index.htm" />
<script type='text/javascript' src='../../wp-includes/js/comment-reply.min.js-ver=3.8.4.htm'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="../../xmlrpc.php-rsd.htm" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="../../wp-includes/wlwmanifest.xml.htm" />
<link rel='prev' title='Products' href='../index.htm' />
<link rel='canonical' href='index.htm' />
<link rel='shortlink' href='../../-p=88.htm' />
</head>
<body class="page page-id-88 page-child parent-pageid-52 page-template-default single-author singular two-column right-sidebar">
<div id="page" class="hfeed">
<header id="branding" role="banner"> <a href="../../index.htm">
</a>
<form method="get" id="searchform" action="../../index.htm">
<label for="s" class="assistive-text">Search</label>
<input type="submit" class="submit" name="submit" id="searchsubmit" value="Search" />
</form>
<!-- #access -->
</header><!-- #branding -->
<div id="main">
<div id="primary">
<div id="content" role="main">
<article id="post-88" class="post-88 page type-page status-publish hentry">
<header class="entry-header">
<h1 class="entry-title"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Contacts List</h1>
</header>
<!-- .entry-header -->
<div class="entry-content">
<p><img class="alignnone size-full wp-image-99" alt="icon_precise" src="icon_precise.png" width="128" height="128" /></p>
<p>Contacts List is plugin for unity3d to view mobile contacts information.<br />
It works for Android and iOS</p>
<p><strong>Quick Start</strong></p>
<p>Create new scene and add ContactsListGUI to any gameObject in the scene, the add the scene to build settings and make build on Android or iOS , you will find this build on mobile showing you all your contacts name , all phones number and photo.</p>
<p>&nbsp;</p>
<p><strong>Slow Start <img src="icon_smile.gif" alt=":)" class="wp-smiley" /> </strong></p>
<p>So how this is done and what you have to know to make your own GUI of managing your contacts.</p>
<p>All magic come from Contacts class, you can check ContactsListGUI how it is using this class . before any thing you have to call Contacts.LoadContactList(); this will start loading (in seperate thread) all information to this class from your phones including photo as well.</p>
<p>
Note for iOS after build to xcode you may need to add addressbook.framework to the project</p>
<p><strong>Homework</strong></p>
<p>go to all property of &#8220;Contact c&#8221; in previous code and print it to Console</p>
<p>Any Question ?</p>
<p>if you have any issue please visit<br>
<a href="https://github.com/aliessmael/Unity-Contacts-List">https://github.com/aliessmael/Unity-Contacts-List</a></p>
</div><!-- .entry-content -->
<footer class="entry-meta">
</footer><!-- .entry-meta -->
</article><!-- #post-88 -->
<div id="comments">
<ol class="commentlist">
<!-- #comment-## -->
</ol>
<!-- #respond -->
</div><!-- #comments -->
</div><!-- #content -->
</div><!-- #primary -->
</div><!-- #main -->
<footer id="colophon" role="contentinfo"> </footer><!-- #colophon -->
</div><!-- #page -->
</body>
</html>

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 2c627e5d2b849d84184d5934bc6a5ac9
TextScriptImporter:
userData:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 563e43a7459593542bee2188283a522c
DefaultImporter:
userData:

View File

@@ -0,0 +1,55 @@
using UnityEngine;
using System.Collections;
//helper class
//it listen for messages comming from plugin
public class MssageReceiver : MonoBehaviour {
void OnInitializeDone( string message )
{
Contacts.OnInitializeDone ();
}
void OnInitializeFail( string message )
{
Debug.LogError( "OnInitializeFail : " + message );
Contacts.OnInitializeFail (message);
}
void Log( string message )
{
Debug.Log( "internal log : " + message );
}
void Error( string error )
{
Debug.LogError( "internal error : " + error );
}
void OnContactReady( string id )
{
debug( "OnContactReady: " + id);
if( string.IsNullOrEmpty( id ))
return;
int index = int.Parse( id);
Contacts.GetContact( index );
}
/*void OnContactReady( string data )
{
return;
//debug( data );
byte[] bytes = System.Text.Encoding.UTF8.GetBytes( data );
Contact c = new Contact();
c.FromBytes( bytes );
Contacts.ContactsList.Add( c );
}*/
void debug( string message )
{
//Debug.Log( message );
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9a324ef16313f4c9999ad71c639fbaea
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: df13f7e11a7a64a11982c44d796b9d14
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: a09bc702b546bbe41919a24ff589f9f5
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.aliessmael.contactslist"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
</manifest>

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 82867d25fe9e0bd4bbd6537ebeaffbe1
TextScriptImporter:
userData:

Binary file not shown.

View File

@@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: cebfed5b9c576a14b9ffa851b23def2e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 43075eea0cfe64cae9aba003b99c2b7c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 6221e5d2acb99417692633acfc10367a
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -0,0 +1,13 @@
//
// Contacts.h
// ContactsList
//
// Created by Apple on 8/4/14.
// Copyright (c) 2014 DreamMakers. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Contacts : NSObject
@end

View File

@@ -0,0 +1,27 @@
fileFormatVersion: 2
guid: 8b53b8d4f7e2141528e07d674035ed54
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,349 @@
//
// Contacts.m
// ContactsList
//
// Created by Apple on 8/4/14.
// Copyright (c) 2014 DreamMakers. All rights reserved.
//
#import "Contacts.h"
#import <AddressBook/AddressBook.h>
#include<pthread.h>
@implementation Contacts
@end
// Helper method to create C string copy
char* aliessmael_MakeStringCopy (const char* string)
{
if (string == NULL)
return NULL;
char* res = (char*)malloc(strlen(string) + 1);
strcpy(res, string);
return res;
}
@interface ContactItem :NSObject
{
@public ABRecordRef person;
@public NSString *name ;
@public ABMultiValueRef phoneNumbersRef;
@public NSMutableArray *phoneNumber;
@public NSMutableArray *phoneNumberType;
@public NSMutableArray *emails;
@public NSData* image;
};
@end
@implementation ContactItem
@end
extern "C" {
CFIndex nPeople;
CFArrayRef allPeople;
NSMutableArray* contactItems;
ABAddressBookRef addressBook;
void contact_log( const char* message)
{
UnitySendMessage("ContactsListMessageReceiver", "Log", message );
}
void contact_error( char* error)
{
UnitySendMessage("ContactsListMessageReceiver", "Error", error );
}
void contact_loadName( ContactItem* c )
{
NSString* firstName = (__bridge NSString *)(ABRecordCopyValue(c->person,kABPersonFirstNameProperty));
NSString* lastName = (__bridge NSString *)(ABRecordCopyValue(c->person, kABPersonLastNameProperty));
NSString* f = ( firstName == NULL)?[[NSString alloc]init]:firstName ;
NSString* s = ( lastName == NULL)?[[NSString alloc]init]:lastName ;
c->name = [NSString stringWithFormat:@"%@ %@",f,s];
//c->name = aliessmael_MakeStringCopy([name UTF8String]);
//return aliessmael_MakeStringCopy([name UTF8String]);
}
void contact_loadPhoneNumbers( ContactItem* c )
{
c->phoneNumbersRef = ABRecordCopyValue(c->person, kABPersonPhoneProperty);
long phonesCount = ABMultiValueGetCount(c->phoneNumbersRef);
c->phoneNumber = [NSMutableArray new];
c->phoneNumberType = [NSMutableArray new];
for (CFIndex i = 0; i < phonesCount ;i++) {
NSString *phoneNumber = (__bridge NSString *) ABMultiValueCopyValueAtIndex(c->phoneNumbersRef, i);
[c->phoneNumber addObject:phoneNumber];
CFStringRef locLabel = ABMultiValueCopyLabelAtIndex(c->phoneNumbersRef, i);
NSString* phoneLabel = (__bridge NSString*) ABAddressBookCopyLocalizedLabel(locLabel);
[c->phoneNumberType addObject:phoneLabel];
}
}
void contact_loadEmails( ContactItem* c )
{
c->emails = [NSMutableArray new];
ABMultiValueRef emails = ABRecordCopyValue(c->person, kABPersonEmailProperty);
for (CFIndex j=0; j < ABMultiValueGetCount(emails); j++) {
NSString* email = ( __bridge NSString*)ABMultiValueCopyValueAtIndex(emails, j);
[c->emails addObject:email];
//[email release];
}
CFRelease(emails);
}
void contact_loadPhoto( ContactItem* c )
{
UIImage *img = nil;
c->image = nil;
if (c->person != nil && ABPersonHasImageData(c->person)) {
if ( &ABPersonCopyImageDataWithFormat != nil ) {
NSData * data = (__bridge NSData *)ABPersonCopyImageDataWithFormat(c->person, kABPersonImageFormatThumbnail);
c->image = data;
} else {
NSData * data = (__bridge NSData *)ABPersonCopyImageData(c->person);
c->image = data;
}
//CFRelease( img );
} else {
img= nil;
c->image = nil;
}
}
void contact_writeString( NSOutputStream *oStream, NSString* str )
{
if( str == NULL )
{
short size = 0;
[oStream write:(uint8_t *)&size maxLength:2];
}
else
{
const char* data = [str UTF8String];
short size = strlen( data);
//short size = sizeof(data)/ sizeof(char);
[oStream write:(uint8_t *)&size maxLength:2];
[oStream write:(uint8_t *)data maxLength:size];
}
}
const char* contact_toBytes( ContactItem* c )
{
NSOutputStream *oStream = [[NSOutputStream alloc] initToMemory];
[oStream open];
contact_writeString( oStream, NULL);//native id
contact_writeString( oStream, c->name );
short size = 0;
if( c->image == NULL)
{
[oStream write:(uint8_t *)&size maxLength:2];
}
else
{
size = c->image.length;
[oStream write:(uint8_t *)&size maxLength:2];
uint8_t * data = (uint8_t *)[c->image bytes];
[oStream write: data maxLength:size];
}
if( c->phoneNumber == NULL)
{
size = 0;
[oStream write:(uint8_t *)&size maxLength:2];
}
else
{
size = c->phoneNumber.count;
[oStream write:(uint8_t *)&size maxLength:2];
for (int i = 0; i < size; i++)
{
NSString* text1 = [c->phoneNumber objectAtIndex:i];
contact_writeString( oStream, text1 );
NSString* text2 = [c->phoneNumberType objectAtIndex:i];
contact_writeString( oStream, text2 );
}
}
if( c->emails == NULL)
{
size = 0;
[oStream write:(uint8_t *)&size maxLength:2];
}
else
{
size = c->emails.count;
[oStream write:(uint8_t *)&size maxLength:2];
for (int i = 0; i < size; i++)
{
NSString* text = [c->emails objectAtIndex:i];
contact_writeString( oStream, text );
contact_writeString( oStream, NULL );
}
}
size = 0;
[oStream write:(uint8_t *)&size maxLength:2];
NSData *contents = [oStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey];
[oStream close];
NSString* str = [contents base64Encoding];
return [str UTF8String];
}
char* getContact( int index )
{
//NSString* d = [NSString stringWithFormat:@"Get contact of index : %d", index];
//contact_log([d UTF8String]);
ContactItem* c = [contactItems objectAtIndex:index];
const char* data = contact_toBytes(c);
return aliessmael_MakeStringCopy(data) ;
}
void* contact_load_thread( void *arg)
{
//ABRecordRef source = ABAddressBookCopyDefaultSource(addressBook);
allPeople = ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering(addressBook, nil, kABPersonSortByFirstName);
nPeople = ABAddressBookGetPersonCount( addressBook );
// NSLog( @"error %@" , *error );
// NSLog( @"cont %ld" , nPeople );
contactItems = [NSMutableArray new];
for ( int i = 0; i < nPeople; i++ )
{
ContactItem* c = [[ContactItem alloc]init];
c->person = CFArrayGetValueAtIndex( allPeople, i );
if( c->person == nil)
{
NSLog( @"contact %d is empty" , i );
continue;
}
contact_loadName( c );
contact_loadPhoneNumbers( c);
contact_loadEmails( c );
contact_loadPhoto( c );
[contactItems addObject:c];
NSString *idStr = [NSString stringWithFormat:@"%d",i];
const char* _idStr = [idStr UTF8String] ;
//contact_log( _idStr);
UnitySendMessage("ContactsListMessageReceiver", "OnContactReady", _idStr);
}
UnitySendMessage("ContactsListMessageReceiver", "OnInitializeDone","");
CFRelease(addressBook);
CFRelease(allPeople);
addressBook = NULL;
}
pthread_t thread = NULL;
void contact_listContacts()
{
pthread_create(&(thread), NULL, &contact_load_thread, NULL);
}
void loadIOSContacts()
{
ABAuthorizationStatus status = ABAddressBookGetAuthorizationStatus();
if (status == kABAuthorizationStatusDenied) {
// if you got here, user had previously denied/revoked permission for your
// app to access the contacts, and all you can do is handle this gracefully,
// perhaps telling the user that they have to go to settings to grant access
// to contacts
NSLog(@"permissin issu");
[[[UIAlertView alloc] initWithTitle:nil message:@"This app requires access to your contacts to function properly. Please visit to the \"Privacy\" section in the iPhone Settings app." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
UnitySendMessage("ContactsListMessageReceiver", "OnInitializeFail","kABAuthorizationStatusDenied");
return;
}
CFErrorRef *error = NULL;
addressBook = ABAddressBookCreateWithOptions(NULL, error );
if (error) {
NSLog(@"error: %@", CFBridgingRelease(error));
if (addressBook)
CFRelease(addressBook);
UnitySendMessage("ContactsListMessageReceiver", "OnInitializeFail","Can not create addressbook");
return;
}
if (status == kABAuthorizationStatusNotDetermined)
{
// present the user the UI that requests permission to contacts ...
ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
if (granted) {
// if they gave you permission, then just carry on
contact_listContacts();
}
else
{
// however, if they didn't give you permission, handle it gracefully, for example...
dispatch_async(dispatch_get_main_queue(), ^{
// BTW, this is not on the main thread, so dispatch UI updates back to the main queue
[[[UIAlertView alloc] initWithTitle:nil message:@"This app requires access to your contacts to function properly. Please visit to the \"Privacy\" section in the iPhone Settings app." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
});
UnitySendMessage("ContactsListMessageReceiver", "OnInitializeFail","kABAuthorizationStatusNotDetermined");
}
//CFRelease(addressBook);
});
}
else if( status == kABAuthorizationStatusAuthorized )
{
contact_listContacts();
}
else
{
UnitySendMessage("ContactsListMessageReceiver", "OnInitializeFail","unknown issue");
}
}
}

View File

@@ -0,0 +1,53 @@
fileFormatVersion: 2
guid: b3f254f92fbde46cfa034f4afea309ea
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 0
settings:
CPU: AnyCPU
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
Linux:
enabled: 0
settings:
CPU: x86
Linux64:
enabled: 0
settings:
CPU: x86_64
OSXIntel:
enabled: 0
settings:
CPU: AnyCPU
OSXIntel64:
enabled: 0
settings:
CPU: AnyCPU
Win:
enabled: 0
settings:
CPU: AnyCPU
Win64:
enabled: 0
settings:
CPU: AnyCPU
iOS:
enabled: 1
settings:
CompileFlags:
FrameworkDependencies: AddressBook;
userData:
assetBundleName:
assetBundleVariant:

11
Assets/3rd/Contacts/README.md Executable file
View File

@@ -0,0 +1,11 @@
# Unity-Contacts-List 0.8
Unity Contacts List is a unity3d plugin for Android and iOS devices that enable you to access to contacts. Retreive names, phone numbers, and even photos.
You can download also from unity asset store
https://www.assetstore.unity3d.com/en/#!/content/20885
To test this asset just drag drop ContactsListGUI script to empty GameObject in your scene.
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6B8XHP9N5DXBW">
<img src="https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_cc_147x47.png">
</img>
</a>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5b465cc85190e49639c5458f2bc233f0
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/3rd/Contacts/arial.ttf Executable file

Binary file not shown.

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 6d9b58d3d46209f47add264db0ce5604
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 22
forceTextureCase: -1
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
customCharacters:
fontRenderingMode: 0
userData:

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -0,0 +1,47 @@
fileFormatVersion: 2
guid: 64e406bc813b7714082f460102114346
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,47 @@
fileFormatVersion: 2
guid: 94469343a75ef624190dd3b00e478906
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,47 @@
fileFormatVersion: 2
guid: f31ebf08b2276ec45897d04ec2590fd1
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

View File

@@ -0,0 +1,328 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 1
m_BakeResolution: 50
m_AtlasSize: 1024
m_AO: 1
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 0
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 0
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666666
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &365674031
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 365674036}
- component: {fileID: 365674035}
- component: {fileID: 365674033}
- component: {fileID: 365674032}
- component: {fileID: 365674037}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &365674032
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365674031}
m_Enabled: 1
--- !u!124 &365674033
Behaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365674031}
m_Enabled: 1
--- !u!20 &365674035
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365674031}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &365674036
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365674031}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &365674037
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365674031}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 596da6aa7e8936543a9c85c2c325edbc, type: 3}
m_Name:
m_EditorClassIdentifier:
font: {fileID: 12800000, guid: 6d9b58d3d46209f47add264db0ce5604, type: 3}
even_contactTexture: {fileID: 2800000, guid: 94469343a75ef624190dd3b00e478906, type: 3}
odd_contactTexture: {fileID: 2800000, guid: f31ebf08b2276ec45897d04ec2590fd1, type: 3}
contact_faceTexture: {fileID: 2800000, guid: 64e406bc813b7714082f460102114346, type: 3}
--- !u!1 &1962014926
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1962014929}
- component: {fileID: 1962014928}
- component: {fileID: 1962014927}
m_Layer: 0
m_Name: Reporter
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1962014927
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1962014926}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6767a180de870304caa2013b2772dd62, type: 3}
m_Name:
m_EditorClassIdentifier:
isPause: 0
luaPath:
--- !u!114 &1962014928
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1962014926}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 600c02144c4813244abd262cbcbe8825, type: 3}
m_Name:
m_EditorClassIdentifier:
show: 0
UserData:
fps: 0
fpsText:
images:
clearImage: {fileID: 2800000, guid: 112c6fcf56e349449ab2e6ad76b67816, type: 3}
collapseImage: {fileID: 2800000, guid: 4623f326a884a2546ab39078bf7822c3, type: 3}
clearOnNewSceneImage: {fileID: 2800000, guid: 3a6bc61a8319b1949ab9f1f2db1302b4,
type: 3}
showTimeImage: {fileID: 2800000, guid: 782e03669fa4a614e89ef56252134250, type: 3}
showSceneImage: {fileID: 2800000, guid: ff4dfb29f203a174ab8e4c498afe908a, type: 3}
userImage: {fileID: 2800000, guid: 2bcdc012e7356f1449ce7d3a31dc458c, type: 3}
showMemoryImage: {fileID: 2800000, guid: f447d62f2dacf9843be7cbf168a3a9d0, type: 3}
softwareImage: {fileID: 2800000, guid: 6c91fc88ee6c791468318d85febfb48d, type: 3}
dateImage: {fileID: 2800000, guid: a7561cd0a9f62a84e99bff1abce2a222, type: 3}
showFpsImage: {fileID: 2800000, guid: 90b2f48155dc0e74f8e428561ac79da5, type: 3}
infoImage: {fileID: 2800000, guid: 2954bef266e6d794aba08ceacc887a0f, type: 3}
searchImage: {fileID: 2800000, guid: bfef37b5a26d2264798616d960451329, type: 3}
closeImage: {fileID: 2800000, guid: b65e9be99974bc94eab5d6698811d0b8, type: 3}
buildFromImage: {fileID: 2800000, guid: 8702be598dd9f504ca33be2afee2ca33, type: 3}
systemInfoImage: {fileID: 2800000, guid: e9011b1dc9256ad4d9c19a31c595f95f, type: 3}
graphicsInfoImage: {fileID: 2800000, guid: 999d31716332cc04eb4abc9c9270b0ca, type: 3}
backImage: {fileID: 2800000, guid: a0632a18e7c665641b94fea66506ab50, type: 3}
logImage: {fileID: 2800000, guid: e876b803a4dd5c5488078071d15aa9c0, type: 3}
warningImage: {fileID: 2800000, guid: 1066be8e7b994b94c8a182b8dbe30705, type: 3}
errorImage: {fileID: 2800000, guid: 7640ebf8b3a92124d821d3b4b8b3fd7e, type: 3}
barImage: {fileID: 2800000, guid: 8128d4f4c0193e34586f9631ef7d4787, type: 3}
button_activeImage: {fileID: 2800000, guid: 2580a2e903691e44282e56ed6e0ff37a,
type: 3}
even_logImage: {fileID: 2800000, guid: d27aad55b568c6544b0b95a95da44bc7, type: 3}
odd_logImage: {fileID: 2800000, guid: 8ffbb44a2c3adae45913474e4fd487f5, type: 3}
selectedImage: {fileID: 2800000, guid: 17117a429b08e7e43b0b6c8421de69fe, type: 3}
reporterScrollerSkin: {fileID: 11400000, guid: 1cc68832d00d3284a9324a4dc05be753,
type: 2}
size: {x: 32, y: 32}
maxSize: 20
numOfCircleToShow: 1
Initialized: 0
--- !u!4 &1962014929
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1962014926}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 0be18f81137168346b7d8dc32d0f5d54
DefaultImporter:
userData: