Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Editor
#1
Hi.

I'm currently making an editor to build a kind of track (instantiating prefabs with a set of connected points from a spline).
Everything works fine, but when i change of scene and come back to the one containing my objects, all connections between splines are lost.

I use : 


Code:
firstPoint.gameObject.GetComponent<CurvySplineSegment>().ConnectTo(lastPoint.gameObject.GetComponent<CurvySplineSegment>(), CurvyConnection.HeadingMode.Sharp, CurvyConnection.SyncMode.SyncPosAndRot);
SceneView.RepaintAll();

any clues ?

I think i found, but could you confirm it's the rught way to do : 



Code:
EditorUtility.SetDirty(firstPoint.GetComponent<CurvySplineSegment>());
EditorUtility.SetDirty(lastPoint.GetComponent<CurvySplineSegment>());

 
Reply


Messages In This Thread
Custom Editor - by lelag - 11-22-2013, 01:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question How to attach custom components to output Sacryn 3 7 02-23-2024, 09:42 AM
Last Post: _Aka_
  Guide to custom placing stuff on spline Lupos 15 43 11-27-2023, 12:51 PM
Last Post: _Aka_
  Custom CurvySplineSegment prefabs Lupos 1 10 10-02-2023, 09:36 AM
Last Post: _Aka_
  Curvy Splines Built In Editor Undo causes issues. Lupos 1 9 10-02-2023, 08:52 AM
Last Post: _Aka_

Forum Jump: