Tag Info

New answers tagged

0

Without code to reference the only thing I can assume is that the grid is adding another object to each button. Each button is one call, so 7, and the only reasonable assumption is that the layout is adding an additional call to each, now totaling 14. From what it looks like, you're forcing height and width bounds and spacing is either assigned or being ...


0

Basically its what @DanielHolst said, you can use negative coords and expand in all directions. As for storing your loaded chunks for fast access and checking you could use std::unordered_map, Just #include <unordered_map>, then your code looks something like this: std::unordered_map< std::pair< int, int >, Chunk* > ChunkMap; // For ...


3

Use the inspector to allow the user (you, or other developers) to be able to easily define the Component themselves without having to modify your code. Use the GetComponent() method if there is no need to be able to change it from the way you designed your script. Efficiency doesn't have to do with it. If you use GetComponent() in your script, you will ...



Top 50 recent answers are included