mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-10 04:53:15 +08:00
Added an ExplorerCore log call warning when trying to play a path with fewer than 3 nodes.
This commit is contained in:
@@ -122,7 +122,8 @@ namespace UnityExplorer.CatmullRom
|
||||
public void StartPath(){
|
||||
if(splinePoints == null || splinePoints.Length <= 2)
|
||||
{
|
||||
ExplorerCore.Log(splinePoints);
|
||||
int nodeCount = splinePoints?.Length ?? 0;
|
||||
ExplorerCore.LogWarning($"Cannot start camera path: Need at least 3 nodes, but only {nodeCount} node(s) exist. Please add more nodes to create a path.");
|
||||
throw new ArgumentException("Catmull Rom Error: Too few spline points!");
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user