Skip to main content

Posts

Showing posts from 2015

Tutorial on Min3D framework using Android Studio

Salam peeps, UPDATES***, the model on the old link is no longer working. so i have create a github repo, where i put the source code in a project, you guys can try to clone in and run on your android studio device emulator or directly on your phone, Ive replaced the model with a cube. https://github.com/aliaramli/Min3DTutorial Previously i ve posted tutorial on min3D using eclipse IDE, i believe most of us has moved to Android Studio IDE in developing android apps? As previous tutorial shows a lot of support from readers and among hot post in my blog, i ve decided to post the same tutorial but this time using Android Studio. For those who are familiar with Eclipse/Android Studio migration they might not have problem in running this tutorial . For more detail explanation on min3D please visit this website page Ok lets get started. Step One Create a new android project in android studio. you may name it as what you like, below are how i defined my project settings.

Unity : Failure [INSTALL_FAILED_CONTAINER_ERROR] on installing APK on Android Emulator.

Salam peeps. Problem : install build apk from unity in android emulator Causes : based on my googling, it can be varies. Not enough memory space in emulator, solve by removing out apps on the emulator or increase the emulator memory space. (NOT happened in my cause!) Declare in the AndroidManifest.xml  "android:installLocation" to auto instead internal (tried but not working) Remove file smdl2tmp1.asec, first navigate to your sdk platform-tools then type "adb shell", followed by "rm /mnt/secure/asec/smdl2tmp1.asec" (NOT happened in my case, i dont event have smdl2tmp1.asec) So after more googling, my PROBLEM was due to my player settings in UNITY when building the APK somehow has overridden my setting in the AndroidManifest file! so... thanks to this post :  http://answers.unity3d.com/questions/815011/unable-to-install-apk.html

C# Encrypt & Decrypt Serialized Object

Hi peeps! hoh! this is the thing that ive been trying to do for 2-3 days! encountered quite a number of problems! so guys this thing really forced me to google a lot on exception that thrown to me. I hope This tutorial really helps those who trying to accomplishing the same objective and encountered bugs along the way. Objective : To serialized object to a memory stream and encrypt the stream then only write the stream into a file. Question : Why is it important to Encrypt our data? isnt serialization is sufficient enough? Answer : As i posted in my serialization tutorial we can see the data that we serialized into a file is not secure enough. Sensitive data are still exposed. Left : Encrypted data Right: Non Encrypted data I hope you guys been patient to go tru step by step tutorial that i provided as this implementation if there are missing codes or steps. you wll encountered numerous exception later. so be patient and keep reading through. 1. Declare our global

C# Deserialization tutorial : Deserialize file stream object

Hi peeps, this is a continued post from serialization tutorial . walaah. you guys already know how to do serialization. Ok now, we going to read our created file and store it in filestream and deserialize it back into our data object. 1. Ensure that we are pointing to the right path. 2. Read our file, notice that we are using FileMode.Open 3. Instantiate our DataObjectSerializable instance. We going to store back the data that we deserialize into it. 4. Deserialize our file stream and assign the returned value to our dataObject. 5. Print out the dataObject data values to check. Done! Run the program. The output Hope this helps. For full code you can view it from my github repo here: https://github.com/aliaramli/c-tutorials/tree/master/Serialization/SerializationExample/SerializationExample

C# Serialization Tutorial Part 1 : Serialize object in file stream

Hello Peeps. Came across this topic while doing our game saving data feature. this post only cover basic serialization. basically serialization help us to convert our object into stream of bytes so that our object can be stored or transmit over in memory/file/database. before we can proceed with the serialization tutorial, we need to set the user permission to our target folder path. 1. Set the folder path to be accessible and can be override. This step is to avoid our program/apps from throwing unauthorizedaccessexception.    - for my scenario, im choosing the path of D:\SelfLearning\c#\Serialization to store my data file. Right click the target folder, select on Security tab Select on Users and give full control or modify permission to the user. 2. Now we are going to write our code. First we need to setup our folder path. 3. We going to create our file.  In this tutorial we are using FileStream type, other then FileStream, we can make use of MemoryStream i

Unity3d Engine 4.6 : Playing with UI Text example

Hi peeps. again. i wasted few hours to understand how to access UI object in Unity scene, in code Ok today i'm going to share with you guys, step by step okay! Our objectives here is to Have a text - display from "Hello" to "Hello World" dynamically using UI Text and C# Scripting 1. Create new scene, name it DynamicTextScene 2. Create new UI Object : Canvas, go to Hierarchy Window, right click select UI>Canvas.    3. In Canvas inspector, select its render mode to be World Space. 4. Now create a Text UI, Under the Canvas object, name it as dynamicText. 5. Now add new Button UI, under the Canvas and name it as PressButton. 6. Select the button text, change the button display text to "Press to Change Text" 7. Now select the Canvas, navigate to its Inspector, add new component script, name it as DynamicText. 8. Inside the DynamicText.cs script, code as follow. a.