Giter Club home page Giter Club logo

paths's People

Contributors

kurbanismailovzaur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

paths's Issues

adding a new property in the editor inspector

Hi, Thanks for the well rounded package.
I'm trying to implement on it by adding a float property (speed) visible in the editor below the rotation Vector3 property.
I added a property in the xaml template template PointsListElement.uxml. I can see the property.

I added this in PathInspector.cs (l58 - 80) :

`
foreach (var groupBox in _listView.Query("point-element").Build())
{
var posField = groupBox.Q("point-position");
var rotField = groupBox.Q("point-rotation");
var speedField = groupBox.Q("point-speed");

                if (!int.TryParse(groupBox.Q<Label>("point-number").text, out int number))
                    return;

                var point = _inspector.GetPathPoint(number, false);

                posField.SetValueWithoutNotify(point.Position);
                rotField.SetValueWithoutNotify(_inspector.GetPointEuler(point));
                speedField.SetValueWithoutNotify(_inspector.GetPointSpeed(point));
            }

            if (_inspector._selectedPointIndex != -1)
            {
                var point = _inspector.GetPathPoint(_inspector._selectedPointIndex, false);
                SceneView.lastActiveSceneView.rootVisualElement.Q<Vector3Field>("point-position").SetValueWithoutNotify(point.Position);

                SceneView.lastActiveSceneView.rootVisualElement.Q<Vector3Field>("point-rotation").SetValueWithoutNotify(_inspector.GetPointEuler(point));

                var speedField = SceneView.lastActiveSceneView.rootVisualElement.Q<FloatField>("point-speed");
                speedField.SetValueWithoutNotify(_inspector.GetPointSpeed(point));
            }`

I have the visual element with groupBox.Q("point-speed");
but I got null reference a few lines below with
var speedField = SceneView.lastActiveSceneView.rootVisualElement.Q<FloatField>("point-speed");

I'm new to the inspector stuff so it might be an easy mistake.
What could I be missing ?

I have the same issue in the
private void SelectPoint(int index)
method in PathInspector.cs (l 237)

For reference I added this in the PointsListElement.uxml
<ui:GroupBox style="margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; padding-left: 4px; padding-right: 12px; padding-top: 4px; padding-bottom: 4px; background-color: rgba(43, 77, 57, 0); border-top-left-radius: 0; border-bottom-left-radius: 6px; border-top-right-radius: 0; border-bottom-right-radius: 6px;"> <uie:FloatField label="Speed" name="point-speed" value="42,2" /> </ui:GroupBox>

And I added the Speed property with proper accessor in the Point.cs class.
Thanks again for the asset.

Can not build unity project.

Hi,

I can not build unity project with Redcode\Paths plugin, please can you check. This is empty unity 2021.3.1f1 project and I did not edit any source code.

Thanks
Console Errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.