Import art/VFX asset packs + game-feel systems; normalize texture extensions to lowercase for LFS
Add BefourStudios SciFi environment packs, Gabriel Aguiar VFX, and the ShaderCrew Toon Shader embedded packages, plus combat/enemy/wave/death gameplay systems and supporting vault docs/screenshots. Rename 11 vendor textures from uppercase .PNG/.HDR to lowercase so the case-sensitive Git LFS filters (*.png/*.hdr) match on case-sensitive filesystems (Linux CI, case-sensitive macOS), not just locally where core.ignorecase=true masks the gap. Each .meta moved with its asset so GUID references are preserved. All ~1000 binaries tracked via LFS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+217
@@ -0,0 +1,217 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using static ShaderCrew.TheToonShader.ShaderUtils;
|
||||
|
||||
namespace ShaderCrew.TheToonShader
|
||||
{
|
||||
public class CameraChildFocus : MonoBehaviour
|
||||
{
|
||||
public Camera targetCamera;
|
||||
public float distanceFromChild = 5.0f;
|
||||
public float yOffset = 0.0f;
|
||||
|
||||
public float transitionSpeed = 2.0f;
|
||||
public GameObject currentMaterialText;
|
||||
|
||||
public GameObject originalTemple;
|
||||
private bool isInitial = true;
|
||||
|
||||
private Transform[] headerTransforms;
|
||||
private Transform[] materialTransforms;
|
||||
private string currentKey = "";
|
||||
private int currentKeyIndex = 0;
|
||||
private int currentMaterialIndex = 0;
|
||||
|
||||
private Vector3 targetPosition;
|
||||
private Quaternion targetRotation;
|
||||
|
||||
Dictionary<string, List<Transform>> headersToMaterials;
|
||||
|
||||
RenderPipelineOptions rp;
|
||||
void Start()
|
||||
{
|
||||
rp = ShaderUtils.getCurrentRenderPipeline();
|
||||
|
||||
int childCount = transform.childCount;
|
||||
headerTransforms = new Transform[childCount];
|
||||
|
||||
headersToMaterials = new Dictionary<string, List<Transform>>();
|
||||
for (int i = 0; i < childCount; i++)
|
||||
{
|
||||
Transform header = transform.GetChild(i);
|
||||
headerTransforms[i] = header;
|
||||
string nameKey = header.name;
|
||||
headersToMaterials[nameKey] = new List<Transform>();
|
||||
|
||||
int materialCount = header.childCount;
|
||||
for (int j = 0; j < materialCount; j++)
|
||||
{
|
||||
headersToMaterials[nameKey].Add(header.GetChild(j));
|
||||
|
||||
}
|
||||
}
|
||||
currentKey = headersToMaterials.Keys.First();
|
||||
|
||||
if(rp == RenderPipelineOptions.URP2D)
|
||||
{
|
||||
targetPosition = originalTemple.transform.position + -1 * originalTemple.transform.forward * distanceFromChild;
|
||||
} else
|
||||
{
|
||||
targetPosition = originalTemple.transform.position + originalTemple.transform.forward * distanceFromChild;
|
||||
}
|
||||
targetPosition.y += yOffset;
|
||||
targetRotation = Quaternion.LookRotation(originalTemple.transform.position - targetPosition + new Vector3(0, yOffset / 2, 0));
|
||||
|
||||
|
||||
//// Set initial camera target if there are children
|
||||
//if (headersToMaterials[currentKey].Count > 0 && targetCamera != null)
|
||||
//{
|
||||
// FocusOnChild(currentMaterialIndex);
|
||||
//}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
string test;
|
||||
if (!isInitial)
|
||||
{
|
||||
test = "<b><size=50>" + currentKey + "</size></b>\r\n<b>" + headersToMaterials[currentKey][currentMaterialIndex].name + "</b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(rp != RenderPipelineOptions.URP2D)
|
||||
{
|
||||
test = "<b><size=50>" + "Unity Lit" + "</size></b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
test = "<b><size=50>" + "Unity Sprite Lit Default" + "</size></b>";
|
||||
}
|
||||
|
||||
}
|
||||
currentMaterialText.GetComponent<Text>().text = test;
|
||||
|
||||
//if (Input.GetKeyDown(KeyCode.D))
|
||||
if (SystemIndependentInput.GetKeyDown(KeyCode.D))
|
||||
{
|
||||
MoveToNextChild();
|
||||
isInitial = false;
|
||||
}
|
||||
//else if (Input.GetKeyDown(KeyCode.A))
|
||||
else if(SystemIndependentInput.GetKeyDown(KeyCode.A))
|
||||
{
|
||||
if (currentMaterialIndex != 0)
|
||||
{
|
||||
if (!isInitial)
|
||||
MoveToPreviousChild();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (rp == RenderPipelineOptions.URP2D)
|
||||
{
|
||||
targetPosition = originalTemple.transform.position + -1 * originalTemple.transform.forward * distanceFromChild;
|
||||
}
|
||||
else
|
||||
{
|
||||
targetPosition = originalTemple.transform.position + originalTemple.transform.forward * distanceFromChild;
|
||||
}
|
||||
|
||||
targetPosition.y += yOffset;
|
||||
|
||||
if (rp != RenderPipelineOptions.URP2D)
|
||||
{
|
||||
targetRotation = Quaternion.LookRotation(originalTemple.transform.position - targetPosition + new Vector3(0, yOffset / 2, 0));
|
||||
}
|
||||
isInitial = true;
|
||||
}
|
||||
|
||||
}
|
||||
//else if (Input.GetKeyDown(KeyCode.W))
|
||||
else if (SystemIndependentInput.GetKeyDown(KeyCode.W))
|
||||
{
|
||||
MoveToNextHeader();
|
||||
}
|
||||
//else if (Input.GetKeyDown(KeyCode.S))
|
||||
else if (SystemIndependentInput.GetKeyDown(KeyCode.S))
|
||||
{
|
||||
MoveToPreviousHeader();
|
||||
}
|
||||
|
||||
targetCamera.transform.position = Vector3.Lerp(targetCamera.transform.position, targetPosition, Time.deltaTime * transitionSpeed);
|
||||
|
||||
if (rp != RenderPipelineOptions.URP2D)
|
||||
{
|
||||
targetCamera.transform.rotation = Quaternion.Lerp(targetCamera.transform.rotation, targetRotation, Time.deltaTime * transitionSpeed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void MoveToNextChild()
|
||||
{
|
||||
if (headersToMaterials[currentKey].Count == 0) return;
|
||||
if (!isInitial)
|
||||
{
|
||||
currentMaterialIndex = (currentMaterialIndex + 1) % headersToMaterials[currentKey].Count;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
currentMaterialIndex = 0;
|
||||
|
||||
}
|
||||
FocusOnChild(currentMaterialIndex);
|
||||
}
|
||||
|
||||
private void MoveToPreviousChild()
|
||||
{
|
||||
if (headersToMaterials[currentKey].Count == 0) return;
|
||||
currentMaterialIndex = (currentMaterialIndex - 1 + headersToMaterials[currentKey].Count) % headersToMaterials[currentKey].Count;
|
||||
FocusOnChild(currentMaterialIndex);
|
||||
}
|
||||
|
||||
private void MoveToNextHeader()
|
||||
{
|
||||
if (headerTransforms.Length == 0) return;
|
||||
currentKeyIndex = (currentKeyIndex + 1) % headerTransforms.Length;
|
||||
currentKey = headerTransforms[currentKeyIndex].name;
|
||||
currentMaterialIndex = 0;
|
||||
FocusOnChild(0);
|
||||
}
|
||||
private void MoveToPreviousHeader()
|
||||
{
|
||||
if (headersToMaterials[currentKey].Count == 0) return;
|
||||
currentKeyIndex = (currentKeyIndex - 1 + headerTransforms.Length) % headerTransforms.Length;
|
||||
currentKey = headerTransforms[currentKeyIndex].name;
|
||||
currentMaterialIndex = 0;
|
||||
FocusOnChild(0);
|
||||
}
|
||||
private void FocusOnChild(int index)
|
||||
{
|
||||
if (targetCamera == null || index < 0 || index >= headersToMaterials[currentKey].Count) return;
|
||||
Transform targetChild = headersToMaterials[currentKey][index];
|
||||
//Debug.Log(targetChild.name);
|
||||
|
||||
|
||||
if (rp == RenderPipelineOptions.URP2D)
|
||||
{
|
||||
targetPosition = targetChild.position + -1 * targetChild.forward * distanceFromChild;
|
||||
}
|
||||
else
|
||||
{
|
||||
targetPosition = targetChild.position + targetChild.forward * distanceFromChild;
|
||||
}
|
||||
|
||||
targetPosition.y += yOffset;
|
||||
if (rp != RenderPipelineOptions.URP2D)
|
||||
{
|
||||
targetRotation = Quaternion.LookRotation(targetChild.position - targetPosition + new Vector3(0, yOffset / 2, 0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c304ba79dc2c704d807a85f6827fda0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 269238
|
||||
packageName: The Toon Shader
|
||||
packageVersion: 1.4.2
|
||||
assetPath: Packages/com.shadercrew.the-toon-shader.core/Scripts/Runtime/Demo/CameraChildFocus.cs
|
||||
uploadId: 919972
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using static ShaderCrew.TheToonShader.ShaderUtils;
|
||||
namespace ShaderCrew.TheToonShader
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
public class ChangeLightIntensityRP : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
|
||||
private Light light;
|
||||
private float originalIntensity;
|
||||
public float intensityBiRP = 1f;
|
||||
public float intensityURP = 60f;
|
||||
|
||||
|
||||
|
||||
protected RenderPipelineOptions rp = RenderPipelineOptions.NONE;
|
||||
void Start()
|
||||
{
|
||||
light = GetComponent<Light>();
|
||||
if (light != null)
|
||||
{
|
||||
if (rp == RenderPipelineOptions.NONE)
|
||||
{
|
||||
rp = getCurrentRenderPipeline();
|
||||
}
|
||||
if (rp == RenderPipelineOptions.URP)
|
||||
{
|
||||
light.intensity = intensityURP;
|
||||
}
|
||||
else
|
||||
{
|
||||
light.intensity = intensityBiRP;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 600bb0163f5f2f144a1edfa9dca81290
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 269238
|
||||
packageName: The Toon Shader
|
||||
packageVersion: 1.4.2
|
||||
assetPath: Packages/com.shadercrew.the-toon-shader.core/Scripts/Runtime/Demo/ChangeLightIntensityRP.cs
|
||||
uploadId: 919972
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#if USING_URP
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
namespace ShaderCrew.TheToonShader
|
||||
{
|
||||
public class Light2DOscillator : MonoBehaviour
|
||||
{
|
||||
public float moveDistance = 3f;
|
||||
public float moveSpeed = 2f;
|
||||
|
||||
private Vector3 startPos;
|
||||
|
||||
void Start()
|
||||
{
|
||||
startPos = transform.position;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
float offset = Mathf.Sin(Time.time * moveSpeed) * moveDistance;
|
||||
transform.position = new Vector3(startPos.x + offset, startPos.y, startPos.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3060582221477124c834179a062d0bc5
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 269238
|
||||
packageName: The Toon Shader
|
||||
packageVersion: 1.4.2
|
||||
assetPath: Packages/com.shadercrew.the-toon-shader.core/Scripts/Runtime/Demo/Light2DOscillator.cs
|
||||
uploadId: 919972
|
||||
@@ -0,0 +1,63 @@
|
||||
|
||||
|
||||
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
namespace ShaderCrew.TheToonShader
|
||||
{
|
||||
public class LightRotation : MonoBehaviour
|
||||
{
|
||||
public float startAngle = -30f;
|
||||
public float endAngle = 30f;
|
||||
|
||||
public float rotationSpeed = 1f;
|
||||
|
||||
public int pauseDuration = 500;
|
||||
|
||||
public int rotationAxis = 1;
|
||||
|
||||
private float t = 0f;
|
||||
private bool reversing = false;
|
||||
private bool isPaused = false;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (isPaused) return;
|
||||
|
||||
t += (reversing ? -1 : 1) * rotationSpeed * Time.deltaTime;
|
||||
|
||||
if (t >= 1f)
|
||||
{
|
||||
t = 1f;
|
||||
reversing = true;
|
||||
StartCoroutine(PauseAtMaxPoint());
|
||||
}
|
||||
else if (t <= 0f)
|
||||
{
|
||||
t = 0f;
|
||||
reversing = false;
|
||||
StartCoroutine(PauseAtMaxPoint());
|
||||
}
|
||||
|
||||
float easedT = Mathf.SmoothStep(0f, 1f, t);
|
||||
float angle = Mathf.Lerp(startAngle, endAngle, easedT);
|
||||
|
||||
Vector3 rotation = transform.eulerAngles;
|
||||
if (rotationAxis == 0)
|
||||
rotation.x = angle;
|
||||
else if (rotationAxis == 1)
|
||||
rotation.y = angle;
|
||||
else if (rotationAxis == 2)
|
||||
rotation.z = angle;
|
||||
|
||||
transform.eulerAngles = rotation;
|
||||
}
|
||||
|
||||
private IEnumerator PauseAtMaxPoint()
|
||||
{
|
||||
isPaused = true;
|
||||
yield return new WaitForSeconds(pauseDuration / 1000f);
|
||||
isPaused = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7af7bbc77e05cf749813ecc2f2d47e83
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 269238
|
||||
packageName: The Toon Shader
|
||||
packageVersion: 1.4.2
|
||||
assetPath: Packages/com.shadercrew.the-toon-shader.core/Scripts/Runtime/Demo/LightRotation.cs
|
||||
uploadId: 919972
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
using UnityEngine;
|
||||
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
using UnityEngine.InputSystem;
|
||||
#endif
|
||||
namespace ShaderCrew.TheToonShader
|
||||
{
|
||||
public static class SystemIndependentInput
|
||||
{
|
||||
public static bool GetKeyDown(KeyCode key)
|
||||
{
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
Keyboard kb = Keyboard.current;
|
||||
if (kb == null) return false;
|
||||
|
||||
|
||||
Key newKey;
|
||||
if (TryConvertKeyCode(key, out newKey))
|
||||
return kb[newKey].wasPressedThisFrame;
|
||||
|
||||
return false;
|
||||
#elif ENABLE_LEGACY_INPUT_MANAGER
|
||||
return Input.GetKeyDown(key);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
private static bool TryConvertKeyCode(KeyCode oldKey, out Key newKey)
|
||||
{
|
||||
switch (oldKey)
|
||||
{
|
||||
case KeyCode.D: newKey = Key.D; return true;
|
||||
case KeyCode.A: newKey = Key.A; return true;
|
||||
case KeyCode.W: newKey = Key.W; return true;
|
||||
case KeyCode.S: newKey = Key.S; return true;
|
||||
|
||||
case KeyCode.Space: newKey = Key.Space; return true;
|
||||
case KeyCode.Escape: newKey = Key.Escape; return true;
|
||||
case KeyCode.UpArrow: newKey = Key.UpArrow; return true;
|
||||
case KeyCode.DownArrow: newKey = Key.DownArrow; return true;
|
||||
case KeyCode.LeftArrow: newKey = Key.LeftArrow; return true;
|
||||
case KeyCode.RightArrow: newKey = Key.RightArrow; return true;
|
||||
default:
|
||||
newKey = Key.None;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99f5465f5ff6af040b99b7ba1c623641
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 269238
|
||||
packageName: The Toon Shader
|
||||
packageVersion: 1.4.2
|
||||
assetPath: Packages/com.shadercrew.the-toon-shader.core/Scripts/Runtime/Demo/SystemIndependentInput.cs
|
||||
uploadId: 919972
|
||||
Reference in New Issue
Block a user