Comments (9)
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.
Sorry I'm switching back to Unity after 2 years on Unreal and I'm rediscovering a lot 😉
from bmeshunity.
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.
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.
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.
Here are the repro classes
Preview
As you can see in Editor I'm not seeing BMeshUnity.DrawGizmos
from bmeshunity.
.... Je n'avais pas activé les gizmos.... 🤦♂️
from bmeshunity.
Thanks :)
from bmeshunity.
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)
- [Proposal]: Rename project and classes from BMesh to UMesh HOT 4
- Profile performances of arbitrary attributes HOT 2
- Add LICENCE HOT 1
- Continue to add to to bmesh after meshfilter? HOT 1
- Add an example with UVs HOT 5
- Load mesh file runtime HOT 1
- [Proposal]: Separate Vertex, Edge, Loop, and Face in to their own files HOT 3
- [Proposal]: Change return types of methods that return List<> to IEnumerable<> HOT 1
- [Proposal]: Change public fields to properties HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bmeshunity.