Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2.01k stars 414 forks source link

Replace DrawTexture by DrawTexWithTexCoords #58

Closed groud closed 8 years ago

groud commented 8 years ago

A more efficient way to tile a texture.

groud commented 8 years ago

Do not merge yet, I would like to consequently replace the texture by a lighter one.

Seneral commented 8 years ago

No problem, didn't test yet but looks great:)

groud commented 8 years ago

I tested with a smaller texture but faced a little bug. It is now fixed. I pushed the smaller texture and also changed the texture import properties (just in case).

(btw: If someone could test this that would be great, I am not 100% sure of the coordinates calculation :) )

Seneral commented 8 years ago

Sorry for the late reply, kinda forgot that I wanted to test it:/ It has a little coordinate bug indeed, the texture should line up with the actual canvas space. For that to happen it needs to have it's origin at the center, which you can test by resizing the window and looking if it fits. Additionally, the size has to be right (I think exactly 100px or something like that). You can test this by enabling snapping (hold strg while dragging a node) and it should snap to the grid:)

groud commented 8 years ago

Should be ok now. :)

Seneral commented 8 years ago

Yup, thank you! :)