public override void PreRender() { lineGO.SetStart(SceneStartF()); lineGO.SetEnd(SceneEndF()); lineGO.SetColor(ColorF()); // line width is set in world units! lineGO.SetLineWidth(LineWidth.WorldValuef); lineGO.SetLayer(LayerF(), true); }
void Update() { LineGO.SetName(NameF()); LineGO.SetColor(ColorF()); LineGO.SetStart(StartF()); LineGO.SetEnd(EndF()); LineGO.SetLineWidth(LineWidthF()); if (DeleteConditionF() == true || DeleteNextFrame == true) { LineGO.Destroy(); } }
void InitOnMainThread(fGameObject parentGO) { LineGO = GameObjectFactory.CreateLineGO(NameF(), ColorF(), LineWidthF(), LineWidthType.World); LineGO.SetStart(StartF()); LineGO.SetEnd(EndF()); if (parentGO != null) { parentGO.AddChild(LineGO, false); } LineGO.GetComponent <PreRenderBehavior>().AddAction(() => { Update(); }); if (OnCreateF != null) { OnCreateF(LineGO); } }