LiuQilin 8 年之前
父节点
当前提交
d004c9c8d1

二进制
Assets/Atlas.png


+ 142 - 0
Assets/Atlas.png.meta

@@ -0,0 +1,142 @@
+fileFormatVersion: 2
+guid: d75bdd14a819bf541a63f96c6eb5d8df
+timeCreated: 1498627739
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName:
+    21300000: Atlas_0
+    21300002: Atlas_1
+    21300004: Atlas_2
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: 1
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 2
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  - buildTarget: Standalone
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  - buildTarget: iPhone
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  - buildTarget: Android
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  - buildTarget: WebGL
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites:
+    - serializedVersion: 2
+      name: Atlas_0
+      rect:
+        serializedVersion: 2
+        x: 5
+        y: 108
+        width: 194
+        height: 181
+      alignment: 0
+      pivot: {x: 0.5, y: 0.5}
+      border: {x: 0, y: 0, z: 0, w: 0}
+      outline: []
+      tessellationDetail: 0
+    - serializedVersion: 2
+      name: Atlas_1
+      rect:
+        serializedVersion: 2
+        x: 5
+        y: 10
+        width: 89
+        height: 88
+      alignment: 0
+      pivot: {x: 0.5, y: 0.5}
+      border: {x: 0, y: 0, z: 0, w: 0}
+      outline: []
+      tessellationDetail: 0
+    - serializedVersion: 2
+      name: Atlas_2
+      rect:
+        serializedVersion: 2
+        x: 104
+        y: 11
+        width: 88
+        height: 87
+      alignment: 0
+      pivot: {x: 0.5, y: 0.5}
+      border: {x: 0, y: 0, z: 0, w: 0}
+      outline: []
+      tessellationDetail: 0
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: test
+  assetBundleVariant: 

+ 0 - 289
Assets/Demo.cs

@@ -1,289 +0,0 @@
-using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using cn.sharesdk.unity3d;
-
-public class Demo : MonoBehaviour {
-
-	public GUISkin demoSkin;
-	public ShareSDK ssdk;
-	// Use this for initialization
-	void Start ()
-	{	
-		ssdk = gameObject.GetComponent<ShareSDK>();
-		ssdk.authHandler = OnAuthResultHandler;
-		ssdk.shareHandler = OnShareResultHandler;
-		ssdk.showUserHandler = OnGetUserInfoResultHandler;
-		ssdk.getFriendsHandler = OnGetFriendsResultHandler;
-		ssdk.followFriendHandler = OnFollowFriendResultHandler;
-	}
-
-	// Update is called once per frame
-	void Update () 
-	{
-		if (Input.GetKeyDown(KeyCode.Escape)) {
-			Application.Quit();
-		}
-	}
-	
-	void OnGUI ()
-	{
-
-		GUI.skin = demoSkin;
-		
-		float scale = 1.0f;
-
-		if (Application.platform == RuntimePlatform.IPhonePlayer)
-		{
-			scale = Screen.width / 320;
-		}
-		
-		float btnWidth = 165 * scale;
-		float btnHeight = 30 * scale;
-		float btnTop = 20 * scale;
-		float btnGap = 20 * scale;
-		GUI.skin.button.fontSize = Convert.ToInt32(14 * scale);
-
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 - btnWidth, btnTop, btnWidth, btnHeight), "Authorize"))
-		{
-			print(ssdk == null);
-
-			ssdk.Authorize(PlatformType.QQ);
-		}
-			
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 + btnGap, btnTop, btnWidth, btnHeight), "Get User Info"))
-		{
-			ssdk.GetUserInfo(PlatformType.SinaWeibo);
-		}
-
-		btnTop += btnHeight + 20 * scale;
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 - btnWidth, btnTop, btnWidth, btnHeight), "Show Share Menu"))
-		{
-			ShareContent content = new ShareContent();
-			content.SetText("this is a test string.");
-			content.SetImageUrl("http://ww3.sinaimg.cn/mw690/be159dedgw1evgxdt9h3fj218g0xctod.jpg");
-			content.SetTitle("test title");
-			content.SetTitleUrl("http://www.mob.com");
-			content.SetSite("Mob-ShareSDK");
-			content.SetSiteUrl("http://www.mob.com");
-			content.SetUrl("http://www.mob.com");
-			content.SetComment("test description");
-			content.SetMusicUrl("http://mp3.mwap8.com/destdir/Music/2009/20090601/ZuiXuanMinZuFeng20090601119.mp3");
-			content.SetShareType(ContentType.Image);
-
-			//不同平台分享不同内容
-			ShareContent customizeShareParams = new ShareContent();
-			customizeShareParams.SetText("Sina share content");
-			customizeShareParams.SetImageUrl("http://git.oschina.net/alexyu.yxj/MyTmpFiles/raw/master/kmk_pic_fld/small/107.JPG");
-			customizeShareParams.SetShareType(ContentType.Text);
-			customizeShareParams.SetObjectID("SinaID");
-			content.SetShareContentCustomize(PlatformType.SinaWeibo, customizeShareParams);
-			//优先客户端分享
-			// content.SetEnableClientShare(true);
-			//使用微博高级接口进行本地图片 文字 应用内分享 17年6月30日后需申请高级接口
-			// content.SetEnableAdvancedInterfaceShare(true);
-			//通过分享菜单分享
-			ssdk.ShowPlatformList (null, content, 100, 100);
-		}
-			
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 + btnGap, btnTop, btnWidth, btnHeight), "Show Share View"))
-		{
-			ShareContent content = new ShareContent();
-			content.SetText("this is a test string.");
-			content.SetImageUrl("http://ww3.sinaimg.cn/mw690/be159dedgw1evgxdt9h3fj218g0xctod.jpg");
-			content.SetTitle("test title");
-			content.SetTitleUrl("http://www.mob.com");
-			content.SetSite("Mob-ShareSDK");
-			content.SetSiteUrl("http://www.mob.com");
-			content.SetUrl("http://www.mob.com");
-			content.SetComment("test description");
-			content.SetMusicUrl("http://mp3.mwap8.com/destdir/Music/2009/20090601/ZuiXuanMinZuFeng20090601119.mp3");
-			content.SetShareType(ContentType.Image);
-
-			ssdk.ShowShareContentEditor (PlatformType.SinaWeibo, content);
-		}
-
-		btnTop += btnHeight + 20 * scale;
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 - btnWidth, btnTop, btnWidth, btnHeight), "Share Content"))
-		{
-			ShareContent content = new ShareContent();
-			content.SetText("this is a test string.");
-			content.SetImageUrl("http://ww3.sinaimg.cn/mw690/be159dedgw1evgxdt9h3fj218g0xctod.jpg");
-			content.SetTitle("test title");
-//			content.SetTitleUrl("http://www.mob.com");
-//			content.SetSite("Mob-ShareSDK");
-			// content.SetSiteUrl("http://www.mob.com");
-			content.SetUrl("http://qjsj.youzu.com/jycs/");
-//			content.SetComment("test description");
-//			content.SetMusicUrl("http://mp3.mwap8.com/destdir/Music/2009/20090601/ZuiXuanMinZuFeng20090601119.mp3");
-			content.SetShareType(ContentType.Webpage);
-			ssdk.ShareContent (PlatformType.WeChat, content);
-		}
-			
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 + btnGap, btnTop, btnWidth, btnHeight), "Get Friends SinaWeibo "))
-		{
-			//获取新浪微博好友,第一页,每页15条数据
-			print ("Click Btn Of Get Friends SinaWeibo");
-			ssdk.GetFriendList (PlatformType.SinaWeibo, 15, 0);
-		}
-
-		btnTop += btnHeight + 20 * scale;
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 - btnWidth, btnTop, btnWidth, btnHeight), "Get Token SinaWeibo "))
-		{
-			Hashtable authInfo = ssdk.GetAuthInfo (PlatformType.SinaWeibo);			
-			print ("share result :");
-			print (MiniJSON.jsonEncode(authInfo));
-		}
-			
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 + btnGap , btnTop, btnWidth, btnHeight), "Close SSO Auth"))
-		{
-			ssdk.DisableSSO (true);			
-		}
-
-		btnTop += btnHeight + 20 * scale;
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 - btnWidth, btnTop, btnWidth, btnHeight), "Remove Authorize "))
-		{
-			ssdk.CancelAuthorize (PlatformType.SinaWeibo);			
-		}
-			
-		if (GUI.Button(new Rect((Screen.width - btnGap) / 2 + btnGap, btnTop, btnWidth, btnHeight), "Add Friend "))
-		{
-			//关注新浪微博
-			ssdk.AddFriend (PlatformType.SinaWeibo, "3189087725");			
-		}
-
-		btnTop += btnHeight + 20 * scale;
-		if (GUI.Button(new Rect((Screen.width - btnWidth) / 2 , btnTop, btnWidth, btnHeight), "ShareWithContentName"))
-		{
-			Hashtable customFields = new Hashtable ();
-			customFields["imgUrl"] = "http://ww1.sinaimg.cn/mw690/006dJESWgw1f6iyb8bzraj31kw0v67a2.jpg";
-			//根据配置文件分享【本接口功能仅暂时支持iOS】
-			ssdk.ShareWithContentName(PlatformType.SinaWeibo, "ShareSDK", customFields);		
-		}
-
-		btnWidth += 80 * scale;
-		btnTop += btnHeight + 20 * scale;
-		if (GUI.Button(new Rect((Screen.width - btnWidth) / 2, btnTop, btnWidth, btnHeight), "ShowShareMenuWithContentName"))
-		{
-			Hashtable customFields = new Hashtable ();
-			customFields["imgUrl"] = "http://ww1.sinaimg.cn/mw690/006dJESWgw1f6iyb8bzraj31kw0v67a2.jpg";
-			//根据配置文件展示分享菜单分享【本接口功能仅暂时支持iOS】
-			ssdk.ShowPlatformListWithContentName ("ShareSDK", customFields, null, 100, 100);
-		}
-
-		btnTop += btnHeight + 20 * scale;
-		if (GUI.Button(new Rect((Screen.width - btnWidth) / 2, btnTop, btnWidth, btnHeight), "ShowShareViewWithContentName"))
-		{
-			Hashtable customFields = new Hashtable ();
-			//根据配置文件展示编辑界面分享【本接口功能仅暂时支持iOS】
-			customFields["imgUrl"] = "http://ww1.sinaimg.cn/mw690/006dJESWgw1f6iyb8bzraj31kw0v67a2.jpg";
-			ssdk.ShowShareContentEditorWithContentName(PlatformType.SinaWeibo, "ShareSDK", customFields);		
-		}
-
-	}
-	
-	void OnAuthResultHandler(int reqID, ResponseState state, PlatformType type, Hashtable result)
-	{
-		if (state == ResponseState.Success)
-		{
-			print ("authorize success !" + "Platform :" + type);
-		}
-		else if (state == ResponseState.Fail)
-		{
-			#if UNITY_ANDROID
-			print ("fail! throwable stack = " + result["stack"] + "; error msg = " + result["msg"]);
-			#elif UNITY_IPHONE
-			print ("fail! error code = " + result["error_code"] + "; error msg = " + result["error_msg"]);
-			#endif
-		}
-		else if (state == ResponseState.Cancel) 
-		{
-			print ("cancel !");
-		}
-	}
-	
-	void OnGetUserInfoResultHandler (int reqID, ResponseState state, PlatformType type, Hashtable result)
-	{
-		if (state == ResponseState.Success)
-		{
-			print ("get user info result :");
-			print (MiniJSON.jsonEncode(result));
-			print ("Get userInfo success !Platform :" + type );
-		}
-		else if (state == ResponseState.Fail)
-		{
-			#if UNITY_ANDROID
-			print ("fail! throwable stack = " + result["stack"] + "; error msg = " + result["msg"]);
-			#elif UNITY_IPHONE
-			print ("fail! error code = " + result["error_code"] + "; error msg = " + result["error_msg"]);
-			#endif
-		}
-		else if (state == ResponseState.Cancel) 
-		{
-			print ("cancel !");
-		}
-	}
-	
-	void OnShareResultHandler (int reqID, ResponseState state, PlatformType type, Hashtable result)
-	{
-		if (state == ResponseState.Success)
-		{
-			print ("share successfully - share result :");
-			print (MiniJSON.jsonEncode(result));
-		}
-		else if (state == ResponseState.Fail)
-		{
-			#if UNITY_ANDROID
-			print ("fail! throwable stack = " + result["stack"] + "; error msg = " + result["msg"]);
-			#elif UNITY_IPHONE
-			print ("fail! error code = " + result["error_code"] + "; error msg = " + result["error_msg"]);
-			#endif
-		}
-		else if (state == ResponseState.Cancel) 
-		{
-			print ("cancel !");
-		}
-	}
-
-	void OnGetFriendsResultHandler (int reqID, ResponseState state, PlatformType type, Hashtable result)
-	{
-		if (state == ResponseState.Success)
-		{			
-			print ("get friend list result :");
-			print (MiniJSON.jsonEncode(result));
-		}
-		else if (state == ResponseState.Fail)
-		{
-			#if UNITY_ANDROID
-			print ("fail! throwable stack = " + result["stack"] + "; error msg = " + result["msg"]);
-			#elif UNITY_IPHONE
-			print ("fail! error code = " + result["error_code"] + "; error msg = " + result["error_msg"]);
-			#endif
-		}
-		else if (state == ResponseState.Cancel) 
-		{
-			print ("cancel !");
-		}
-	}
-
-	void OnFollowFriendResultHandler (int reqID, ResponseState state, PlatformType type, Hashtable result)
-	{
-		if (state == ResponseState.Success)
-		{
-			print ("Follow friend successfully !");
-		}
-		else if (state == ResponseState.Fail)
-		{
-			#if UNITY_ANDROID
-			print ("fail! throwable stack = " + result["stack"] + "; error msg = " + result["msg"]);
-			#elif UNITY_IPHONE
-			print ("fail! error code = " + result["error_code"] + "; error msg = " + result["error_msg"]);
-			#endif
-		}
-		else if (state == ResponseState.Cancel) 
-		{
-			print ("cancel !");
-		}
-	}
-}

+ 54 - 0
Assets/Image102.cs

@@ -0,0 +1,54 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+using System.Collections;
+using System.Collections.Generic;
+
+public class Image102 : Image 
+{
+    #region 变量
+
+    public Vector2 LowerLeftUV;
+    public Vector2 LowerRightUV;
+    public Vector2 UpperLeftUV;
+    public Vector2 UpperRightUV;
+
+    #endregion
+
+    protected override void OnPopulateMesh(VertexHelper toFill)
+    {
+        base.OnPopulateMesh(toFill);
+
+        List<UIVertex> verticeList = new List<UIVertex>();
+
+        toFill.GetUIVertexStream(verticeList);
+
+        UIVertex vertex0 = verticeList[0];
+        UIVertex vertex1 = verticeList[1];
+        UIVertex vertex2 = verticeList[2];
+        UIVertex vertex3 = verticeList[4];
+
+        vertex0.uv0 = LowerLeftUV;
+        vertex1.uv0 = UpperLeftUV;
+        vertex2.uv0 = UpperRightUV;
+        vertex3.uv0 = LowerRightUV;
+
+        //Debug.Log(vertex0.uv0);
+        //Debug.Log(vertex1.uv0);
+        //Debug.Log(vertex2.uv0);
+        //Debug.Log(vertex3.uv0);
+
+        UIVertex[] vertices = new UIVertex[]
+        {
+            vertex0,
+            vertex1,
+            vertex2,
+            vertex3,
+        };
+
+
+        toFill.Clear();
+
+        toFill.AddUIVertexQuad(vertices);
+    }
+}

+ 3 - 1
Assets/Demo.cs.meta → Assets/Image102.cs.meta

@@ -1,5 +1,7 @@
 fileFormatVersion: 2
-guid: 9304718f8b7db134aa1ff9be7d6e84dc
+guid: fb8623a7a014c6646b0c9157d4f42eb6
+timeCreated: 1498631349
+licenseType: Pro
 MonoImporter:
   serializedVersion: 2
   defaultReferences: []

+ 117 - 0
Assets/NewImageEffectShader.shader

@@ -0,0 +1,117 @@
+Shader "DashGame/DefaultUI"
+{
+	Properties
+	{
+		[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
+		_Color ("Tint", Color) = (1,1,1,1)
+		
+		_StencilComp ("Stencil Comparison", Float) = 8
+		_Stencil ("Stencil ID", Float) = 0
+		_StencilOp ("Stencil Operation", Float) = 0
+		_StencilWriteMask ("Stencil Write Mask", Float) = 255
+		_StencilReadMask ("Stencil Read Mask", Float) = 255
+
+		_ColorMask ("Color Mask", Float) = 15
+
+		[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
+	}
+
+	SubShader
+	{
+		Tags
+		{ 
+			"Queue"="Transparent" 
+			"IgnoreProjector"="True" 
+			"RenderType"="Transparent" 
+			"PreviewType"="Plane"
+			"CanUseSpriteAtlas"="True"
+		}
+		
+		Stencil
+		{
+			Ref [_Stencil]
+			Comp [_StencilComp]
+			Pass [_StencilOp] 
+			ReadMask [_StencilReadMask]
+			WriteMask [_StencilWriteMask]
+		}
+
+		Cull Off
+		Lighting Off
+		ZWrite Off
+		ZTest [unity_GUIZTestMode]
+		Blend SrcAlpha OneMinusSrcAlpha
+		ColorMask [_ColorMask]
+
+		Pass
+		{
+			Name "Default"
+			CGPROGRAM
+			#pragma vertex vert
+			#pragma fragment frag
+			#pragma target 2.0
+
+			#include "UnityCG.cginc"
+			#include "UnityUI.cginc"
+
+			#pragma multi_compile __ UNITY_UI_ALPHACLIP
+			
+			struct appdata_t
+			{
+				float4 vertex   : POSITION;
+				float4 color    : COLOR;
+				float2 texcoord : TEXCOORD0;
+				UNITY_VERTEX_INPUT_INSTANCE_ID
+			};
+
+			struct v2f
+			{
+				float4 vertex   : SV_POSITION;
+				fixed4 color    : COLOR;
+				float2 texcoord  : TEXCOORD0;
+				float4 worldPosition : TEXCOORD1;
+				UNITY_VERTEX_OUTPUT_STEREO
+			};
+
+			float _MinX;
+			float _MinY;
+			float _RatioX;
+			float _RatioY;
+			fixed4 _Color;
+			fixed4 _TextureSampleAdd;
+			float4 _ClipRect;
+
+			v2f vert(appdata_t IN)
+			{
+				v2f OUT;
+				UNITY_SETUP_INSTANCE_ID(IN);
+				UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
+				OUT.worldPosition = IN.vertex;
+				OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
+
+				OUT.texcoord = IN.texcoord;
+				
+				OUT.color = IN.color * _Color;
+				return OUT;
+			}
+
+			sampler2D _MainTex;
+
+			fixed4 frag(v2f IN) : SV_Target
+			{
+				IN.texcoord = float2(_MinX,_MinY)+float2(IN.texcoord.x*_RatioX,IN.texcoord.y*_RatioY);
+
+				half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
+				
+				color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
+				
+				#ifdef UNITY_UI_ALPHACLIP
+				clip (color.a - 0.001);
+				#endif
+
+				return color;
+			}
+		ENDCG
+		}
+	}
+}

+ 9 - 0
Assets/NewImageEffectShader.shader.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: b7dc877220e2d094c902809f94a039bd
+timeCreated: 1498633691
+licenseType: Pro
+ShaderImporter:
+  defaultTextures: []
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 100 - 0
Assets/SpriteRender101.shader

@@ -0,0 +1,100 @@
+Shader "DashGame/SpriteRenderer101"
+{
+	Properties
+	{
+		[PerRendererData]_Alpha ("Alpha", float) = 0
+
+		[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
+		_Color ("Tint", Color) = (1,1,1,1)
+		[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
+	}
+
+	SubShader
+	{
+		Tags
+		{ 
+			"Queue"="Transparent" 
+			"IgnoreProjector"="True" 
+			"RenderType"="Transparent" 
+			"PreviewType"="Plane"
+			"CanUseSpriteAtlas"="True"
+		}
+
+		Cull Off
+		Lighting Off
+		ZWrite Off
+		//Blend One OneMinusSrcAlpha
+		Blend SrcAlpha OneMinusSrcAlpha
+
+		Pass
+		{
+		CGPROGRAM
+			#pragma vertex vert
+			#pragma fragment frag
+			#pragma target 2.0
+			#pragma multi_compile _ PIXELSNAP_ON
+			#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
+			#include "UnityCG.cginc"
+			
+			struct appdata_t
+			{
+				float4 vertex   : POSITION;
+				float4 color    : COLOR;
+				float2 texcoord : TEXCOORD0;
+				UNITY_VERTEX_INPUT_INSTANCE_ID
+			};
+
+			struct v2f
+			{
+				float4 vertex   : SV_POSITION;
+				fixed4 color    : COLOR;
+				float2 texcoord  : TEXCOORD0;
+				UNITY_VERTEX_OUTPUT_STEREO
+			};
+			
+			fixed4 _Color;
+
+			v2f vert(appdata_t IN)
+			{
+				v2f OUT;
+				UNITY_SETUP_INSTANCE_ID(IN);
+				UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
+				OUT.vertex = UnityObjectToClipPos(IN.vertex);
+				OUT.texcoord = IN.texcoord;
+				OUT.color = IN.color * _Color;
+				#ifdef PIXELSNAP_ON
+				OUT.vertex = UnityPixelSnap (OUT.vertex);
+				#endif
+
+				return OUT;
+			}
+
+			float _Alpha;
+			sampler2D _MainTex;
+			sampler2D _AlphaTex;
+
+			fixed4 SampleSpriteTexture (float2 uv)
+			{
+				fixed4 color = tex2D (_MainTex, uv);
+
+#if ETC1_EXTERNAL_ALPHA
+				// get the color from an external texture (usecase: Alpha support for ETC1 on android)
+				color.a = tex2D (_AlphaTex, uv).r;
+#endif //ETC1_EXTERNAL_ALPHA
+
+				return color;
+			}
+
+			fixed4 frag(v2f IN) : SV_Target
+			{
+				fixed4 c = SampleSpriteTexture (IN.texcoord) * IN.color;
+				c.rgb *= c.a;
+
+				c.a = _Alpha;
+
+				return c;
+			}
+		ENDCG
+		}
+	}
+}

+ 9 - 0
Assets/SpriteRender101.shader.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 860881a4d9814c54eaecf822b772f95f
+timeCreated: 1498638045
+licenseType: Pro
+ShaderImporter:
+  defaultTextures: []
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

二进制
Assets/Sr101Mat.mat


+ 8 - 0
Assets/Sr101Mat.mat.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 745b46b4473ab08418783b01ff1fafdc
+timeCreated: 1498638225
+licenseType: Pro
+NativeFormatImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 81 - 0
Assets/Test.cs

@@ -0,0 +1,81 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+using System.Collections;
+
+public class Test : Regist 
+{
+    #region 变量
+
+    public Image Image1;
+    public Image Image2;
+    public Image Image3;
+
+	public Sprite Sprite1;
+	public Sprite Sprite2;
+	public Sprite Sprite3;
+
+	public SpriteRenderer Sr1;
+	public SpriteRenderer Sr2;
+	public SpriteRenderer Sr3;
+
+    #endregion
+
+    public void Awake()
+    {
+        StartCoroutine(TestLoad());
+    }
+
+    public IEnumerator TestLoad()
+    {
+        WWW www = new WWW(Auxiliary.GetStreamPath() + "/Bundle/Windows/test");
+
+        while (!www.isDone)
+        {
+            yield return null;
+        }
+
+        if (string.IsNullOrEmpty(www.error))
+        {
+            Sprite[] sprites = www.assetBundle.LoadAllAssets<Sprite>();
+
+            //			MaterialPropertyBlock materialPropertyBlock = new MaterialPropertyBlock ();
+            //
+            //			Sr1.GetPropertyBlock (materialPropertyBlock);
+            //
+            //			materialPropertyBlock.SetFloat ("_Alpha", 0);
+            //
+            //			Sr1.SetPropertyBlock (materialPropertyBlock);
+            //        	
+            //
+            //			materialPropertyBlock = new MaterialPropertyBlock ();
+            //
+            //			Sr2.GetPropertyBlock (materialPropertyBlock);
+            //
+            //			materialPropertyBlock.SetFloat ("_Alpha", 0.5f);
+            //
+            //			Sr2.SetPropertyBlock (materialPropertyBlock);
+            //
+            //
+            //			materialPropertyBlock = new MaterialPropertyBlock ();
+            //
+            //			Sr3.GetPropertyBlock (materialPropertyBlock);
+            //
+            //			materialPropertyBlock.SetFloat ("_Alpha", 1f);
+            //
+            //			Sr3.SetPropertyBlock (materialPropertyBlock);
+
+            //Sr1.sprite = sprites[0];
+            //Sr2.sprite = sprites[1];
+            //Sr3.sprite = sprites[2];
+
+            Image1.sprite = sprites[0];
+            Image2.sprite = sprites[1];
+            Image3.sprite = sprites[2];
+        }
+        else
+        {
+            Debug.Log(www.error);
+        }
+    }
+}

+ 12 - 0
Assets/Test.cs.meta

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

二进制
Assets/TestMat.mat


+ 8 - 0
Assets/TestMat.mat.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d5b445e5875f1404289664e1b328499a
+timeCreated: 1498633691
+licenseType: Pro
+NativeFormatImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

二进制
Assets/test.unity


+ 0 - 6
Assets/test.unity.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: ba3b4ecb5e369274496c477a1a7104b8
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
ProjectSettings/EditorSettings.asset


二进制
ProjectSettings/GraphicsSettings.asset


+ 9 - 1
ToList.txt

@@ -1,3 +1,11 @@
+删掉TestBundle
+
+Prefab中的图片和Bundle中的图片不要重复
+
+图集-有异步加载和无异步加载的情况
+
+小游戏说明加个padding
+
 分享appid申请
 
 
@@ -15,7 +23,7 @@
 
 //打包时重新导入Bundle
 
-//先开启Service再打包
+先开启Service再打包
 
 //更新版本号