Block Asset
Creating new Blocks
To create a new Block asset: Right-click inside your Project folder β Create > Game Creator > LogicBlock > Block
Creating new Lists
To create a new Instruction List, click Add Instruction List inside the Block.
To create a new Condition List, click Add Condition List inside the Block.
Each list is a self-contained set of logic that can be triggered, reused, or referenced independently, making your Blocks more modular and easier to manage.
Recommended Block Setup
Structure your project by creating Blocks focused on specific areas of gameplay. This keeps your logic clean, modular, and easy to maintain.
Character Block Contains instructions related to the player or NPC characters, such as:
Jump
,Deal Damage
,Pick Up Item
,Interact
,Activate Quests
,Equip Weapons
, and more.AI Block Handles common AI behaviors like:
Targeting
,Following
,Patrolling
, and decision-making logic.GameObject Block Focuses on world or object-related interactions, such as:
Rotate Pickups
,Moving Objects
, or control other non-character elements.
Using dedicated Blocks for each gameplay domain helps you stay organized, reduces duplication, and supports scalable, centralized logic across your project.
References
References let you configure behavior for each instruction dynamically, without directly editing the list inside the Block. This keeps your logic modular, reusable, and adaptable to different contexts.
Adding a Reference
Open a list inside a Block.
Click Add Reference.
Set a name and choose the appropriate Reference Type (e.g., GameObject, Number, Boolean, etc.).
Click Create.
The reference will appear below the instruction list. You can expand it by clicking the reference entry. A Delete button is available inside the expanded view if you need to remove it.
Using a Reference in an Instruction
To make an instruction use a dynamic reference (e.g., setting a GameObject active):
Add a GameObject Reference to your list.
Add a Set Active instruction.
In the instructionβs GameObject field, select:
LogicBlock > Block GameObject Reference
You'll be prompted to specify:
The Block containing the reference.
The List inside that Block.
The specific Reference you created.
If there's only one reference of that type, it will be auto-selected. If there are multiple, click the field to choose from the available references.
Dynamic References work consistently across all supported data types:
Items β use Block Item Reference
Stats β use Block Stat Reference
Booleans, Numbers, Strings, and other simple types have their own reference selectors available within compatible instructions.
This system ensures your instructions remain modular and flexible, enabling centralized logic that adapts to input-driven variation without modifying the instruction list itself.
Buttons
Play Mode Button
Each list includes a Play button, available while in Play Mode, to instantly run the entire instruction list for quick testing.
Note: If the list uses dynamic references, those must first be set by running the instruction normally. After that, the Play button will reuse the last valid reference values.
Edit Button
Click the Edit button to expand customization options for the list. You can:
Rename the list
Assign a custom icon
The icon selector opens a window with access to Game Creator 2βs icon library and module icons, along with customizable colors. A built-in search field helps you quickly find the icon you need.
Delete Button
Click the Delete button to remove a list. A confirmation popup appears to prevent accidental deletion.
Duplicate Button
Click the Duplicate button to create an exact copy of the list.
Organizing Lists
Each list has a drag handle allowing you to reorder lists inside a Block to keep your workflow neat and intuitive.
Performance
LogicBlock optimizes editor performance by loading instruction and condition lists only when expanded. This keeps the Unity editor fast and responsive, even with many lists in a Block.
Self and Target
Inside a Block, Self and Target references behave exactly as if the instructions were placed inside the trigger itself, preserving expected context seamlessly.
Sharing Blocks
Blocks can be easily shared between projects by copying their asset files.
To share a Block:
Locate the Block asset in your Unity project's folder.
Copy and paste the asset into the same relative folder in your target project.
Important The receiving project must have the same modules, custom instructions, and hub scripts installed. If any required components are missing, some instructions may fail to load correctly or be lost entirely.
This method ensures your modular logic can be reused across projects while maintaining flexibility and compatibility.
Last updated