Gizmos
27 Thứ Bảy Th6 2015
Posted Game Development, Unity
in27 Thứ Bảy Th6 2015
Posted Game Development, Unity
in27 Thứ Bảy Th6 2015
Posted Game Development, Unity
inNguồn: http://www.mikedoesweb.com/2012/camera-shake-in-unity/
using UnityEngine; using System.Collections; public class cameraShake : MonoBehaviour { private Vector3 originPosition; private Quaternion originRotation; public float shake_decay; public float shake_intensity; void OnGUI (){ if (GUI.Button (new Rect (20,40,80,20), "Shake")){ Shake (); } } void Update (){ if (shake_intensity > 0){ transform.position = originPosition + Random.insideUnitSphere * shake_intenity; transform.rotation = new Quaternion( originRotation.x + Random.Range (-shake_intensity,shake_intensity) * .2f, originRotation.y + Random.Range (-shake_intensity,shake_intensity) * .2f, originRotation.z + Random.Range (-shake_intensity,shake_intensity) * .2f, originRotation.w + Random.Range (-shake_intensity,shake_intensity) * .2f); shake_intensity -= shake_decay; } } void Shake(){ originPosition = transform.position; originRotation = transform.rotation; shake_intensity = .3f; shake_decay = 0.002f; } }
21 Chủ Nhật Th6 2015
Posted Game Development, Unity
in1.
ArgumentException: The Assembly Newtonsoft.Json is referenced by OneSignalSDK (‘Assets/Plugins/WP8/OneSignalSDK.dll’). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:154)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:160)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:192)
UnityEditor.HostView:OnGUI()
Chuyển Any CPU thành ARM OneSignalSDK
Xóa sạch Plugins/StandardAsssets/IO folder
Error building Player: FileNotFoundException: E:\[U]nity\WordPuzzleWP8\Temp\StagingArea\StoreProductView.dll does not exist
2. Khi dùng chung với MobileSocialPlugin thì cái plugin này cần được cài trước Ultimate để tránh lỗi xảy ra ít nhất.
Nhớ phải ấn install trước khi cài plugin tiếp theo.
Add cả 2 cái xong cũng có một số cần sửa như:
– Xóa 1 file FileStaticAPI 1
– Xóa 1 file SA_FB_PlaceHolder
19 Thứ Sáu Th6 2015
Posted Game Development, Unity
in Dictionary param = new Dictionary();
param.Add(“app_id”, Config.getAppId());
param.Add(“message”, “xxxx”);
param.Add(“redirect_uri”, “https://apps.facebook.com/1595855013988996”);
fb.Dialog(“apprequests”,param,RequetDone);
Dictionary param = new Dictionary();
param[“fields”] = “user,score”;
string url = “1595855013988996/scores”;
print(“url : ” + url);
fb.RequestGet(url, param, RequetDone);
POST request: me/scores?score=10
17 Thứ Tư Th6 2015
Posted Mobile Development, Windows Phone
in– Rotate
DisplayInformation.GetForCurrentView() :
– Status bar
StatusBar.GetForCurrentView() :
– Open url:
Windows.System.Launcher.LaunchUriAsync(new Uri(“ms-windows-store:reviewapp?appid=09d4784e-28c6-4428-966c-164978b2dba7”));
– Send email:
Windows.ApplicationModel.Email.EmailMessage mail = new Windows.ApplicationModel.Email.EmailMessage();
mail.Subject = “[Support] Fairy Tail”;
mail.Body = “”;
mail.To.Add(new Windows.ApplicationModel.Email.EmailRecipient(“thebrownbox2015@outlook.com”));
Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(mail);
– Change AppBarButton Icon:
<AppBarButton
x:Name=”btShare”
Label=”share” Click=”Click_Share”>
<AppBarButton.Icon>
<BitmapIcon UriSource=”/Assets/share.png” />
</AppBarButton.Icon>
</AppBarButton>
– review app:
new Uri(“ms-windows-store:REVIEW?PFN=” + Windows.ApplicationModel.Store.CurrentApp.AppId)
17 Thứ Tư Th6 2015
Posted Mobile Development, Windows Phone
in17 Thứ Tư Th6 2015
Posted Mobile Development, Windows Phone
inYou should use a Basic Page into your app!
It is very usefull and it save you a lot of work!
There are some class will auto add to your project!
USE:
navigationHelper : will help you for navigation!
DefaultViewModel : help you auto binding! (Just have to binding the content, don’t care about the datacontext anymore!)
17 Thứ Tư Th6 2015
Posted Mobile Development, Windows Phone
in17 Thứ Tư Th6 2015
Posted Mobile Development, Windows Phone
in16 Thứ Ba Th6 2015
Posted Game Development, Unity
in