playMaker

Author Topic: Playerprefs for a Color variable  (Read 401 times)

NinjaX

  • Full Member
  • ***
  • Posts: 108
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Playerprefs for a Color variable
« on: November 20, 2018, 10:03:08 AM »
Hello, I was wondering if there is a Playerprefs for a Color variable and if there isn't any suggestions on how to go about saving A color variable ?

TY
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: Playerprefs for a Color variable
« Reply #1 on: November 20, 2018, 11:34:24 PM »
Hi,

 use ConvertStringToColor and ConvertColortoString, then you can save color as regular strings in playerprefs or anywhere else.

Bye,

 Jean

NinjaX

  • Full Member
  • ***
  • Posts: 108
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Re: Playerprefs for a Color variable
« Reply #2 on: November 21, 2018, 09:03:12 AM »
Thank you so much Jean, this is what I figured also.

May I ask, I think I saw somewhere that strings can be a performance issue is that a thing or am I just tripping, sorry I figured ide ask someone with experience just to be sure...
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4436
    • View Profile
    • jinxtergames
Re: Playerprefs for a Color variable
« Reply #3 on: November 21, 2018, 02:57:35 PM »
Hi.
strings should not give performance issues.

Things like create/destroy are heavy on performance :)
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

NinjaX

  • Full Member
  • ***
  • Posts: 108
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Re: Playerprefs for a Color variable
« Reply #4 on: November 21, 2018, 06:44:11 PM »
TY so much :)
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: Playerprefs for a Color variable
« Reply #5 on: November 21, 2018, 11:21:52 PM »
Hi,

 Well, PlayerPrefs is a performance issue to begin with. So use saving and loading ONLY when required and not within the game loop, only inside menus or after the game is done or loading.

Bye,

 Jean