AnyPortrait > Forum > Bugs or Suggestions

[Archive] Script error due to class conflict called “Type”

  • This topic has 0 replies, 1 voice, and was last updated 1 week ago by Archive AccountArchive Account.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1273
    Archive AccountArchive Account

      Q.

      The following script error occurred:

      error CS0029: Cannot implicitly convert type ‘System.Type’ to ‘Type’

       

      A.

      This is because the code that uses the System.Type class in AnyPortrait was written as “Type” instead of explicitly writing “System.Type”.
      In future updates, we will write the full package name for all possible normal classes in the code.

      However, if a user creates a class with the same name as a class with a common name (e.g. Type, Text, Image) belonging to the System, this problem may occur in other code.
      Therefore, if possible, it is recommended to avoid creating a class name with a common name, and if unavoidable, it is also recommended to use a separate Namespace.

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Scroll to Top