Jump to content

Adding tags to Nodes


photo

Recommended Posts

Posted

One useful feature others engines have is the possibility to create tags on Nodes (or actors or gameobjects)

this is quite useful especially in large scene with several objects that do not necessarily have a component attached, like get all pickups in world, or find the nearest node of type vehicle,  and such.

I know you can use layers but this is limiting, as an object can have several tags while it can belong only to one layer, also I think layers are better suited for scenery composition.

From the engine point of view I believe it is not necessary to alter the Node structure itself just add an external list of pointers to nodes and tags you can then query with FindNodeWithTag and such.

Here's the links to the usage and implementation in Unity and Unreal

thanks

Fred

Posted

Hi Fred,

Thank you for the suggestion! Indeed, tags can help to organize nodes altogether with NodeLayers. We will think how to implement this in the future versions of the engine.

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

A Tag system would be VERY nice.

  • 7 months later...
Posted

After seeing this topic in link

https://developer.unigine.com/forum/topic/7033-world-nodes-searchfilter-by-id/?tab=comments#comment-35688

I wanted to create a topic about tags and noticed its already here.

Any progress on this "actor has tag" feature ? Because mutable tag can have benefits to work with and its different than immutable ID.

fred.naar gave examples from other engines if that is okay then that example is what i was thinking https://docs.unrealengine.com/en-US/BlueprintAPI/Utilities/ActorHasTag/index.html

Thanks

Posted

Adding search for node ID doesn't require any changes in runtime implementations (unlike tags). This task (tags for nodes) is still in our todo list, but I can't provide you any estimations on it right now.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

  • 1 year later...
Posted

Добрый день! Можно узнать как у вас обстоят дела по добавлению tag к нодам в движок? Спасибо!

Posted

Ясно, спасибо)

  • 1 year later...
Posted

Здравствуйте! Мы всё еще ждём) Спасибо!

  • Like 1
  • 2 weeks later...
Posted

You can get functionality similar to tags using node data. It's even more powerful than tags in some ways because it supports XML. 
 

MyNode.SetData("Tag1", $"""
               <facet1>
               	 <item-a val1="" val2="" />
                 <item-b val1="" val2="" />
               </facet1>
               """);
MyNode.SetData("Tag2", $"""
               <facet1>
               	 <item-a val1="" val2="" />
                 <item-b val1="" val2="" />
               </facet1>
               """);               
               
XElement read1 = XElement.Parse(MyNode.GetData("Tag1"));
XElement read2 = XElement.Parse(MyNode.GetData("Tag2"));

 

×
×
  • Create New...