Skip to content

Instantly share code, notes, and snippets.

View r1noff's full-sized avatar

Ivan Rechkin r1noff

  • Take Top Entertainment
  • Russia
View GitHub Profile
@JohannesDeml
JohannesDeml / README.md
Last active July 17, 2024 14:38
Remove Unity mobile notification warning for WebGL builds

Remove warning

Unity shows the following warning on mobile devices up to Unity 2019.4: "Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway." This script helps you remove this warning

Live example

To see live examples see Unity Web GL Loading Test

Logic

The script will run after the build has completed and replace the checks from all generated javascript files.

Support

@aras-p
aras-p / DebugNode.hlsl
Created January 3, 2020 10:37
"Print a value" custom function node code for Unity ShaderGraph
// Quick try at doing a "print value" node for Unity ShaderGraph.
// Tested on Unity 2019.2.17 with ShaderGraph 6.9.2.
//
// Use with CustomFunction node, with two inputs:
// - Vector1 Value, the value to display,
// - Vector2 UV, the UVs of area to display at.
// And one output:
// - Vector4 Color, the color.
// Function name is DoDebug.
@mtrive
mtrive / EnableThreads.cs
Last active September 11, 2022 07:07
Unity Editor script to enable WebAssembly multithreading
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
class EnableThreads
{
static EnableThreads()
{
PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Wasm;
PlayerSettings.WebGL.threadsSupport = true;
@mstevenson
mstevenson / CreateAssetFromScript.cs
Created February 6, 2013 22:39
Creates an on-disk instance of a Unity ScriptableObject. To install, copy CreateAssetFromScript.cs into an Editor folder in your Unity project. To use, first select a script that inherits from ScriptableObject in the Project window, then select the menu Assets > Create Asset From ScriptableObject.
using UnityEngine;
using UnityEditor;
using System;
public class CreateAssetFromScript : Editor {
[MenuItem("Assets/Create Asset From Manager Script", false, 10000)]
public static void CreateManager ()
{
ScriptableObject asset = ScriptableObject.CreateInstance (Selection.activeObject.name);