This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT License | |
// Copyright (c) 2022 anarkila - https://github.com/anarkila | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.Rendering; | |
using UnityEngine.UIElements; | |
#if ENABLE_INPUT_SYSTEM | |
using UnityEngine.InputSystem.UI; | |
#endif | |
#if UNITY_EDITOR | |
using UnityEditor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getOS() | |
-- ask LuaJIT first | |
if jit then | |
return jit.os | |
end | |
-- Unix, Linux variants | |
local fh,err = assert(io.popen("uname -o 2>/dev/null","r")) | |
if fh then | |
osname = fh:read() |
Shader Graph files to create billboard trees with billboard shadows. Exported from Unity 2023.2 and Shader Graph 16.0.4
Note: Shaders written for default
Quad
meshes in mind.
To make sure shadows are being drawn always behind tree billboards change shadow material’s Sorting Priority to a negative value:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This gist can be found at https://gist.github.com/bestknighter/660e6a53cf6a6643618d8531f962be2c | |
// I modified Aras Pranckevičius's awesome shader code to be able to handle Infinite and Not A Number numbers | |
// Tested on Unity 2023.1.0a15 with ShaderGraph 15.0.1. | |
// Quick try at doing a "print value" node for Unity ShaderGraph. | |
// | |
// Use with CustomFunction node, with two inputs: | |
// - Vector1 Value, the value to display, | |
// - Vector2 UV, the UVs of area to display at. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine.SceneManagement; | |
// From https://gist.github.com/JohannesDeml/5802473b569718c9c86de906b7039aec | |
// Original https://gist.github.com/ulrikdamm/338392c3b0900de225ec6dd10864cab4 | |
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser). | |
// This opens an empty scene with your prefab where you can edit it. | |
// Put this script in your project as Assets/Editor/EditPrefab.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEditor.iOS.Xcode; | |
using System.IO; | |
using System.Collections.Generic; | |
public class PostBuildProcess : MonoBehaviour | |
{ | |
internal static void CopyAndReplaceDirectory(string srcPath, string dstPath) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.iOS.Xcode; | |
using UnityEditor.Callbacks; | |
using System.Collections; | |
public class XcodeSettingsPostProcesser | |
{ |
NewerOlder