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
  Controler Speed from metadata Bryan Thatcher 4 10 06-25-2024, 11:18 AM
Last Post: _Aka_
  "MetaData" Of Entire Spline Heightmap SAMYTHEBIGJUICY 3 6 10-16-2023, 08:42 AM
Last Post: _Aka_
  Metadata interpolation tairoark 3 10 10-17-2022, 01:07 PM
Last Post: _Aka_
  Proper metadata usage tairoark 2 8 10-01-2022, 12:04 PM
Last Post: _Aka_

Forum Jump: