Shader "PBR Master"
{
Properties
{
_Color("Color", Color) = (0, 0, 0, 0)
}
SubShader
{
Tags
This file contains hidden or 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 os | |
import bpy | |
import bpy.utils.previews | |
def get_image(filepath): | |
name = os.path.basename(filepath) | |
if name not in bpy.data.images: | |
bpy.ops.image.open(filepath = filepath) | |
return bpy.data.images(name) |
This file contains hidden or 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 os | |
import bpy | |
import bpy.utils.previews | |
def get_image(filepath): | |
name = os.path.basename(filepath) | |
if name not in bpy.data.images: | |
bpy.ops.image.open(filepath = filepath) | |
return bpy.data.images(name) |
This file contains hidden or 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
bl_info = { | |
"name": "Run Script in PyConsole", | |
"author": "CoDEmanX", | |
"version": (1, 0), | |
"blender": (2, 80, 0), | |
"location": "Python Console > Console > Run Script", | |
"description": "Execute the code of a textblock within the python console.", | |
"warning": "", | |
"wiki_url": "", | |
"tracker_url": "", |
This file contains hidden or 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
bl_info = { | |
"name": "Run Script in PyConsole", | |
"author": "CoDEmanX", | |
"version": (1, 0), | |
"blender": (2, 80, 0), | |
"location": "Python Console > Console > Run Script", | |
"description": "Execute the code of a textblock within the python console.", | |
"warning": "", | |
"wiki_url": "", | |
"tracker_url": "", |
This file contains hidden or 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
/// Texture exporter for Unity | |
/// | |
/// IMPORTANT: Must be put into Editor folder to work | |
/// | |
/// Right click on a texture in assets window and select one of 'Export/' options | |
/// - Use "RG Normal Map" to export normal maps as it will swap AG channels used by Unity shaders into typically used RG channels | |
/// | |
/// Original script by Eric5h5 | |
/// Rewritten to C# and updated by Nothke | |
/// |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Circle : MonoBehaviour | |
{ | |
[SerializeField] private GameObject prefab; | |
[SerializeField] private float radius = 2; | |
[SerializeField] private float number = 1; | |
private float t; |
This file contains hidden or 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 System.Collections; | |
public class grouping: MonoBehaviour { | |
[System.Serializable] | |
public class class1{ | |
public enum myEnum {one,two,three}; | |
public myEnum[] row; | |
public string name; | |
public int price; | |
} |
This file contains hidden or 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; | |
public class SomePerson : MonoBehaviour | |
{ | |
//This field gets serialized because it is public. | |
public string firstName = "John"; | |
//This field does not get serialized because it is private. | |
private int age = 40; |
This file contains hidden or 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
interface ICanHex | |
{ | |
void Hex(); | |
} | |
interface ICanHeal | |
{ | |
void Heal(); | |
} |