Flatkit 추가 및 설정

This commit is contained in:
2026-01-25 11:27:33 +09:00
parent 05233497e7
commit cf16910a32
1938 changed files with 408633 additions and 244 deletions

View File

@@ -0,0 +1,32 @@
using UnityEngine;
using UnityEditor;
public class GradientSkyboxEditor : UnityEditor.MaterialEditor {
public override void OnInspectorGUI() {
serializedObject.Update();
var theShader = serializedObject.FindProperty ("m_Shader");
if (isVisible && !theShader.hasMultipleDifferentValues && theShader.objectReferenceValue != null) {
EditorGUI.BeginChangeCheck();
base.OnInspectorGUI();
if (EditorGUI.EndChangeCheck()) {
var dirPitch = GetMaterialProperty(targets, "_DirectionPitch");
var dirYaw = GetMaterialProperty(targets, "_DirectionYaw");
var dirPitchRad = dirPitch.floatValue * Mathf.Deg2Rad;
var dirYawRad = dirYaw.floatValue * Mathf.Deg2Rad;
var direction = new Vector4(Mathf.Sin(dirPitchRad) * Mathf.Sin(dirYawRad), Mathf.Cos(dirPitchRad),
Mathf.Sin(dirPitchRad) * Mathf.Cos(dirYawRad), 0.0f);
GetMaterialProperty(targets, "_Direction").vectorValue = direction;
PropertiesChanged();
}
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: fb06f6d66c6c3423c82d8b5ed585ec3e
timeCreated: 1453992704
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: