Giter Club home page Giter Club logo

Comments (9)

melMass avatar melMass commented on August 15, 2024

Ok so for the Editor part, I can create a custom editor for my script to update the mesh whenever I need, it works well.
A simple way to test is to add [ContextMenu("Generate Mesh")] right before Start() and then you can right-click on the script in the inspector > Generate Mesh.
But doing so still does not give me the Editor debug preview from the Readme, but rather the final mesh.

from bmeshunity.

melMass avatar melMass commented on August 15, 2024

Sorry I'm switching back to Unity after 2 years on Unreal and I'm rediscovering a lot 😉

from bmeshunity.

eliemichel avatar eliemichel commented on August 15, 2024

In the editor the Start function is not called by default, because MonoBehavior scripts are usually meant for runtime only. If you want it to run in the Editor, you can simply add [ExecuteInEditMode] before the class declaration:

[ExecuteInEditMode]
public class MyMeshGenerator : MonoBehaviour
{
//...
}

BMeshUnity can of course be used for runtime creation, it is even it's primary goal! You must indeed call SetInMeshFilter every time you update the mesh to convert it to Unity representation. You do all your generation steps using BMesh and once it is ready, you call SetInMeshFilter to "validate" it and make it visible in the game.

from bmeshunity.

eliemichel avatar eliemichel commented on August 15, 2024

Sorry I'm switching back to Unity after 2 years on Unreal and I'm rediscovering a lot 😉

Welcome back ^^What decided you to switch back if I may?

from bmeshunity.

melMass avatar melMass commented on August 15, 2024

I went a bit more complicated road (serialized fields & Getter/Setters) but it works well.
For me BMeshUnity.DrawGizmos still doesn't seem to work as expected.
I'm cleaning the sample I've made so it will be easier to talk around 😄

About the switch, it's not a full one, but I think I will use Unity more than UE overall. There's is some stuff I love about UE and likewise for Unity but UE is too bloated IMHO. For a long-lasting project, it's less of a problem as you can recreate what you want from scratch in C++ and disable everything you don't need but for a smaller project, the whole system is too cumbersome IMHO.
I feel a lot more in control in Unity, the package system is great, it's way easier than UE to use with a VCS. I use it mainly for Virtual Production and the fact that it's so easy to extend the Editor is another huge factor.
I love Unreal and it really opened my mind on a lot of things but after fighting with it's UI & it's build/plugin system for too long I decided to give Unity a go since Quarantine and the new version is filling a lot of the issues I had when I left it.

from bmeshunity.

melMass avatar melMass commented on August 15, 2024

Here are the repro classes

BMesh Unity Sample - Gist

Preview

As you can see in Editor I'm not seeing BMeshUnity.DrawGizmos

from bmeshunity.

melMass avatar melMass commented on August 15, 2024

.... Je n'avais pas activé les gizmos.... 🤦‍♂️
I'm dumb...

from bmeshunity.

melMass avatar melMass commented on August 15, 2024

Thanks :)

from bmeshunity.

eliemichel avatar eliemichel commented on August 15, 2024

Aha great problem solved. ^^ Ok about Unreal it seems to match my experience, way too much overhead in the creation process to use it for experiments or small scale projects while Unity is very reliable.

from bmeshunity.

Related Issues (10)

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.