Skip to content

Instantly share code, notes, and snippets.

@arefinwork718
arefinwork718 / glitter.shader
Created May 24, 2018 08:41 — forked from nicloay/glitter.shader
unity glitter shader
Shader "Custom/GlitterShader"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_NoiseSizeCoeff("_NoiseSizeCoeff (Bigger => larger glitter spots)", Float) = 0.61
_NoiseDensity("NoiseDensity (Bigger => larger glitter spots)", Float) = 53.0
}
SubShader
@arefinwork718
arefinwork718 / FlightController.cs
Created April 16, 2018 13:18 — forked from runewake2/FlightController.cs
The basic 6 Degrees of Freedom Spaceship controller build as a part of 6 Degrees Of Freedom Spaceship - The Wrong Way video: https://youtu.be/C7PtRXH3e-Y
using UnityEngine;
// Basic flight controller designed to demonstrate Gimble Locking in 3D space.
// This works by calculating rotation based on Euler angles instead of other methods.
public class FlightController : MonoBehaviour
{
public float speed;
public float rotationSpeed;
void Update ()
@arefinwork718
arefinwork718 / DynamicUniformPoligon.cs
Created April 16, 2018 13:18 — forked from runewake2/DynamicUniformPoligon.cs
Unity3D Script to generate a uniform N sided polygon.
using System.Collections.Generic;
using UnityEngine;
[ExecuteInEditMode]
[RequireComponent(typeof(MeshFilter))]
public class DynamicUniformPoligon : MonoBehaviour
{
private MeshFilter filter;
public int initialSides = 3;
@arefinwork718
arefinwork718 / ProjectileReflectionEmitterUnityNative.cs
Created April 16, 2018 13:17 — forked from runewake2/ProjectileReflectionEmitterUnityNative.cs
Demonstrates a projectile reflecting in 3D Space a variable number of times in Unity 3D
using UnityEditor;
using UnityEngine;
/*
* Projectile reflection demonstration in Unity 3D
*
* Demonstrates a projectile reflecting in 3D space a variable number of times.
* Reflections are calculated using Raycast's and Vector3.Reflect
*
* Developed on World of Zero: https://youtu.be/GttdLYKEJAM
<?php
/*
(2014) Main source -> http://lancenewman.me/posting-a-photo-to-instagram-without-a-phone/
I just managed to sniff Instagram traffic and fixed the code
-- Have fun - batuhan.org - Batuhan Katırcı
--- for your questions, comment @ http://batuhan.org/instagram-photo-upload-with-php/
@arefinwork718
arefinwork718 / GameCenterExamples.js
Created July 3, 2017 10:25 — forked from mehmettaskiner/GameCenterExamples.js
Gist that explains game center implementation in unity
/*
To report an achievement status use this function.
for success, achievement must be reported to 100.0
if you want to track some certain tasks, like blasted ball count.
you can calculate a percentage and when user blasted a ball,
you can report this percentage instead of 100.0
*/
Social.ReportProgress ("achievementID", 100.0, function(result) {
if (result){
Debug.Log ("Successfully reported achievement progress");
@arefinwork718
arefinwork718 / GameCenterController.js
Created July 3, 2017 10:25 — forked from mehmettaskiner/GameCenterController.js
GameCenterController, attach this to an empty game object at your first scene.
#pragma strict
import UnityEngine.SocialPlatforms;
import UnityEngine.SocialPlatforms.GameCenter;
function Start () {
DontDestroyOnLoad(gameObject);
// Authenticate and register a ProcessAuthentication callback
// This call needs to be made before we can proceed to other calls in the Social API
Social.localUser.Authenticate (ProcessAuthentication);
GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true);