27 Ekim 2014 Pazartesi

Host WCF on Windows Server 2012 - IIS8

If you have a fresh 2012 windows server,
There are some things to do to host wcf services on your server.

First:
Go to Server Manager - Dashboard - Add Roles & Features

Add following:

Server Roles
- Application Server
- Web Server(IIS)

Features:
- .Net 3.5 Features (select all)
- .Net Framework 4.5 Features (select all -to be sure )
- Windows Process Activation Service

WebServer Role(IIS) - Role Services
- WebServer
- IIS Hostable Web Core
- Management Tools
    - IIS Managerment Console
    - IIS Management Scripts and Tools

Application Server - Role Services
- .Net Framework 4.5
- Web Server (IIS) Support

Press install and have a coffee, check your facebook etc.

Second part is coming soon : )

21 Eylül 2014 Pazar

Unity OnCollisionEnter - OnTriggerEnter

Some notes:

In order to work with OnCollisionEnter:

At least one object should have a non-kinematic Rigidbody and the IsTrigger option of the Collider should be not checked. Both objects should have Colliders attached.

To work with OnTriggerEnter

At least one object should have a Rigidbody and both should have Colliders with IsTrigger option attached.


These options are probably same for the OnCollisionEnter2d and OnTriggerEnter2d.
You should use Collider2d and Rigidbody2D instead

Good luck : )

12 Temmuz 2014 Cumartesi

Wacom Intuos 3 Photoshop CS6 zoom problem

I was having this problem for months and couldn't find the solution until now.

When I was trying to zoom with touchstrip of my Wacom tablet in Photoshop, it was not zooming and the top menu of the Photoshop was flickering as it was pressing ALT key.

I have tried to update the drivers, reset the settings but none of them worked.

The solution is:

Open Wacom Tablet Properties panel,
Click on Functions and click on TocuhStrip Tab.

Select Scroll for function,
And select CTRL in Combine with option.

Yeap, that is the solution !

Now it works fine.

3 Haziran 2014 Salı

Unity - Default clip could not be found in attached animations list

Hi,
When I was dealing with mechanim anims in unity, I needed to use the legacy animations, but I have seen the error on the subject when I was trying to access the animation.

In order to fix that, Click on your animation, go upper-right corner to the settings icon, change it to Debug and set the AnimationType to 1


Voila !


$Unity - LoadingScene.unity - runner_unity - Android_ 2014-02-10 16.33.02.png


Source:
http://forum.unity3d.com/threads/legacy-animations-dont-work.159980/

5 Mart 2014 Çarşamba

NGUI Button isEnabled does not work BUG

Yeah,
If you set isEnabled = false of a UIButton in NGUI, the color of the button does not change even it is disabled.

It is a bug actually, you should change the NGUI isEnabled source code as follows:

public bool isEnabled
    {
        get
        {
            if (!enabled) return false;
            Collider col = collider;
            return col && col.enabled;
        }
        set
        {
            Collider col = collider;
            if (col != null) col.enabled = value;
            else enabled = value;
            UpdateColor(value, false);
        }
    }


Here is the link:
http://www.tasharen.com/forum/index.php?topic=6893.msg32520#msg32520

Note:
This bug is fixed after 3.x version, not sure which exactly.


BM FONT - How to get rid of black background from text

This is a weird issue I experience with BM Font.

Even if you select `White Text or Black Text with Alpha` option, it seems the BM Font does not recognize the setting and export the file with black backgorund.

Well, the solution is simple,

On Export Options, just select the Bit Depth as `32` not `8` (default).

Volla !

10 Ekim 2013 Perşembe

Vertex Color Shader in unity

Hi,
I have realized Unity3d does not have a shader for vertex colored models.

Since it is one of the easiest ways to color your model in Blender (Vertex Painting), you might need this shader:

Go to your assests folder - Create - Shader.
Give a name to your shader and paste the code below: (The name in code is "Vertex Colored", you can change it with your shader name).

Keep in mind, that you need create a material for your model if it is not created. Then you can choose this shader on material's shader list.

And make the ambient light white to see it properly. (Render Settings - Ambient Light)

Cheers


Vertex Color Shader Script

Source:
http://wiki.unity3d.com/index.php?title=VertexColor


Shader " Vertex Colored" {
Properties {
    _Color ("Main Color", Color) = (1,1,1,1)
    _SpecColor ("Spec Color", Color) = (1,1,1,1)
    _Emission ("Emmisive Color", Color) = (0,0,0,0)
    _Shininess ("Shininess", Range (0.01, 1)) = 0.7
    _MainTex ("Base (RGB)", 2D) = "white" {}
}

SubShader {
    Pass {
        Material {
            Shininess [_Shininess]
            Specular [_SpecColor]
            Emission [_Emission]    
        }
        ColorMaterial AmbientAndDiffuse
        Lighting On
        SeperateSpecular On
        SetTexture [_MainTex] {
            Combine texture * primary, texture * primary
        }
        SetTexture [_MainTex] {
            constantColor [_Color]
            Combine previous * constant DOUBLE, previous * constant
        } 
    }
}

Fallback " VertexLit", 1
}