Unity UI Binding Tools

Intro I’ve been using unreal for sometimes and it’s a pretty amazing engine. I found that they have UPROPERTY(meta=(BindWidget)) to binding UI variable declaration in the C++ code and the Widget. UPROPERTY(meta=(BindWidget)) UTextBlock* TextBlock_PlayerName; Unreal will bind that variable into the UI component that has the same type and name. And lately, I also see that Godot has its own binding, and they improve it in Godot 3.5. But, I do not find Unity built-in UI binding....

August 15, 2022

Enum Generator in Unity

Do you ever think to use enum for making ID because it can be access the from code? For long list of item id this is not really a good solution, but for short id this should be fine. ScriptableObject ScriptableObject is used for the user interface of this generator because the user most likely wanna have more than one enum generator they can edit. In this ScriptableObject, we need to define directory, namespace, enum name and values....

August 12, 2022

#2 Egg Farm Update

Welcome to the second update of my farming game, lately I start to lose my motivation to continue this game, I still work on the game and push my self to finish it. Writing this blog is also helping me keep working on my games, I am glad start writing this blog actually. And these are the update of the game. Sheep Instead of putting the sheep inside a cage, I decide to let them roam in the field and search for food....

June 10, 2022

GameObject Name Redirector in Unity

Intro A few days ago my friend stumbled across a problem because of the usage of GameObject.Find, it can’t find the game object because the game object was renamed. So, I thought we can have something like Unreal Engine redirector to solve this problem. In Unity, There is FormerlySerializedAsAttribute, which is used to rename a field without losing its serialized value. Structure Data GameObjects This data comes from Unity Engine itself, to retrieve this I use...

May 11, 2022

#1 Egg Farm Update

Welcome to the first update for Egg Farm, the game title may change in the future. Egg Farm is a relaxing mini farming game, where you can just sit and interact with everything inside the game, plant crops, and ranch animals, and design your own farm. Since this is a mini-game there will not be many features existing, although I still add more features that seem fun. There is still more work that needs to be done to finish this game....

May 10, 2022

Unreal Engine Overflow

Recently, I start using Unreal Engine to develop games. I did not have proper C++ or Unreal Engine knowledge, I usually use Unity and C#. While learning and using it, I stumbled across some problems. So I decide to make some notes that I can use and share with others. Print Enum Into FString StaticEnum<ENUM_TYPE>()->GetValueAsString(ENUM_VALUE) Format FText FText format = "Item Name: {ItemName}" const FText formattedText = FText::FormatNamed(FTextFormat(format), TEXT("ItemName"), itemName); Loop UDataTable itemDT->ForeachRow<FItemInfo>("FindItem", [&](const FName& key, const FItemInfo& item) { // Do something here }); Find a Row in UDataTable FItemInfo* itemInfo = itemDT->FindRow<FItemInfo>(ROW_NAME, "FindItem"); Create UObject Instance UTextBlock* text = NewObject<UTextBlock>(btn, FName("text")); Hide Field on Certain Condition UPROPERTY(EditAnywhere, meta=(Condition="YOUR_CONDITION", EditConditionHides)) float speed; Create Min Max Slider for Field UPROPERTY(EditAnywhere, meta = (ClampMin = "1", ClampMax = "10")) int32 totalSpawned; Instantiate a UObject/Blueprint/WBP MyClass* instance = NewObject<MyClass>(); UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) TSubclassOf<MyClass> MyClassType; // UObject Subclass NewObject<ActorClass>(MyClassType); // Actor Subclass GetWorld()->SpawnActor<ActorClass>(MyClassType); // Widget Subclass MyWidget* widget = CreateWidget<MyWidget>(this, MyWidgetType); The code above is not tested and is used for reference only....

May 6, 2022

Unity Automatic Localization System

Previously I made a game using Unity3D with my friends where we need to handle localization sent by the server. while my friends focus on working with the game design, I deal with the localization. I show up with some ideas but I found all of them is not suitable, because the game has many texts inside to be found one by one. We need to store the text into a JSON file, we can write it again one by one into the JSON file, but it will take a while....

May 2, 2022

Smart Framework

I believe all of us have a goal to achieve in life. but sometimes it just feels hard to achieve and we do not know where we should start. I want to develop and publish my own games but as time pass, I feel pretty lazy, tired especially after work. I usually work on my games in my free times. Last year, my senior told me about Smart Framework, I read about it but I failed to really understand it....

April 21, 2021

User Experience for Tools Development

Recently I learn a book about “Designing the User Experience of Game Development Tools”, the book is pretty straightforward and easy to understand. As a tools programmer, this is a book that I must read, to make my tools better. What is User Experience? There are many definitions of user experience. The popular one is from Elizabeth Sanders, Tools need to be, “Useful, Usable and Desireable” A. Useful The tool you make must fulfil user needs, or it will be useless....

June 9, 2020

Create in Game Console for Unity

Intro When you working on your game, you also want to debug, know the process of your game, take a look at the log you create for that game. It’s easy to take a look at the log in the game engine or framework, but how if I wanna look the log from the game when it already becomes executable files e.g .exe, .apk etc. In Android, you can open a terminal and show the log cat but the experience is painful since it shows all the log from your android device too, or you can open android studio and take a look at the log cat there, but sometimes we do not need all the log from our device....

January 23, 2020