Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Game Object Renaming Options
#1
is it possible to avoid or override the naming convention given to prefabs? I'd like to simply keep the existing prefab name, and not add the long prefix/ suffix.


Attached Files Thumbnail(s)
   
Reply
#2
Hi,
There is no such option, but you can modify the code that does the renaming, either to avoid the renaming or change the naming pattern. To do so, head to the the file ToolBuddy\Assets\Curvy\Scripts\CG\CGModule.ResourceNamer.cs 
then modify the method Rename(...)

If you are unfamiliar with coding, just replace this:

Code:
public void Rename([NotNull] string resourceName, [NotNull] Component resource, int index)
{
    string newName = GetResourceName(
        resourceName,
        index
    );
    //This check is necessary because when CurvyGenerator.ForceFrequentUpdates is true, this bug happens
    //[FIXED] When a scene has input spline path or input spline shape module, renaming objects from the hierarchy or though the F2 shortcut does not work
    if (resource.name != newName)
        resource.name = newName;
}


with this:

Code:
public void Rename([NotNull] string resourceName, [NotNull] Component resource, int index)
{
}

I hope this helped.
Have a nice day.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Morph game object along curve. mikechr2000 5 2,084 02-04-2025, 09:30 PM
Last Post: _Aka_
  Create Mesh Node, Make Static Options rickgplus 1 1,375 01-23-2025, 10:12 AM
Last Post: _Aka_
  Bug: Save Generator Outputs still saves outputs if object is disabled curvymesher 1 1,171 08-30-2024, 09:19 AM
Last Post: _Aka_
  Player move with object mcarman 4 1,974 07-29-2024, 06:49 PM
Last Post: mcarman

Forum Jump: