Skip to content

Instantly share code, notes, and snippets.

View Kobusvdwalt's full-sized avatar
🤔
thinking

Kobus Kobusvdwalt

🤔
thinking
View GitHub Profile
@Kobusvdwalt
Kobusvdwalt / index.html
Last active January 31, 2022 22:23
Full Screen template for Unity HTML
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Unity WebGL Player | WebTest</title>
<script src="Build/UnityLoader.js"></script>
<style>
body{
Shader "Hidden/PerfectEdge"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
// No culling or depth
Cull Off ZWrite Off ZTest Always
@Kobusvdwalt
Kobusvdwalt / FadeAnyImage
Last active January 31, 2022 22:23
Simple script for fading any UI image in unity.
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class FadeAnyImage : MonoBehaviour {
float timePassed = 0;
float totalFadeLength;
Image imageToFade;
AnimationCurve curve;
@Kobusvdwalt
Kobusvdwalt / Localization_scr
Created June 28, 2015 17:19
Localization Made Super Simple
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System.Collections.Generic;
[ExecuteInEditMode]
[RequireComponent (typeof (Text))]
public class Localization_scr : MonoBehaviour {
// LOCALIZATION SETTINGS