This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
public class Controller : MonoBehaviour { | |
// To display output of the alert box | |
public Text reply; | |
// To store context of the main activity that Unity3D is running | |
private AndroidJavaObject activityContext = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.plugin.android.dialogboxmodule; | |
import android.app.AlertDialog; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Build; | |
import android.view.ContextThemeWrapper; | |
import com.unity3d.player.UnityPlayer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class CallToast : MonoBehaviour { | |
// To store context of the main activity that Unity3D is running | |
private AndroidJavaObject activityContext = null; | |
// To store the instance of the class | |
private AndroidJavaObject toastExample = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "UnityCoder/Rays2" | |
{ | |
Properties | |
{ | |
tDiffuse ("Base (RGB)", 2D) = "white" {} | |
fX ("fX", Float) = 0.5 // you can feed mouse xpos here with script: var mpos:Vector3 = Camera.main.ScreenToViewportPoint(Input.mousePosition); renderer.material.SetFloat( "fX", mpos.x); | |
fY ("fY", Float) = 0.5 // mouse ypos | |
fExposure ("fExposure", Float) = 0.6 | |
fDecay ("fDecay", Float) = 0.93 | |
fDensity ("fDensity", Float) = 0.96 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
/// <summary> | |
/// Quality setting manager. | |
/// To change the quality of graphics at runtime which will | |
/// increase quality and power consumption and may decrease framerate vice versa | |
/// </summary> | |
public class QualitySettingManager : MonoBehaviour { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "FX/Matte Shadow" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 | |
} | |
SubShader { | |
Tags {"Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="TransparentCutout"} | |
LOD 200 | |
Blend Zero SrcColor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2012 Calvin Rien | |
// http://the.darktable.com | |
// | |
// This software is provided 'as-is', without any express or implied warranty. In | |
// no event will the authors be held liable for any damages arising from the use | |
// of this software. | |
// | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it freely, | |
// subject to the following restrictions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SwipeScript : MonoBehaviour { | |
private float fingerStartTime = 0.0f; | |
private Vector2 fingerStartPos = Vector2.zero; | |
private bool isSwipe = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class Levitate : MonoBehaviour { | |
public float amplitude = 0.1f; | |
public Vector3 speed; | |
private Vector3 tempVal; | |
private Vector3 tempPos; | |
void Start () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/CustomShader_Texture" | |
{ | |
Properties { | |
// Texture field in inspector where we assign texture to the model | |
_MainTexture("Main Texture",2D) = "white"{} | |
} | |
SubShader { | |
PASS { | |
CGPROGRAM |