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
Shader "Unlit/KeywordEnum" | |
{ | |
Properties | |
{ | |
[KeywordEnum(Red,Green,Blue)] _Color("Color",int) = 0 | |
} | |
SubShader | |
{ | |
Pass | |
{ |
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
Shader "Custom/ProceduralMesh" | |
{ | |
subshader | |
{ | |
pass | |
{ | |
HLSLPROGRAM | |
#include "UnityCG.cginc" | |
#pragma vertex vert |
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; | |
[CreateAssetMenu(menuName ="Data/PreviewData")] | |
public class PreviewData : ScriptableObject | |
{ | |
public Color previewColor; | |
} |
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; | |
using Unity.Collections; | |
using Unity.Jobs; | |
using UnityEngine; | |
public class RaycastCommandRaycaster: IDisposable | |
{ | |
NativeArray<RaycastCommand> commands; | |
NativeArray<RaycastHit> results; |
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.Linq; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
public class DropdownList : BaseField<Enum> | |
{ |
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
import bpy | |
def paintVerteces(): | |
ob = bpy.context.object | |
print(ob.name) | |
bpy.ops.object.mode_set(mode='VERTEX_PAINT') | |
maxZ = float('-inf') | |
minZ = float('inf') |
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
/******************************************************************************* | |
* Don't Be a Jerk: The Open Source Software License. | |
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk | |
******************************************************************************* | |
* _I_ am the software author - JohannesMP on Github. | |
* _You_ are the user of this software. You might be a _we_, and that's OK! | |
* | |
* This is free, open source software. I will never charge you to use, | |
* license, or obtain this software. Doing so would make me a jerk. | |
* |
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
private void OnSceneGUI() | |
{ | |
DrawToolBar(SceneView.lastActiveSceneView); | |
activeTool.Act(this, Event.current); | |
} |
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
private GUIContent[] toolsButton; | |
private List<LevelMeshTool> tools; | |
private LevelMeshTool activeTool; | |
int m_selectedTool; | |
int selectedTool | |
{ | |
get => m_selectedTool; | |
set | |
{ | |
m_selectedTool = 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
using System.Collections.Generic; | |
using System; | |
public static class LevelMeshToolProvider | |
{ | |
public static List<LevelMeshTool> tools = new List<LevelMeshTool>(); | |
static LevelMeshToolProvider() | |
{ | |
foreach (var type in GetAllTypes(AppDomain.CurrentDomain)) |
NewerOlder