Skip to content

Instantly share code, notes, and snippets.

View somedeveloper00's full-sized avatar
🏠
Working from home

Saeed Barari somedeveloper00

🏠
Working from home
  • Iran
View GitHub Profile
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "UI/Blurred Background" {
Properties {
_Blur ("Blur", Range(0, 1)) = 0.5
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
@somedeveloper00
somedeveloper00 / SecureDateTime.cs
Last active May 17, 2023 14:51
time sync from internet with additional options for modularizing
using System;
using System.Globalization;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
@somedeveloper00
somedeveloper00 / GameViewRender.cs
Created May 7, 2023 07:42
Unity GameView Camera Render To PNG (editor-only)
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
[RequireComponent( typeof(Camera) )]
public class GameViewRender : MonoBehaviour {
public int width = 1920;
public int height = 1080;
public int depth = 24;
@somedeveloper00
somedeveloper00 / SortOrderOffset.cs
Last active April 13, 2023 07:06
A simple Unity component for the UI to add offset to an element (and it's children)
using UnityEngine;
using UnityEngine.Serialization;
#if UNITY_EDITOR
using UnityEditor;
#endif
[ExecuteAlways]
public class SortOrderOffset : MonoBehaviour {
@somedeveloper00
somedeveloper00 / ConvertToObj.cs
Created March 30, 2023 11:17 — forked from NewEXE/ConvertToObj.cs
Export Unity Game Objects to Wavefront OBJ
// On the basis: https://forum.unity.com/threads/export-obj-while-runtime.252262/
// How to use:
// Put file to Assets/Editor folder
// then select GameObject -> Export selected objects
// in Unity's main panel.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;