Skip to content

Instantly share code, notes, and snippets.

View prashant-singh's full-sized avatar

Prashant Singh prashant-singh

View GitHub Profile
@prashant-singh
prashant-singh / EXT.cs
Last active October 13, 2018 05:10
Extension methods for Unity
using UnityEngine;
using System.Collections;
using System;
public static class EXT
{
//--------------------------------------------- CONVERT THE STRING TO INTEGER ----------------------------------//
// This function will parse the string to the integer if possible.
public static int ToInt(this string tempVal)
@prashant-singh
prashant-singh / CheckConnection.cs
Created December 26, 2016 05:29
Check internet connection - Unity
using UnityEngine;
using System;
using System.Collections;
using SimpleJSON;
public class CheckConnection : MonoBehaviour
{
// CHECK INTERNET CONNECTION
public bool thereIsConnection;
string url ="http://www.google.com";