Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pankus61

Pages: [1]
1
NGUI 3 Support / ToString max 6 number :(
« on: March 22, 2014, 11:04:05 AM »
Solved

2
NGUI 3 Support / UIslider EventDelegate.Add Error..
« on: March 16, 2014, 09:26:09 PM »
Hello i want make UISlider volume changing but two error;
My script;

  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class VolumeOption : MonoBehaviour {
  5.        
  6.  
  7.         void Start ()
  8.         {
  9.                 UISlider _Volumeslider = GetComponent<UISlider>();
  10.                 _Volumeslider.sliderValue = AudioListener.volume;
  11.                 EventDelegate.Add(_Volumeslider.onChange,OnToggleChange);
  12.  
  13.         }
  14.        
  15.         void OnToggleChange (float val)
  16.         {
  17.                 AudioListener.volume = val;
  18.         }
  19. }

ERRORS;

  1. Assets/ScriptOther/VolumeOption.cs(11,31): error CS1502: The best overloaded method match for `EventDelegate.Add(System.Collections.Generic.List<EventDelegate>, EventDelegate)' has some invalid arguments

  1. Assets/ScriptOther/VolumeOption.cs(11,31): error CS1503: Argument `#2' cannot convert `method group' expression to type `EventDelegate'

How to fix? Thanks in advance. :)

(Sorry for bad english.)

Pages: [1]