Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Metadata warnings
#1
Hi
I did this:
Code:
        for (int i = 0; i < Spline.ControlPointCount; i++) {
            Spline.ControlPointsList[i].RegisterMetaData(gameObject.AddComponent<MetaDataInfo>());
            MetaDataInfo metaInfo = Spline.ControlPointsList[i].GetMetadata<MetaDataInfo>();
        }

Why I receive these warnings?
Code:
[Curvy] Game object 'Airplane (FluffyUnderware.Curvy.CurvySplineSegment)' has multiple Components of type 'MetaDataInfo'. Control Points should have no more than one Component instance for each MetaData type.
   

I used "Metadata.Count" and every CP has only one metada.
Reply
#2
Hi
Replace the content of your loop with this:
MetaDataInfo metaInfo = Spline.ControlPointsList[i].GetMetadata<MetaDataInfo>(true);
This will autocreate the meta data if not existing already
Did this work?
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
(07-12-2021, 11:57 AM)_Aka_ Wrote: Hi
Replace the content of your loop with this:
MetaDataInfo metaInfo = Spline.ControlPointsList[i].GetMetadata<MetaDataInfo>(true);
This will autocreate the meta data if not existing already
Did this work?
Have a nice day

This worked! Thanks a lot.
Reply
#4
You are welcome.
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
Thanks a lot.
دانلود آهنگ جدید امیر تتلو گدایی دانلود آهنگ جدید ترانه:  Heart Heart امیر تتلو . تنظیم موزیک: امیر تتلو
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Control Point Metadata gets cleared. DavidH 2 2,074 12-09-2019, 03:04 PM
Last Post: DavidH
Information Upcoming changes to the Metadata API _Aka_ 0 1,513 07-23-2019, 04:14 PM
Last Post: _Aka_
  OnControlPointReached not triggering when metadata attached cyclo 3 2,866 05-23-2019, 06:02 PM
Last Post: _Aka_
  Obsolete warnings Woondal 1 3,683 10-31-2017, 04:20 PM
Last Post: Jake

Forum Jump: