Skip to content

Instantly share code, notes, and snippets.

View arunkarnann's full-sized avatar
🎯
Focusing

Arun Karnan arunkarnann

🎯
Focusing
View GitHub Profile
@arunkarnann
arunkarnann / GZCharacterControl.cs
Last active May 24, 2016 05:58
A simplest ever Third person controller for standalone Unity3d
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(CapsuleCollider))]
[RequireComponent(typeof(CharacterController))]
public class GZThirdPersonSimplified : MonoBehaviour {
[SerializeField] float m_TurnSpeed = 20;
[SerializeField] float m_TurnAmount;
Vector3 RotationVector;
[SerializeField] Vector3 moveDirection = Vector3.zero;
@arunkarnann
arunkarnann / EnemyDissolve.shader
Last active June 22, 2016 04:41
Enemy Texture death anim for texture needs a desired Alpha guide. Unity3d Shader
Shader "Custom Shaders/Dissolving" {
Properties {
_MainTex ("Texture (RGB)", 2D) = "white" {}
_SliceGuide ("Slice Guide (RGB)", 2D) = "white" {}
_SliceAmount ("Slice Amount", Range(0.0, 1.0)) = 0.5
}
SubShader {
Tags { "RenderType" = "Opaque" }
Cull Off
CGPROGRAM
@arunkarnann
arunkarnann / fogplane.shader
Last active May 24, 2016 06:04
Simple fog shader with alpha guide with diff intensity Unity3d Shader
Shader "Custom/FogPlane" {
Properties {
_MainColour("Colour",Color)=(1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_CutoffTex ("Alpha Guide", 2D) = "white" {}
_ScrollDir("Scroll Direction",Vector)=(1,0,0,0.1)
_FadeMul("Fading Multiplier",Range(0,3))=1
}
SubShader {
Tags { "RenderType"="Transparent" "RenderQueue"="Transparent"}
@arunkarnann
arunkarnann / threechannelmovingfog.shader
Last active May 24, 2016 06:04
Moving single channel in a Texture(RGB) Unity3d shader
Shader "Custom/ThreeColorShaderBackUp" {
properties{
//_MainTex("Main Texture",2D) = "white"{}
_MainTint ("Tint Color",color)=(1,1,1,1)
_ColorA ("Color A",color)=(1,1,1,1)
_ColorB ("Color B",color)=(1,1,1,1)
_RChannelTex("R Channel",2D)=""{}
[RequireComponent(typeof(CharacterController))]
public class GZThirdPersonSimplified : MonoBehaviour {
[SerializeField] float m_TurnSpeed = 20;
[SerializeField] float m_TurnAmount;
Vector3 RotationVector;
[SerializeField] Vector3 moveDirection = Vector3.zero;
public float speed = 6.0F;
public float jumpSpeed = 8.0F;
public float gravity = 20.0F;
// Description:
// Shows the definition of a word.
//
// Dependencies:
// Requires SoundManager2.
//
// Commands:
// define dictionary - gives the definition of the word "dictionary."
//
// Notes:
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class PostRenderer : MonoBehaviour
{
public Material _material;
void Awake()
{
@arunkarnann
arunkarnann / CanvasToggler
Created October 27, 2016 14:15
A simple Unity3D Editor script to toggle canvas setactive. Useful when you want to design something in Editor and often messing up by selecting canvas instead of objects.
using UnityEngine;
using System.Collections;
using UnityEditor;
public class CanvasToggler : Editor {
public static GameObject[] canvases = GameObject.FindGameObjectsWithTag("Canvas") as GameObject[];
[MenuItem("Editor Tools/Toggle canvas")]
static void ActivateOrDeactivate(){
@arunkarnann
arunkarnann / urlgrabber.py
Created November 9, 2016 05:39
python sript to grab .mp3 url from a html page/ web page
from bs4 import BeautifulSoup
import os
try:
import urllib.request as urllib2
except ImportError:
import urllib2
import sys
#Souce html from which the you want stuff to download
@arunkarnann
arunkarnann / chromecrash
Created November 11, 2016 06:09
android app log crash while clipborad even frired from chrome copy copy
11-11 11:32:53.662 16962-16962/com.renault.wordmonitoring I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@11cacff3 time:64935137
11-11 11:32:54.474 16962-16962/com.renault.wordmonitoring I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@910cac7 time:64935949
11-11 11:32:56.221 16962-16972/com.renault.wordmonitoring W/art: Suspending all threads took: 604.037ms
11-11 11:32:56.427 16962-16962/com.renault.wordmonitoring I/Choreographer: Skipped 75 frames! The application may be doing too much work on its main thread.
11-11 11:32:58.333 16962-16962/com.renault.wordmonitoring I/Timeline: Timeline: Activity_launch_request id:com.renault.wordmonitoring time:64939809
11-11 11:32:58.417 16962-16962/com.renault.wordmonitoring I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
11-11 11:32:58.594 16962-17047/com.renault.wordmonitoring D/OpenGLRenderer: endAllStagingAnimators on 0xb8c65888 (NavigationMenuView) with handle 0xb8dbebc8
11-11 11:32:58